* [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* Re: [LTP] [PATCH] mem/tunable:min_free_kbytes: fix disabled check_monitor flag
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
1 sibling, 1 reply; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-23 8:36 UTC (permalink / raw)
To: Gao Xiang; +Cc: ltp
Hi!
This patch is correct. Indeed, `end` is set to 1 only when signal is received,
otherwise we loop into check_monitor(). Interesting enough we did use this test
for a while now. The monitor that was checking for possible failures was never
used.
We can add before merge:
Fixes: f28b29f16ba7
@Li FYI
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] mem/tunable:min_free_kbytes: fix disabled check_monitor flag
2026-03-23 8:36 ` Andrea Cervesato via ltp
@ 2026-03-26 10:34 ` Petr Vorel
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2026-03-26 10:34 UTC (permalink / raw)
To: Andrea Cervesato; +Cc: ltp
Hi,
> Hi!
> This patch is correct. Indeed, `end` is set to 1 only when signal is received,
> otherwise we loop into check_monitor(). Interesting enough we did use this test
> for a while now. The monitor that was checking for possible failures was never
> used.
Good catch, thank you! Patch merged.
> We can add before merge:
> Fixes: f28b29f16ba7
I added 8b7cc630a5 ("mm/tunable: add a new testcase min_free_kbytes")
it was wrong from the start when the test was added in 2012.
> @Li FYI
FYI Li was not Cced, doing it now.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] mem/tunable:min_free_kbytes: fix disabled check_monitor flag
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:15 ` Andrea Cervesato via ltp
1 sibling, 0 replies; 4+ messages in thread
From: Andrea Cervesato via ltp @ 2026-03-26 10:15 UTC (permalink / raw)
To: Gao Xiang; +Cc: ltp
Reviewed-by: Andrea Cervesato <andrea.cervesato@suse.com>
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [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 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.