]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Fix eeh-basic.sh exit codes
authorOliver O'Halloran <oohall@gmail.com>
Wed, 14 Oct 2020 02:47:11 +0000 (13:47 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 14 Oct 2020 11:03:39 +0000 (22:03 +1100)
commit355cd03cd427ad1770a5ed22c050207cc222044a
treef86c39e363263031f8ff210193f50d98fb36e512
parent94fe9e84d1562c0b7b0aba005eed0433baa36781
selftests/powerpc: Fix eeh-basic.sh exit codes

The kselftests test running infrastructure expects tests to finish with an
exit code of 4 if the test decided it should be skipped. Currently
eeh-basic.sh exits with the number of devices that failed to recover, so if
four devices didn't recover we'll report a skip instead of a fail.

Fix this by checking if the return code is non-zero and report success
and failure by returning 0 or 1 respectively. For the cases where should
actually skip return 4.

Fixes: 6a2544c42be7 ("selftests/powerpc: Add basic EEH selftest")
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20201014024711.1138386-1-oohall@gmail.com
tools/testing/selftests/powerpc/eeh/eeh-basic.sh