diff options
author | Ryan Sullivan <[email protected]> | 2024-06-06 09:53:48 -0400 |
---|---|---|
committer | Petr Mladek <[email protected]> | 2024-06-12 16:56:30 +0200 |
commit | 46edf5d7aed5438078a8b4b1ab4230a41a032dd0 (patch) | |
tree | e14d5031343bfb9b9e240245efa2b5bdb2d31dca | |
parent | 8c06da67d0bd3139a97f301b4aa9c482b9d4f29e (diff) |
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 <[email protected]>
Signed-off-by: Ryan Sullivan <[email protected]>
Acked-by: Miroslav Benes <[email protected]>
Tested-by: Marcos Paulo de Souza <[email protected]>
Reviewed-by: Marcos Paulo de Souza <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Acked-by: Joel Savitz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Petr Mladek <[email protected]>
-rwxr-xr-x | tools/testing/selftests/livepatch/test-syscall.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 |