Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220303192817.2732509-1-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>

authored by

Mark Brown and committed by
Will Deacon
e2dc49ef 32de73e8

+2
+2
tools/testing/selftests/arm64/fp/sve-ptrace.c
··· 487 487 unsigned int vq, vl; 488 488 bool vl_supported; 489 489 490 + ksft_print_msg("Parent is %d, child is %d\n", getpid(), child); 491 + 490 492 /* Attach to the child */ 491 493 while (1) { 492 494 int sig;