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 <[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]>
1 parent 8c06da6 commit 46edf5d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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)