xfstests: fsx IO_URING test cases
cover xfstests: fsx IO_URING test cases
This patchset bases on https://patchwork.kernel.org/cover/11769847/, which makes xfstests fsstress and fsx supports IO_URING.
The io_uring IOs in fsstress will be run automatically when fsstress get running. But fsx need a special option '-U' to run IO_URING read/write, so add two new cases to xfstests to do fsx buffered and direct IO IO_URING test.
[1/3] new helper to require io_uring feature
[2/3] fsx buffered IO io_uring test
[3/3] fsx direct IO io_uring test
And the [2/3] just found an io_uring regression bug (need LVM TEST_DEV):
https://bugzilla.kernel.org/show_bug.cgi?id=209243
Feel free to tell me, if you have more suggestions to test io_uring on filesystem.
Thanks,
Zorro
PATCH 1/3 src/feature: add IO_URING feature checking
IO_URING is a new feature for GNU/Linux system, if someone case of xfstests tests this feature, better to check if current system supports it, or need _notrun.
--- src/Makefile | 4 ++++ src/feature.c | 41 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-)
src/Makefile +4 -0
@@ -65,6 +65,10 @@ SUBDIRS += aio-dio-regress LLDLIBS += -laio endif +ifeq ($(HAVE_URING), true) +LLDLIBS += -luring +endif + CFILES = $(TARGETS:=.c) LDIRT = $(TARGETS) fssum
src/feature.c +38 -3
95 lines not on this page · raw message
Signature · 1 line
2.25.4
PATCH 2/3 generic: fsx IO_URING soak tests
In reply to Zorro LangAfter fsx supports IO_URING read/write, add a test to do IO_URING soak test of fsx.
--- common/rc | 16 ++++++++++++ tests/generic/613 | 59 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/613.out | 2 ++ tests/generic/group | 1 + 4 files changed, 78 insertions(+) create mode 100755 tests/generic/613 create mode 100644 tests/generic/613.out
common/rc +16 -0
@@ -1984,6 +1984,22 @@ _require_aiodio() _require_odirect } +# this test requires that the kernel supports IO_URING +_require_io_uring() +{ + $here/src/feature -R + case $? in + 0) + ;; + 1) + _notrun "kernel does not support IO_URING" + ;; + *) + _fail "unexpected error testing for IO_URING support" + ;; + esac +} + # this test requires that a test program exists under src/ # $1 - command (require) #
tests/generic/613 new file +59 -0
59 lines not on this page · raw message
tests/generic/613.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 613 +Silence is golden
tests/generic/group +1 -0
@@ -611,3 +611,4 @@ 606 auto attr quick dax 607 auto attr quick dax 608 auto attr quick dax +613 auto rw io_uring
Signature · 1 line
2.25.4
PATCH 3/3 generic: fsx IO_URING direct-IO soak tests
In reply to Zorro LangAfter fsx supports IO_URING read/write, add a test to do IO_URING direct-IO test by fsx
--- tests/generic/614 | 65 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/614.out | 2 ++ tests/generic/group | 1 + 3 files changed, 68 insertions(+) create mode 100755 tests/generic/614 create mode 100644 tests/generic/614.out
tests/generic/614 new file +65 -0
@@ -0,0 +1,65 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2020 Red Hat Inc. All Rights Reserved. +# +# FS QA Test No. 614 +# +# IO_URING soak direct-IO fsx test, copy from generic/521 but reduce the number +# fsx ops to limit the testing time to be an auto group test. +# +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# remove previous $seqres.full before test +rm -f $seqres.full + +# real QA test starts here + +# Modify as appropriate. +_supported_fs generic +_supported_os Linux +_require_test +_require_odirect +_require_io_uring + +# Run fsx for 20 thousand ops or more +nr_ops=$((20000 * TIME_FACTOR)) +op_sz=$((128000 * LOAD_FACTOR)) +file_sz=$((600000 * LOAD_FACTOR)) +fsx_file=$TEST_DIR/fsx.$seq +min_dio_sz=$(_min_dio_alignment) + +fsx_args=(-S 0) +fsx_args+=(-U) +fsx_args+=(-q) +fsx_args+=(-N $nr_ops) +fsx_args+=(-p $((nr_ops / 100))) +fsx_args+=(-o $op_sz) +fsx_args+=(-l $file_sz) +fsx_args+=(-r $min_dio_sz) +fsx_args+=(-t $min_dio_sz) +fsx_args+=(-w $min_dio_sz) +fsx_args+=(-Z) + +run_fsx "${fsx_args[@]}" | sed -e '/^fsx.*/d' + +# success, all done +echo "Silence is golden" +status=0 +exit
tests/generic/614.out new file +2 -0
@@ -0,0 +1,2 @@ +QA output created by 614 +Silence is golden
tests/generic/group +1 -0
@@ -612,3 +612,4 @@ 607 auto attr quick dax 608 auto attr quick dax 613 auto rw io_uring +614 auto rw io_uring
Signature · 1 line
2.25.4