public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] mem/tunable:min_free_kbytes: fix disabled check_monitor flag
@ 2026-03-23  7:49 Gao Xiang
  2026-03-23  8:36 ` Andrea Cervesato via ltp
  2026-03-26 10:15 ` Andrea Cervesato via ltp
  0 siblings, 2 replies; 4+ messages in thread
From: Gao Xiang @ 2026-03-23  7:49 UTC (permalink / raw)
  To: ltp

From: Xiang Gao <gaoxiang@kylinos.cn>

In min_free_kbytes, check_monitor() is effectively disabled because
the loop condition uses the flag incorrectly.

Fix the condition so the monitor runs during the test and exits after
receiving the signal.

Signed-off-by: Xiang Gao <gaoxiang@kylinos.cn>
---
 testcases/kernel/mem/tunable/min_free_kbytes.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/mem/tunable/min_free_kbytes.c b/testcases/kernel/mem/tunable/min_free_kbytes.c
index ae0fe9d90..a62e4ae9d 100644
--- a/testcases/kernel/mem/tunable/min_free_kbytes.c
+++ b/testcases/kernel/mem/tunable/min_free_kbytes.c
@@ -184,7 +184,7 @@ static void check_monitor(void)
 	unsigned long tune;
 	unsigned long memfree;
 
-	while (end) {
+	while (!end) {
 		memfree = SAFE_READ_MEMINFO("MemFree:");
 		tune = TST_SYS_CONF_LONG_GET(MIN_FREE_KBYTES);
 
-- 
2.53.0


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

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

end of thread, other threads:[~2026-03-26 10:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23  7:49 [LTP] [PATCH] mem/tunable:min_free_kbytes: fix disabled check_monitor flag Gao Xiang
2026-03-23  8:36 ` Andrea Cervesato via ltp
2026-03-26 10:34   ` Petr Vorel
2026-03-26 10:15 ` Andrea Cervesato via ltp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox