selftests/powerpc: Fix exit status of pkey tests
authorSandipan Das <sandipan@linux.ibm.com>
Mon, 18 Jan 2021 09:31:45 +0000 (15:01 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jan 2021 10:55:21 +0000 (11:55 +0100)
commit7e2bf98d534f4c55763168e446b349c725c5a1de
treebdc8348bdbe15398818f4fc46a6652bf4d1cccf2
parent55c869b1324f49890d2c3898b9b473e71acfa893
selftests/powerpc: Fix exit status of pkey tests

commit 92a5e1fdb286851d5bd0eb966b8d075be27cf5ee upstream.

Since main() does not return a value explicitly, the
return values from FAIL_IF() conditions are ignored
and the tests can still pass irrespective of failures.
This makes sure that we always explicitly return the
correct test exit status.

Fixes: 1addb6444791 ("selftests/powerpc: Add test for execute-disabled pkeys")
Fixes: c27f2fd1705a ("selftests/powerpc: Add test for pkey siginfo verification")
Reported-by: Eirik Fuller <efuller@redhat.com>
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210118093145.10134-1-sandipan@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/selftests/powerpc/mm/pkey_exec_prot.c
tools/testing/selftests/powerpc/mm/pkey_siginfo.c