]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
Clarify difference between QUICK and TIMED
authorOmar Sandoval <osandov@fb.com>
Fri, 27 Apr 2018 00:12:55 +0000 (17:12 -0700)
committerOmar Sandoval <osandov@fb.com>
Fri, 27 Apr 2018 00:12:55 +0000 (17:12 -0700)
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 <osandov@fb.com>
check
new

diff --git a/check b/check
index 19f5456118c85ea87d617cf2f9b0b23948bda636..08d02137d0efb7f728bb04f49bfaedbdcd15dd2c 100755 (executable)
--- 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 a62bcb7a15d80ced545bf9d4a46e73b1404ab14e..923d6b7379861763c38f3a0188a62d4d46958b70 100755 (executable)
--- 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