diff options
author | Ryan Sullivan <rysulliv@redhat.com> | 2024-06-06 15:53:48 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2024-06-12 16:56:30 +0200 |
commit | 46edf5d7aed5438078a8b4b1ab4230a41a032dd0 (patch) | |
tree | e14d5031343bfb9b9e240245efa2b5bdb2d31dca /tools/testing/selftests/livepatch | |
parent | Merge tag 'livepatching-for-6.10' of git://git.kernel.org/pub/scm/linux/kerne... (diff) | |
download | linux-46edf5d7aed5438078a8b4b1ab4230a41a032dd0.tar.xz linux-46edf5d7aed5438078a8b4b1ab4230a41a032dd0.zip |
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 <cki-project@redhat.com>
Signed-off-by: Ryan Sullivan <rysulliv@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Tested-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Acked-by: Joel Savitz <jsavitz@redhat.com>
Link: https://lore.kernel.org/r/20240606135348.4708-1-rysulliv@redhat.com
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'tools/testing/selftests/livepatch')
-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 |