From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
Subject: [PATCH 5/7] iotests: add -io_uring support
Date: Tue, 25 Jul 2023 10:19:13 -0400 [thread overview]
Message-ID: <20230725141915.386364-6-stefanha@redhat.com> (raw)
In-Reply-To: <20230725141915.386364-1-stefanha@redhat.com>
The libblkio-based io_uring block driver currently has no test coverage.
Running existing qemu-iotests with io_uring is possible with just a few
tweaks.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
tests/qemu-iotests/033 | 1 +
tests/qemu-iotests/check | 2 +-
tests/qemu-iotests/common.rc | 12 +++++++++++-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
index da9133c44b..a32af9942f 100755
--- a/tests/qemu-iotests/033
+++ b/tests/qemu-iotests/033
@@ -39,6 +39,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
_supported_fmt generic
_supported_proto generic
+_unsupported_proto io_uring # libblkio 1.3.0 does not support write_zeroes with FUA
_unsupported_imgopts "subformat=streamOptimized"
diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check
index f2e9d27dcf..7a3368b768 100755
--- a/tests/qemu-iotests/check
+++ b/tests/qemu-iotests/check
@@ -94,7 +94,7 @@ def make_argparser() -> argparse.ArgumentParser:
mg.add_argument('-' + fmt, dest='imgfmt', action='store_const',
const=fmt, help=f'test {fmt}')
- protocol_list = ['file', 'rbd', 'nbd', 'ssh', 'nfs', 'fuse']
+ protocol_list = ['file', 'rbd', 'nbd', 'ssh', 'nfs', 'fuse', 'io_uring']
g_prt = p.add_argument_group(
' image protocol options',
'The following options set the IMGPROTO environment variable. '
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index d145f08201..da4b972ebd 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -290,6 +290,9 @@ if [ "$IMGOPTSSYNTAX" = "true" ]; then
elif [ "$IMGPROTO" = "fuse" ]; then
TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
TEST_IMG="$DRIVER,file.filename=$SOCK_DIR/fuse-t.$IMGFMT"
+ elif [ "$IMGPROTO" = "io_uring" ]; then
+ TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
+ TEST_IMG="$DRIVER,file.driver=$IMGPROTO,file.filename=$TEST_DIR/t.$IMGFMT"
elif [ "$IMGPROTO" = "ssh" ]; then
TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
TEST_IMG="$DRIVER,file.driver=ssh,file.host=127.0.0.1,file.path=$TEST_IMG_FILE"
@@ -309,6 +312,9 @@ else
elif [ "$IMGPROTO" = "fuse" ]; then
TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
TEST_IMG="$SOCK_DIR/fuse-t.$IMGFMT"
+ elif [ "$IMGPROTO" = "io_uring" ]; then
+ TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
+ TEST_IMG=io_uring:$TEST_DIR/t.$IMGFMT
elif [ "$IMGPROTO" = "ssh" ]; then
TEST_IMG_FILE=$TEST_DIR/t.$IMGFMT
REMOTE_TEST_DIR="ssh://\\($USER@\\)\\?127.0.0.1\\(:[0-9]\\+\\)\\?$TEST_DIR"
@@ -400,6 +406,10 @@ _test_img_to_test_img_file()
echo "$1" | sed -e "s#$SOCK_DIR/fuse-#$TEST_DIR/#"
;;
+ io_uring)
+ echo "$1" | sed -e "s#io_uring:##"
+ ;;
+
nfs)
echo "$1" | sed -e "s#nfs://127.0.0.1##"
;;
@@ -653,7 +663,7 @@ _cleanup_test_img()
FUSE_EXPORTS=()
;;
- file)
+ file|io_uring)
_rm_test_img "$TEST_DIR/t.$IMGFMT"
_rm_test_img "$TEST_DIR/t.$IMGFMT.orig"
_rm_test_img "$TEST_DIR/t.$IMGFMT.base"
--
2.41.0
next prev parent reply other threads:[~2023-07-25 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 14:19 [PATCH 0/7] iotests: add -io_uring support Stefan Hajnoczi
2023-07-25 14:19 ` [PATCH 1/7] block/blkio: add io_uring: filename parsing Stefan Hajnoczi
2023-07-25 14:19 ` [PATCH 2/7] block/blkio: add "simple" creation support Stefan Hajnoczi
2023-07-25 14:19 ` [PATCH 3/7] iotests: string substitution order in _filter_img_create_filenames Stefan Hajnoczi
2023-07-25 14:19 ` [PATCH 4/7] iotests: filter img create backing_file when IMGPROTO is modified Stefan Hajnoczi
2023-07-25 14:19 ` Stefan Hajnoczi [this message]
2023-07-25 14:19 ` [PATCH 6/7] iotests: add io_uring to supported protocols in 012 Stefan Hajnoczi
2023-07-25 14:19 ` [PATCH 7/7] iotests: add io_uring to supported protocols in 052 Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230725141915.386364-6-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=hreitz@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).