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>
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
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
# 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