kselftest/arm64: Log the PIDs of the parent and child in sve-ptrace
PATCH 1/1 kselftest/arm64: Log the PIDs of the parent and child in sve-ptrace
If the test triggers a problem it may well result in a log message from the kernel such as a WARN() or BUG(). If these include a PID it can help with debugging to know if it was the parent or child process that triggered the issue, since the test is just creating a new thread the process name will be the same either way. Print the PIDs of the parent and child on startup so users have this information to hand should it be needed.
--- tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 ++ 1 file changed, 2 insertions(+)
tools/testing/selftests/arm64/fp/sve-ptrace.c +2 -0
@@ -487,6 +487,8 @@ static int do_parent(pid_t child)unsigned int vq, vl;bool vl_supported; +ksft_print_msg ("Parent is %d, child is %d\n" ,getpid (), child); +/* Attach to the child */ while (1 ) {int sig;
Signature · 1 line
2.30.2
Quoted 18 lines · Mark Brown
If the test triggers a problem it may well result in a log message from the kernel such as a
WARN()orBUG(). If these include a PID it can help with debugging to know if it was the parent or child process that triggered the issue, since the test is just creating a new thread the process name will be the same either way. Print the PIDs of the parent and child on startup so users have this information to hand should it be needed.Signed-off-by Mark Brown <[email protected]>--- tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 ++ 1 file changed, 2 insertions(+)tools/testing/selftests/arm64/fp/sve-ptrace.c +0
-0
tools/testing/selftests/arm64/fp/sve-ptrace.c static int do_parent(pid_t child) · line 494
Quoted 8 lines
tools/testing/selftests/arm64/fp/sve-ptrace.c +2
-0@@ -487,6 +487,8 @@ static int do_parent(pid_t child)unsigned int vq, vl;bool vl_supported; +ksft_print_msg ("Parent is %d, child is %d\n" ,getpid (), child); +/* Attach to the child */ while (1 ) {int sig;
Nice addition. Thanks for the patch.
thanks,
-- Shuah
Will Deacon
maintainerQuoted 8 lines · Mark Brown
If the test triggers a problem it may well result in a log message from the kernel such as a
WARN()orBUG(). If these include a PID it can help with debugging to know if it was the parent or child process that triggered the issue, since the test is just creating a new thread the process name will be the same either way. Print the PIDs of the parent and child on startup so users have this information to hand should it be needed.[...]
Applied to arm64 (for-next/kselftest), thanks!
[1/1] kselftest/arm64: Log the PIDs of the parent and child in sve-ptrace
https://git.kernel.org/arm64/c/e2dc49ef6c6b
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev