[PATCH 1/2] [E] UBUNTU: SAUCE: kselftest/runner: avoid using timeout if timeout is disabled
Andrea Righi
andrea.righi at canonical.com
Fri Apr 10 10:55:17 UTC 2020
Avoid using /usr/bin/timeout unnecessarily if timeout is set to 0 in the
"settings" file for a specific test.
NOTE: this change prevents a syscall_restart failure in the seccomp
kselftest.
BugLink: https://bugs.launchpad.net/bugs/1870543
Signed-off-by: Andrea Righi <andrea.righi at canonical.com>
---
tools/testing/selftests/kselftest/runner.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index e84d901f8567..2cd3c8def0f6 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -32,7 +32,7 @@ tap_prefix()
tap_timeout()
{
# Make sure tests will time out if utility is available.
- if [ -x /usr/bin/timeout ] ; then
+ if [ -x /usr/bin/timeout ] && [ $kselftest_timeout -gt 0 ] ; then
/usr/bin/timeout "$kselftest_timeout" "$1"
else
"$1"
--
2.25.1
More information about the kernel-team
mailing list