Skip to content

Commit 92a5e1f

Browse files
sandip4nmpe
authored andcommitted
selftests/powerpc: Fix exit status of pkey tests
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
1 parent 41131a5 commit 92a5e1f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tools/testing/selftests/powerpc/mm/pkey_exec_prot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,5 +290,5 @@ static int test(void)
290290

291291
int main(void)
292292
{
293-
test_harness(test, "pkey_exec_prot");
293+
return test_harness(test, "pkey_exec_prot");
294294
}

tools/testing/selftests/powerpc/mm/pkey_siginfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,5 +329,5 @@ static int test(void)
329329

330330
int main(void)
331331
{
332-
test_harness(test, "pkey_siginfo");
332+
return test_harness(test, "pkey_siginfo");
333333
}

0 commit comments

Comments
 (0)