From: Omar Sandoval Date: Fri, 27 Apr 2018 00:12:55 +0000 (-0700) Subject: Clarify difference between QUICK and TIMED X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ea6fd05207803f56522bf7cd4a2849857520f2f9;p=users%2Fsagi%2Fblktests.git Clarify difference between QUICK and TIMED Add more documentation for TIMED, make sure QUICK and TIMED can't be combined, and fix a bug where QUICK and TIMED would leak between tests. Signed-off-by: Omar Sandoval --- diff --git a/check b/check index 19f5456..08d0213 100755 --- a/check +++ b/check @@ -21,7 +21,7 @@ _found_test() { local test_name="$1" local explicit="$2" - unset DESCRIPTION requires device_requires test test_device + unset DESCRIPTION QUICK TIMED requires device_requires test test_device if ! . "tests/${test_name}"; then return 1 @@ -47,6 +47,11 @@ _found_test() { return 1 fi + if (( QUICK && TIMED )); then + _warning "${test_name} cannot be both QUICK and TIMED" + return 1 + fi + if (( ! explicit )); then if (( QUICK_RUN && !QUICK && !TIMED )); then return diff --git a/new b/new index a62bcb7..923d6b7 100755 --- a/new +++ b/new @@ -169,6 +169,10 @@ DESCRIPTION="" # QUICK=1 # TODO: if this test honors the configured \$TIMEOUT, uncomment the line below. +# This is for tests that can potentially run for a long time but where it's +# possible to limit the runtime (e.g., with the \`timeout\` command or with +# fio --runtime, which is what the _run_fio helper does). A test shouldn't be +# both QUICK and TIMED. # TIMED=1 # TODO: dmesg is checked for oopses, warnings, etc. after each test run by