diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-14 21:38:45 +0200 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-06-13 00:39:11 +0200 |
commit | f6a01213e3f812b645cd1079167bf47fc45bb0c8 (patch) | |
tree | fbab39f3da59feb4cdc57510ac5fd5cad93fb7af /tools/testing/selftests/run_kselftest.sh | |
parent | selftests/ftrace: Add new test case which checks for optimized probes (diff) | |
download | linux-f6a01213e3f812b645cd1079167bf47fc45bb0c8.tar.xz linux-f6a01213e3f812b645cd1079167bf47fc45bb0c8.zip |
selftests: allow runners to override the timeout
The default timeout for selftests tests is 45 seconds. Although
we already have 13 settings for tests of about 96 sefltests which
use a timeout greater than this, we want to try to avoid encouraging
more tests to forcing a higher test timeout as selftests strives to
run all tests quickly. Selftests also uses the timeout as a non-fatal
error. Only tests runners which have control over a system would know
if to treat a timeout as fatal or not.
To help with all this:
o Enhance documentation to avoid future increases of insane timeouts
o Add the option to allow overriding the default timeout with test
runners with a command line option
Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by:Muhammad Usama Anjum <usama.anjum@collabora.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/testing/selftests/run_kselftest.sh')
-rwxr-xr-x | tools/testing/selftests/run_kselftest.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests/run_kselftest.sh index 97165a83df63..9a981b36bd7f 100755 --- a/tools/testing/selftests/run_kselftest.sh +++ b/tools/testing/selftests/run_kselftest.sh @@ -26,6 +26,7 @@ Usage: $0 [OPTIONS] -l | --list List the available collection:test entries -d | --dry-run Don't actually run any tests -h | --help Show this usage info + -o | --override-timeout Number of seconds after which we timeout EOF exit $1 } @@ -33,6 +34,7 @@ EOF COLLECTIONS="" TESTS="" dryrun="" +kselftest_override_timeout="" while true; do case "$1" in -s | --summary) @@ -51,6 +53,9 @@ while true; do -d | --dry-run) dryrun="echo" shift ;; + -o | --override-timeout) + kselftest_override_timeout="$2" + shift 2 ;; -h | --help) usage 0 ;; "") |