]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
block/019: use explicit --runtime instead of overriding TIMEOUT
authorOmar Sandoval <osandov@fb.com>
Thu, 26 Apr 2018 23:47:47 +0000 (16:47 -0700)
committerOmar Sandoval <osandov@fb.com>
Thu, 26 Apr 2018 23:51:35 +0000 (16:51 -0700)
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>
common/fio
tests/block/019

index f5787b4a9da096ff5db1c7d28f5f85dbe965cab2..e83258db81f8b298d105617a2b410dc5439265d8 100644 (file)
@@ -157,7 +157,9 @@ _fio_perf() {
 # 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
index 9cea77219b6415967ff33c3723d8940c1af1a849..00830d02b67a838a235a87c5bf81dce37c405804 100755 (executable)
@@ -18,7 +18,7 @@
 # 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
@@ -32,13 +32,11 @@ test_device() {
        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