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)
commitc5a814cc992002c36fa5b7db5fbd55efb7430386
treedd24cd9097f999e15db917b4ee6050fccbadfc18
parent7b1513d02edf4a6334618070641f47abbbef0cef
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