aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/harness.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/testing/selftests/powerpc/harness.c')
-rw-r--r--tools/testing/selftests/powerpc/harness.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/harness.c b/tools/testing/selftests/powerpc/harness.c
index 9d7166dfad1e..ba89353abfcc 100644
--- a/tools/testing/selftests/powerpc/harness.c
+++ b/tools/testing/selftests/powerpc/harness.c
@@ -21,6 +21,7 @@
#define KILL_TIMEOUT 5
+/* Setting timeout to -1 disables the alarm */
static uint64_t timeout = 120;
int run_test(int (test_function)(void), char *name)
@@ -43,8 +44,9 @@ int run_test(int (test_function)(void), char *name)
setpgid(pid, pid);
- /* Wake us up in timeout seconds */
- alarm(timeout);
+ if (timeout != -1)
+ /* Wake us up in timeout seconds */
+ alarm(timeout);
terminated = false;
wait: