Skip to contentSkip to conversation

xfstests: new io_uring fsx test

PATCH New Zorro Lang 1 participant 4 messages Sep 16, 2020 io_uring

lore
Share & tools
lore
author
#3 lore raw

PATCH 3/3 generic: IO_URING direct IO fsx test

In reply to Zorro Lang

After fsx supports IO_URING read/write, add IO_URING direct IO fsx test with different read/write size and concurrent buffered IO.

---
 tests/generic/610     | 52 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/610.out |  7 ++++++
 tests/generic/group   |  1 +
 3 files changed, 60 insertions(+)
 create mode 100755 tests/generic/610
 create mode 100644 tests/generic/610.out
tests/generic/610 new file +52 -0
new file mode 100755
index 00000000..fc3f4c2a
@@ -0,0 +1,52 @@
+#! /bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2020 YOUR NAME HERE.  All Rights Reserved.
+#
+# FS QA Test 610
+#
+# IO_URING direct IO fsx 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
+_supported_fs generic
+_supported_os Linux
+_require_test
+_require_odirect
+_require_io_uring
+
+psize=`$here/src/feature -s`
+bsize=`_min_dio_alignment $TEST_DEV`
+run_fsx -S 0 -U -N 20000           -l 600000 -r PSIZE -w BSIZE -Z -R -W
+run_fsx -S 0 -U -N 20000 -o 8192   -l 600000 -r PSIZE -w BSIZE -Z -R -W
+run_fsx -S 0 -U -N 20000 -o 128000 -l 600000 -r PSIZE -w BSIZE -Z -R -W
+
+# change readbdy/writebdy to double page size
+psize=$((psize * 2))
+run_fsx -S 0 -U -N 20000           -l 600000 -r PSIZE -w PSIZE -Z -R -W
+run_fsx -S 0 -U -N 20000 -o 256000 -l 600000 -r PSIZE -w PSIZE -Z -R -W
+run_fsx -S 0 -U -N 20000 -o 128000 -l 600000 -r PSIZE -w BSIZE -Z -W
+
+# success, all done
+status=0
+exit
tests/generic/610.out new file +7 -0
new file mode 100644
index 00000000..97ad41a3
@@ -0,0 +1,7 @@
+QA output created by 610
+fsx -S 0 -U -N 20000 -l 600000 -r PSIZE -w BSIZE -Z -R -W
+fsx -S 0 -U -N 20000 -o 8192 -l 600000 -r PSIZE -w BSIZE -Z -R -W
+fsx -S 0 -U -N 20000 -o 128000 -l 600000 -r PSIZE -w BSIZE -Z -R -W
+fsx -S 0 -U -N 20000 -l 600000 -r PSIZE -w PSIZE -Z -R -W
+fsx -S 0 -U -N 20000 -o 256000 -l 600000 -r PSIZE -w PSIZE -Z -R -W
+fsx -S 0 -U -N 20000 -o 128000 -l 600000 -r PSIZE -w BSIZE -Z -W
tests/generic/group +1 -0
index cf50f4a1..60280dc2 100644
@@ -612,3 +612,4 @@
 607 auto attr quick dax
 608 auto attr quick dax
 609 auto rw io_uring
+610 auto rw io_uring
Signature · 1 line
2.20.1
author
#1 lore raw

PATCH 1/3 src/feature: add IO_URING feature checking

In reply to Zorro Lang

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
index 643c1916..f1422c5c 100644
@@ -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.20.1

Zorro Lang

author
#0 lore raw

cover xfstests: new io_uring fsx test

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

author
#2 lore raw

PATCH 2/3 generic: fsx IO_URING soak tests

After fsx supports IO_URING read/write, add a test to do IO_URING soak test of fsx.

---
 common/rc             | 16 ++++++++++++
 tests/generic/609     | 58 +++++++++++++++++++++++++++++++++++++++++++
 tests/generic/609.out |  2 ++
 tests/generic/group   |  1 +
 4 files changed, 77 insertions(+)
 create mode 100755 tests/generic/609
 create mode 100644 tests/generic/609.out
common/rc +16 -0
index aa5a7409..b6b39eba 100644
@@ -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/609 new file +58 -0

58 lines not on this page · raw message

tests/generic/609.out new file +2 -0
new file mode 100644
index 00000000..0d75b384
@@ -0,0 +1,2 @@
+QA output created by 609
+Silence is golden
tests/generic/group +1 -0
index aa969bcb..cf50f4a1 100644
@@ -611,3 +611,4 @@
 606 auto attr quick dax
 607 auto attr quick dax
 608 auto attr quick dax
+609 auto rw io_uring
Signature · 1 line
2.20.1