[SRU][J/N][PATCH v2 3/4] selftests/powerpc: Return errors from all tests
Zixing Liu
zixing.liu at canonical.com
Mon Apr 20 03:46:59 UTC 2026
From: Michael Ellerman <mpe at ellerman.id.au>
BugLink: https://bugs.launchpad.net/ubuntu-kernel-tests/+bug/2141536
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 at ellerman.id.au>
(cherry picked from commit c6a75555b4b2643365a007b7162a670d69aa28fe)
Signed-off-by: Zixing Liu <zixing.liu at canonical.com>
---
tools/testing/selftests/powerpc/signal/sigfuz.c | 2 +-
.../testing/selftests/powerpc/tm/tm-signal-context-force-tm.c | 2 +-
tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c | 3 +--
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/powerpc/signal/sigfuz.c b/tools/testing/selftests/powerpc/signal/sigfuz.c
index 08f9afe3b95c..c101b1391696 100644
--- a/tools/testing/selftests/powerpc/signal/sigfuz.c
+++ b/tools/testing/selftests/powerpc/signal/sigfuz.c
@@ -321,5 +321,5 @@ int main(int argc, char **argv)
if (!args)
args = ARG_COMPLETE;
- test_harness(signal_fuzzer, "signal_fuzzer");
+ return test_harness(signal_fuzzer, "signal_fuzzer");
}
diff --git a/tools/testing/selftests/powerpc/tm/tm-signal-context-force-tm.c b/tools/testing/selftests/powerpc/tm/tm-signal-context-force-tm.c
index 421cb082f6be..0a4bc479ae39 100644
--- a/tools/testing/selftests/powerpc/tm/tm-signal-context-force-tm.c
+++ b/tools/testing/selftests/powerpc/tm/tm-signal-context-force-tm.c
@@ -176,5 +176,5 @@ int tm_signal_context_force_tm(void)
int main(int argc, char **argv)
{
- test_harness(tm_signal_context_force_tm, "tm_signal_context_force_tm");
+ return test_harness(tm_signal_context_force_tm, "tm_signal_context_force_tm");
}
diff --git a/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c b/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c
index 06b801906f27..968864b052ec 100644
--- a/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c
+++ b/tools/testing/selftests/powerpc/tm/tm-signal-sigreturn-nt.c
@@ -46,6 +46,5 @@ int tm_signal_sigreturn_nt(void)
int main(int argc, char **argv)
{
- test_harness(tm_signal_sigreturn_nt, "tm_signal_sigreturn_nt");
+ return test_harness(tm_signal_sigreturn_nt, "tm_signal_sigreturn_nt");
}
-
--
2.53.0
More information about the kernel-team
mailing list