All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] min_free_kbytes: TCONF on errno ENOMEM, add break
@ 2026-05-25  7:39 Petr Vorel
  2026-05-25  9:02 ` Cyril Hrubis
  2026-05-25 10:08 ` [LTP] " linuxtestproject.agent
  0 siblings, 2 replies; 6+ messages in thread
From: Petr Vorel @ 2026-05-25  7:39 UTC (permalink / raw)
  To: ltp

On machine with 16 GM RAM and ~6 GB swap fork() fails on ENOMEM.
Treat that as TCONF.

While at it, add missing break in case.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
I guess we cannot fix this with .min_mem_avail, because it depends also
on available swap.

Also, my investigation was triggered by random failures since this fix
was merged:
355124aea9 ("mem/tunable:min_free_kbytes: fix disabled check_monitor flag") [1]

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/commit/355124aea99c7c7d40140c969a53ed892421dee9

 testcases/kernel/mem/tunable/min_free_kbytes.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c
index a62e4ae9d9..45a3bfc8b1 100644
--- a/testcases/kernel/mem/tunable/min_free_kbytes.c
+++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
@@ -108,7 +108,8 @@ static void test_tune(unsigned long overcommit_policy)
 		fflush(stdout);
 		switch (pid[i] = fork()) {
 		case -1:
-			tst_brk(TBROK | TERRNO, "fork");
+			tst_brk((errno == ENOMEM ? TCONF : TBROK) | TERRNO, "fork");
+			break;
 		case 0:
 			ret = eatup_mem(overcommit_policy);
 			exit(ret);
-- 
2.53.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-25 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-25  7:39 [LTP] [PATCH 1/1] min_free_kbytes: TCONF on errno ENOMEM, add break Petr Vorel
2026-05-25  9:02 ` Cyril Hrubis
2026-05-25  9:42   ` Petr Vorel
2026-05-25 11:15     ` Cyril Hrubis
2026-05-25 11:36       ` Petr Vorel
2026-05-25 10:08 ` [LTP] " linuxtestproject.agent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.