Skip to content

Commit

Permalink
selftests/powerpc: Fix exit status of pkey tests
Browse files Browse the repository at this point in the history
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: 1addb64 ("selftests/powerpc: Add test for execute-disabled pkeys")
Fixes: c27f2fd ("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
  • Loading branch information
Sandipan Das authored and Michael Ellerman committed Jan 18, 2021
1 parent 41131a5 commit 92a5e1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/testing/selftests/powerpc/mm/pkey_exec_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,5 @@ static int test(void)

int main(void)
{
test_harness(test, "pkey_exec_prot");
return test_harness(test, "pkey_exec_prot");
}
2 changes: 1 addition & 1 deletion tools/testing/selftests/powerpc/mm/pkey_siginfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,5 +329,5 @@ static int test(void)

int main(void)
{
test_harness(test, "pkey_siginfo");
return test_harness(test, "pkey_siginfo");
}

0 comments on commit 92a5e1f

Please sign in to comment.