From: Eric Sandeen <sandeen@redhat.com>
To: "fstests@vger.kernel.org" <fstests@vger.kernel.org>
Cc: Jeff Moyer <jmoyer@redhat.com>
Subject: [PATCH] common/rc: explicitly test for engine availability in _require_fio
Date: Wed, 12 Mar 2025 11:48:11 -0500 [thread overview]
Message-ID: <b761e302-8b4e-4a79-b025-d344d7bf5a69@redhat.com> (raw)
The current test in _require_fio (--warnings-fatal --showcmd) does not
fail if an invalid/unavailable io engine is specified.
Add an explicit test that every requested io engine in the job file
is actually available.
Remove the "ioe_e4defrag" entries in ext4 tests - an engine with this
name has seemingly never existed, but in each case later stanzas
overrode the io engine, so it did not cause problems without this
explicit parsing and checking.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/common/rc b/common/rc
index ca755055..c155bb46 100644
--- a/common/rc
+++ b/common/rc
@@ -3983,6 +3983,12 @@ _require_fio()
return 1;
fi
+ # Explicitly check for every ioengine availability
+ for ENGINE in `grep ioengine= $job | awk -F= '{print $2}'; sort`; do
+ fio --enghelp | grep -qw $ENGINE || \
+ _notrun "fio engine $ENGINE not available"
+ done
+
$FIO_PROG --warnings-fatal --showcmd $job >> $seqres.full 2>&1
[ $? -eq 0 ] || _notrun "$FIO_PROG too old, see $seqres.full"
}
diff --git a/tests/ext4/301 b/tests/ext4/301
index abf47d4b..a05b8e8a 100755
--- a/tests/ext4/301
+++ b/tests/ext4/301
@@ -31,7 +31,6 @@ FILE_SIZE=$((BLK_DEV_SIZE * (512 / (2 + 1))))
cat >$fio_config <<EOF
# Common e4defrag regression tests
[global]
-ioengine=ioe_e4defrag
iodepth=1
directory=${SCRATCH_MNT}
filesize=${FILE_SIZE}
diff --git a/tests/ext4/302 b/tests/ext4/302
index 87820184..e0f5f2f9 100755
--- a/tests/ext4/302
+++ b/tests/ext4/302
@@ -31,7 +31,6 @@ FILE_SIZE=$((BLK_DEV_SIZE * (512 / (2 + 1))))
cat >$fio_config <<EOF
# Common e4defrag regression tests
[global]
-ioengine=ioe_e4defrag
iodepth=1
directory=${SCRATCH_MNT}
filesize=${FILE_SIZE}
diff --git a/tests/ext4/303 b/tests/ext4/303
index 2381f047..0a83e86c 100755
--- a/tests/ext4/303
+++ b/tests/ext4/303
@@ -31,7 +31,6 @@ FILE_SIZE=$((BLK_DEV_SIZE * (512 / (3+1))))
cat >$fio_config <<EOF
# Common e4defrag regression tests
[global]
-ioengine=ioe_e4defrag
iodepth=1
directory=${SCRATCH_MNT}
filesize=${FILE_SIZE}
diff --git a/tests/ext4/304 b/tests/ext4/304
index 53b522ee..5f2ae4bd 100755
--- a/tests/ext4/304
+++ b/tests/ext4/304
@@ -32,7 +32,6 @@ FILE_SIZE=$((BLK_DEV_SIZE * (512 / (2 + 1))))
cat >$fio_config <<EOF
# Common e4defrag regression tests
[global]
-ioengine=ioe_e4defrag
iodepth=1
directory=${SCRATCH_MNT}
filesize=${FILE_SIZE}
next reply other threads:[~2025-03-12 16:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-12 16:48 Eric Sandeen [this message]
2025-03-14 14:36 ` [PATCH] common/rc: explicitly test for engine availability in _require_fio Zorro Lang
2025-03-14 14:39 ` Eric Sandeen
-- strict thread matches above, loose matches on Subject: below --
2025-03-18 10:08 Zorro Lang
2025-03-18 13:23 ` Zorro Lang
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=b761e302-8b4e-4a79-b025-d344d7bf5a69@redhat.com \
--to=sandeen@redhat.com \
--cc=fstests@vger.kernel.org \
--cc=jmoyer@redhat.com \
/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