This is really a QUICK test, not a TIMED test. Use --runtime and
document that _run_fio can handle that.
Signed-off-by: Omar Sandoval <osandov@fb.com>
# Wrapper around fio that handles:
# - Recording perf results
# - $TIMEOUT
-# You should usually use this instead of calling fio directly.
+# You should usually use this instead of calling fio directly. An explicitly
+# passed --runtime will override the configured $TIMEOUT, which is useful for
+# tests that should run for a specific amount of time.
_run_fio() {
local args=("--output=$TMPDIR/fio_perf" "--output-format=terse" "--terse-version=4" "--group_reporting=1")
if [[ -v TIMEOUT ]]; then
# along with this program. If not, see <http://www.gnu.org/licenses/>.
DESCRIPTION="break PCI link device while doing I/O"
-TIMED=1
+QUICK=1
requires() {
_have_fio && _have_program setpci
echo "Running ${TEST_NAME}"
local parent
- local TIMEOUT
parent="$(_get_pci_parent_from_blkdev)"
# start fio job
- TIMEOUT=10
- _run_fio_rand_io --filename="$TEST_DEV" --time_based \
+ _run_fio_rand_io --filename="$TEST_DEV" --time_based --runtime=10 \
--continue_on_error=io 2> /dev/null &
sleep 5