[LTP] [PATCH] mem/tunable:min_free_kbytes: fix disabled check_monitor flag
Gao Xiang
gaoxiang@kylinos.cn
Mon Mar 23 08:49:54 CET 2026
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
More information about the ltp
mailing list