aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2023-12-28 22:52:20 -0600
committerTheodore Ts'o <tytso@mit.edu>2023-12-28 22:52:20 -0600
commitce2e424b6cf0b99591372e49d0bca2b23e8c2151 (patch)
tree5571c83b10125dff1c346ee579dfc96b7e41d733
parent232ecf585839b949039dd9eb2405ec9f218da721 (diff)
downloadxfstests-bld-ce2e424b6cf0b99591372e49d0bca2b23e8c2151.tar.gz
kvm-xfstests: teach --aio and --cache the value "default"
The value "default" suppresses the explicit specification of the aio and cache paramters for the storage devices. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rwxr-xr-xrun-fstests/kvm-xfstests24
-rw-r--r--run-fstests/util/parse_cli9
2 files changed, 24 insertions, 9 deletions
diff --git a/run-fstests/kvm-xfstests b/run-fstests/kvm-xfstests
index 2df74c15..6b1ded75 100755
--- a/run-fstests/kvm-xfstests
+++ b/run-fstests/kvm-xfstests
@@ -212,18 +212,26 @@ case "$ARCH" in
esac
QEMU="qemu-system-$QEMU_ARCH"
+if test "$CACHE" != "none" ; then
+ AIO=
+fi
+
+if test -n "$CACHE" ; then
+ CACHE="cache=$CACHE,"
+fi
+
$NO_ACTION $IONICE $QEMU -boot order=c $NET \
-machine $MACHINE_TYPE,accel=$ACCEL -cpu $CPU_TYPE \
-drive file=$ROOT_FS,if=virtio$SNAPSHOT \
- -drive file=$VDB,cache=$CACHE,if=virtio,format=raw$AIO \
- -drive file=$VDC,cache=$CACHE,if=virtio,format=raw$AIO \
- -drive file=$VDD,cache=$CACHE,if=virtio,format=raw$AIO \
- -drive file=$VDE,cache=$CACHE,if=virtio,format=raw$AIO \
- -drive file=$VDF,cache=$CACHE,if=virtio,format=raw$AIO \
- -drive file=$VDG,cache=none,if=virtio,format=raw$AIO \
+ -drive file=$VDB,${CACHE}if=virtio,format=raw$AIO \
+ -drive file=$VDC,${CACHE}if=virtio,format=raw$AIO \
+ -drive file=$VDD,${CACHE}if=virtio,format=raw$AIO \
+ -drive file=$VDE,${CACHE}if=virtio,format=raw$AIO \
+ -drive file=$VDF,${CACHE}if=virtio,format=raw$AIO \
+ -drive file=$VDG,${CACHE}if=virtio,format=raw$AIO \
-drive file=$VDH,if=virtio,format=raw \
- -drive file=$VDI,cache=$CACHE,if=virtio,format=raw$AIO \
- -drive file=$VDJ,cache=$CACHE,if=virtio,format=raw$AIO \
+ -drive file=$VDI,${CACHE}if=virtio,format=raw$AIO \
+ -drive file=$VDJ,${CACHE}if=virtio,format=raw$AIO \
-vga none -nographic -smp $NR_CPU -m $MEM \
$VIRTFS \
$VIRTIO_RNG \
diff --git a/run-fstests/util/parse_cli b/run-fstests/util/parse_cli
index c7e133fc..bcf39f50 100644
--- a/run-fstests/util/parse_cli
+++ b/run-fstests/util/parse_cli
@@ -746,11 +746,18 @@ while (( $# >= 1 )); do
;;
--aio) shift
supported_flavors kvm
- AIO=",aio=$1"
+ if test "$1" = "default" ; then
+ AIO=
+ else
+ AIO=",aio=$1"
+ fi
;;
--cache) shift
supported_flavors kvm
CACHE="$1"
+ if test "$CACHE" = "default" ; then
+ CACHE=
+ fi
;;
--virtfs) shift
supported_flavors kvm