Skip to content

Commit c6a7555

Browse files
committed
selftests/powerpc: Return errors from all tests
Fix some tests which weren't returning an error code from main. Although these tests only ever return success, they can still fail if they time out and the harness kills them. If that happens they still return success to the shell, which is incorrect and confuses the higher level error reporting. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://patch.msgid.link/20241106130453.1741013-4-mpe@ellerman.id.au
1 parent d5f578f commit c6a7555

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

tools/testing/selftests/powerpc/signal/sigfuz.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,5 +321,5 @@ int main(int argc, char **argv)
321321
if (!args)
322322
args = ARG_COMPLETE;
323323

324-
test_harness(signal_fuzzer, "signal_fuzzer");
324+
return test_harness(signal_fuzzer, "signal_fuzzer");
325325
}

tools/testing/selftests/powerpc/tm/tm-signal-context-force-tm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@ int tm_signal_context_force_tm(void)
176176

177177
int main(int argc, char **argv)
178178
{
179-
test_harness(tm_signal_context_force_tm, "tm_signal_context_force_tm");
179+
return test_harness(tm_signal_context_force_tm, "tm_signal_context_force_tm");
180180
}

tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,5 @@ int tm_signal_sigreturn_nt(void)
4646

4747
int main(int argc, char **argv)
4848
{
49-
test_harness(tm_signal_sigreturn_nt, "tm_signal_sigreturn_nt");
49+
return test_harness(tm_signal_sigreturn_nt, "tm_signal_sigreturn_nt");
5050
}
51-

0 commit comments

Comments
 (0)