hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/testing/selftests/powerpc/harness.c
....@@ -1,6 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright 2013, Michael Ellerman, IBM Corp.
3
- * Licensed under GPLv2.
44 */
55
66 #include <errno.h>
....@@ -21,6 +21,7 @@
2121
2222 #define KILL_TIMEOUT 5
2323
24
+/* Setting timeout to -1 disables the alarm */
2425 static uint64_t timeout = 120;
2526
2627 int run_test(int (test_function)(void), char *name)
....@@ -43,8 +44,9 @@
4344
4445 setpgid(pid, pid);
4546
46
- /* Wake us up in timeout seconds */
47
- alarm(timeout);
47
+ if (timeout != -1)
48
+ /* Wake us up in timeout seconds */
49
+ alarm(timeout);
4850 terminated = false;
4951
5052 wait: