From: Ryan Sullivan Date: Thu, 6 Jun 2024 13:53:48 +0000 (-0400) Subject: selftests/livepatch: define max test-syscall processes X-Git-Tag: v6.12~844^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46edf5d7aed5438078a8b4b1ab4230a41a032dd0;p=platform%2Fkernel%2Flinux-amlogic.git selftests/livepatch: define max test-syscall processes Define a maximum allowable number of pids that can be livepatched in test-syscall.sh as with extremely large machines the output from a large number of processes overflows the dev/kmsg "expect" buffer in the "check_result" function and causes a false error. Reported-by: CKI Project Signed-off-by: Ryan Sullivan Acked-by: Miroslav Benes Tested-by: Marcos Paulo de Souza Reviewed-by: Marcos Paulo de Souza Reviewed-by: Petr Mladek Acked-by: Joel Savitz Link: https://lore.kernel.org/r/20240606135348.4708-1-rysulliv@redhat.com Signed-off-by: Petr Mladek --- diff --git a/tools/testing/selftests/livepatch/test-syscall.sh b/tools/testing/selftests/livepatch/test-syscall.sh index b76a881d4013..289eb7d4c4b3 100755 --- a/tools/testing/selftests/livepatch/test-syscall.sh +++ b/tools/testing/selftests/livepatch/test-syscall.sh @@ -15,7 +15,10 @@ setup_config start_test "patch getpid syscall while being heavily hammered" -for i in $(seq 1 $(getconf _NPROCESSORS_ONLN)); do +NPROC=$(getconf _NPROCESSORS_ONLN) +MAXPROC=128 + +for i in $(seq 1 $(($NPROC < $MAXPROC ? $NPROC : $MAXPROC))); do ./test_klp-call_getpid & pids[$i]="$!" done