Thread (14 messages) 14 messages, 2 authors, 2021-08-20

[LTP] [PATCH v4 3/4] syscalls/msgstress03: fix fork failure on small memory systems

From: Cyril Hrubis <chrubis@suse.cz>
Date: 2021-08-19 15:58:33

Hi!
+	free_pids = tst_get_free_pids(cleanup);
+	if (free_pids < 0) {
+		tst_brkm(TBROK, cleanup, "Can't obtain free_pid count");
+	} else if (!free_pids) {
+		tst_brkm(TBROK, cleanup, "No free pids");
+	}
This looks like copy&paste from msgstress04.c, can we please move this
snippet to the library function instead?
+	if (nprocs >= free_pids) {
+		tst_resm(TINFO,
+			 "Requested number of processes higher than limit (%d > %d), "
+			 "setting to %d", nprocs, free_pids, free_pids);
+		nprocs = free_pids;
+	}
+
 	srand(getpid());
 	tid = -1;
 
-- 
2.27.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
-- 
Cyril Hrubis
chrubis@suse.cz
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help