]> git.proxmox.com Git - mirror_ubuntu-impish-kernel.git/commitdiff
UBUNTU: SAUCE: kselftest/runner: avoid using timeout if timeout is disabled
authorAndrea Righi <andrea.righi@canonical.com>
Thu, 26 Mar 2020 14:56:19 +0000 (15:56 +0100)
committerAndrea Righi <andrea.righi@canonical.com>
Mon, 28 Jun 2021 06:03:51 +0000 (08:03 +0200)
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@canonical.com>
tools/testing/selftests/kselftest/runner.sh

index cc9c846585f05de2bd6670dc64931ab3f553d351..873b04d7e6422b0a5a5c0156a74d32e8b1d80f52 100644 (file)
@@ -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 --foreground "$kselftest_timeout" "$1"
        else
                "$1"