tools/testing/selftests/livepatch: define max test-syscall processes
Subsystems (2)
PATCH 1/1 tools/testing/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.
--- tools/testing/selftests/livepatch/test-syscall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/test-syscall.sh +4 -1
@@ -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
Signature · 1 line
2.44.0
From: [email protected]
Quoted 4 lines · On Wed, 29 May 2024 16:19:41 -0400 Ryan Sullivan <[email protected]> wrote:
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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.
I believe that 128 threads hammering getpid is good enough :)
Quoted 25 lines
Reported-by CKI Project <[email protected]>Signed-off-by Ryan Sullivan <[email protected]>--- tools/testing/selftests/livepatch/test-syscall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)tools/testing/selftests/livepatch/test-syscall.sh +4
-1@@ -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]="$!" doneSignature · 1 line
2.44.0
Quoted 7 lines · Ryan Sullivan
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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]>
Looks reasonable.
Best Regards,
Petr
PS: I am going to queue it for 6.11. I will add it into
a pull request for 6.10-rcX if there will be another more critical fix which would need such a pull request.
Hi,
Quoted 7 lines · Ryan Sullivan
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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]>
a nit: we usually use just "selftests/livepatch:" prefix in Subject.
M
PATCH 1/1 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.
--- tools/testing/selftests/livepatch/test-syscall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/testing/selftests/livepatch/test-syscall.sh +4 -1
@@ -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
Signature · 1 line
2.44.0
Re: [PATCH] selftests/livepatch: define max test-syscall processes
Quoted 29 lines · Ryan Sullivan
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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]>--- tools/testing/selftests/livepatch/test-syscall.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)tools/testing/selftests/livepatch/test-syscall.sh +4
-2@@ -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 --
Quoted 3 lines
2.44.0
Re: [PATCH] selftests/livepatch: define max test-syscall processes
In reply to Ryan SullivanQuoted 7 lines · Ryan Sullivan
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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]>
Hi Ryan,
is this the same patch that you sent on ? I couldn't spot any changes, and you also didn't tagged a different version for this patch.
Quoted 21 lines
---
tools/testing/selftests/livepatch/test-syscall.sh | 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)tools/testing/selftests/livepatch/test-syscall.sh +0
-0@@ -15,7 +15,10 @@ setup_config
start_test "patch getpid syscall while being heavily hammered"tools/testing/selftests/livepatch/test-syscall.sh +4
-1-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
Re: [PATCH] selftests/livepatch: define max test-syscall processes
In reply to Ryan SullivanQuoted 7 lines · Ryan Sullivan
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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]>
M
Petr Mladek
maintainerRe: [PATCH] selftests/livepatch: define max test-syscall processes
In reply to Ryan SullivanQuoted 7 lines · Ryan Sullivan
Define a maximum allowable number of pids that can be livepatched in
test-syscall.shas 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]>
JFYI, the patch has been committed into livepatching.git, branch for-6.11.
Best Regards,
Petr