Skip to content

Commit 46edf5d

Browse files
ryanbsullpmladek
authored andcommitted
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>
1 parent 8c06da6 commit 46edf5d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools/testing/selftests/livepatch/test-syscall.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ setup_config
1515

1616
start_test "patch getpid syscall while being heavily hammered"
1717

18-
for i in $(seq 1 $(getconf _NPROCESSORS_ONLN)); do
18+
NPROC=$(getconf _NPROCESSORS_ONLN)
19+
MAXPROC=128
20+
21+
for i in $(seq 1 $(($NPROC < $MAXPROC ? $NPROC : $MAXPROC))); do
1922
./test_klp-call_getpid &
2023
pids[$i]="$!"
2124
done

0 commit comments

Comments
 (0)