All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] cpuset_memory_testset.sh: Give SIGUSR1 handler time to run before changing target mapping node in tests 12 and 13
@ 2025-03-07 22:58 Jacob Martin
  2025-03-18 11:04 ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Jacob Martin @ 2025-03-07 22:58 UTC (permalink / raw)
  To: ltp

The cpuset_memory test occasionally fails on test12 and test13. Both
intend to map anonymous memory on NUMA node 1, then swap to node 0 and
map more anonymous memory, verifying that memory was mapped to the
correct nodes along the way. On some high performance and high core
count x86 instances we observed 0 would be written to cpuset.mems before
the mapping program receives and handles SIGUSR1, causing the mapping
program to map on node 0 instead of the expected node 1, and thus
resulting in a test failure.

 cpuset_memory 1 TINFO: CPUs are numbered continuously starting at 0 (0-223)
 cpuset_memory 1 TINFO: Nodes are numbered continuously starting at 0 (0-1)
 cpuset_memory 1 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 3 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 5 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 7 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 9 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 11 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 13 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 15 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 17 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 19 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 21 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 23 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 25 TFAIL: allocate memory on the Node#0(Expect: Node#1).
 cpuset_memory 27 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 29 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 31 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 33 TPASS: Cpuset memory allocation test succeeded.
 cpuset_memory 35 TPASS: Cpuset memory allocation test succeeded.
 INFO: ltp-pan reported some tests FAIL

This is resolved by adding a 1 second delay between sending the first
SIGUSR1 signal and setting cpuset.mems to 0, which gives the SIGUSR1
handler time to complete and map to node 1, before switching to node 0.

Fixes: 70259d6e7
Signed-off-by: Jacob Martin <jacob.martin@canonical.com>
---
 .../cpuset/cpuset_memory_test/cpuset_memory_testset.sh          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
index c1e7cea8f..04d7cc877 100755
--- a/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
+++ b/testcases/kernel/controllers/cpuset/cpuset_memory_test/cpuset_memory_testset.sh
@@ -383,7 +383,7 @@ talk2memory_test_for_case_12_13()
 	sleep 1
 	echo $1 > "$2/tasks"
 	/bin/kill -s SIGUSR1 $1
-
+	sleep 1
 	echo 0 > "$2/cpuset.mems" || return 1
 	sleep 1
 	/bin/kill -s SIGUSR1 $1
-- 
2.43.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:[~2025-04-01 18:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 22:58 [LTP] [PATCH] cpuset_memory_testset.sh: Give SIGUSR1 handler time to run before changing target mapping node in tests 12 and 13 Jacob Martin
2025-03-18 11:04 ` Cyril Hrubis
2025-04-01  7:20   ` Petr Vorel
2025-04-01 18:27     ` Jacob Martin

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.