selftests: allow runners to override the timeout
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 14 Apr 2023 19:38:45 +0000 (12:38 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 12 Jun 2023 22:39:11 +0000 (16:39 -0600)
commitf6a01213e3f812b645cd1079167bf47fc45bb0c8
treefbab39f3da59feb4cdc57510ac5fd5cad93fb7af
parent1977ecea8c75547a35fdab8827937eb2dc6048be
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>
Documentation/dev-tools/kselftest.rst
tools/testing/selftests/kselftest/runner.sh
tools/testing/selftests/run_kselftest.sh