]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc/ptrace: Use more interesting values
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 27 Jun 2022 14:02:38 +0000 (00:02 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 25 Jul 2022 02:05:16 +0000 (12:05 +1000)
commit19f3eb9342803e442a4efb5c4a0f396f05e34e23
treedd24cd9097f999e15db917b4ee6050fccbadfc18
parent43ce9c177a4afc70f4b52d26ea18293cf3b97880
selftests/powerpc/ptrace: Use more interesting values

The ptrace-gpr test uses fixed values to test that registers can be
read/written via ptrace. In particular it sets all GPRs to 1, which
means the test could miss some types of bugs - eg. if the kernel was
only returning the low word.

So generate some random values at startup and use those instead.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220627140239.2464900-12-mpe@ellerman.id.au
tools/testing/selftests/powerpc/ptrace/ptrace-gpr.c