]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/kselftest/runner.sh: Add 45 second timeout per test
authorKees Cook <keescook@chromium.org>
Thu, 19 Sep 2019 18:06:44 +0000 (11:06 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Tue, 1 Oct 2019 19:33:28 +0000 (13:33 -0600)
commitab69fa1f21e997b6eebbee3cfc626c6433cd9d5f
tree8222cc49a8994be03006e4ae53f1cea8d942ea30
parent05f83a6cebe12fff19a200b55e25e82e66d8c1d5
selftests/kselftest/runner.sh: Add 45 second timeout per test

Commit 75be0ea653bb ("selftests/harness: Add 30 second timeout per
test") solves the problem of kselftest_harness.h-using binary tests
possibly hanging forever. However, scripts and other binaries can still
hang forever. This adds a global timeout to each test script run.

To make this configurable (e.g. as needed in the "rtc" test case),
include a new per-test-directory "settings" file (similar to "config")
that can contain kselftest-specific settings. The first recognized field
is "timeout".

Additionally, this splits the reporting for timeouts into a specific
"TIMEOUT" not-ok (and adds exit code reporting in the remaining case).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/kselftest/runner.sh
tools/testing/selftests/rtc/settings [new file with mode: 0644]