Many modern Linux distros don't include libaio-dev or libaio-devel
package by default and this leads to libaio ioengine being
unavailable in fio instances built at such systems.
Approximately one third of the test cases in the fio test script for
zoned block devices, t/zbd/test-zbd-support, use libaio ioengine.
In order to allow users to run the entire set of ZBD tests without
libaio, introduce a new command line option, -u, to the test script.
When this option is added to the script command line, all tests that
normally use libaio will be modified to use io_uring ioengine.
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Link: https://lore.kernel.org/r/20221016014309.53682-2-dmitry.fomichev@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
echo -e "\t-t <test #> Run only a single test case with specified number"
echo -e "\t-q Quit the test run after any failed test"
echo -e "\t-z Run fio with debug=zbd option"
+ echo -e "\t-u Use io_uring ioengine in place of libaio"
}
max() {
ioengine() {
if [ -n "$use_libzbc" ]; then
echo -n "--ioengine=libzbc"
+ elif [ "$1" = "libaio" -a -n "$force_io_uring" ]; then
+ echo -n "--ioengine=io_uring"
else
echo -n "--ioengine=$1"
fi
zbd_debug=
max_open_zones_opt=
quit_on_err=
+force_io_uring=
while [ "${1#-}" != "$1" ]; do
case "$1" in
shift;;
-q) quit_on_err=1; shift;;
-z) zbd_debug=1; shift;;
+ -u) force_io_uring=1; shift;;
--) shift; break;;
*) usage; exit 1;;
esac
exit 1
fi
+if [ -n "$use_libzbc" -a -n "$force_io_uring" ]; then
+ echo "Please specify only one of -l and -u options"
+ exit 1
+fi
+
# shellcheck source=functions
source "$(dirname "$0")/functions" || exit $?