aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/051
diff options
context:
space:
mode:
authorBo Tu <tubo@linux.vnet.ibm.com>2016-01-04 13:29:20 +0800
committerMax Reitz <mreitz@redhat.com>2016-01-07 21:30:17 +0100
commitdd87de06fae54c7ac20722a1d617bea7613799da (patch)
treec360de69e022e91e58ab34fcdf5ad19fafba4c6c /tests/qemu-iotests/051
parentf943078e4251c9d6eb38e55ad56fc2e65d47775b (diff)
qemu-iotests: s390x: fix test 051
Replace the remaining "-drive file..." by "-drive file=...,if=none,id=$device_id", then x86 and s390x can get the common output. "if=ide, if=floppy, if=scsi" are not supported by s390x, so these test cases are not executed for s390x platform. Signed-off-by: Bo Tu <tubo@linux.vnet.ibm.com> Message-id: 1451885360-20236-2-git-send-email-tubo@linux.vnet.ibm.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/051')
-rwxr-xr-xtests/qemu-iotests/05132
1 files changed, 19 insertions, 13 deletions
diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051
index 75713c255d..d91f80bb8e 100755
--- a/tests/qemu-iotests/051
+++ b/tests/qemu-iotests/051
@@ -65,6 +65,7 @@ function run_qemu()
}
size=128M
+device_id="drive0"
_make_test_img $size
cp "$TEST_IMG" "$TEST_IMG.orig"
@@ -75,10 +76,10 @@ echo
echo === Unknown option ===
echo
-run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=
-run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=on
-run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=1234
-run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=foo
+run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=,if=none,id=$device_id
+run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=on,if=none,id=$device_id
+run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=1234,if=none,id=$device_id
+run_qemu -drive file="$TEST_IMG",format=qcow2,unknown_opt=foo,if=none,id=$device_id
echo
echo === Unknown protocol option ===
@@ -108,7 +109,7 @@ echo
echo === Overriding backing file ===
echo
-echo "info block" | run_qemu -drive file="$TEST_IMG",driver=qcow2,backing.file.filename="$TEST_IMG.orig" -nodefaults\
+echo "info block" | run_qemu -drive file="$TEST_IMG",driver=qcow2,backing.file.filename="$TEST_IMG.orig",if=none,id=$device_id -nodefaults\
| _filter_generated_node_ids
# Drivers that don't support backing files
@@ -140,13 +141,19 @@ echo
echo === No medium ===
echo
-run_qemu -drive if=floppy
-run_qemu -drive if=ide,media=cdrom
-run_qemu -drive if=scsi,media=cdrom
+case "$QEMU_DEFAULT_MACHINE" in
+ pc)
+ run_qemu -drive if=floppy
+ run_qemu -drive if=ide,media=cdrom
+ run_qemu -drive if=scsi,media=cdrom
+ run_qemu -drive if=ide
+ run_qemu -drive if=scsi
+ ;;
+ *)
+ ;;
+esac
-run_qemu -drive if=ide
run_qemu -drive if=virtio
-run_qemu -drive if=scsi
case "$QEMU_DEFAULT_MACHINE" in
pc)
@@ -171,13 +178,13 @@ case "$QEMU_DEFAULT_MACHINE" in
run_qemu -drive file="$TEST_IMG",if=ide,media=cdrom,readonly=on
run_qemu -drive file="$TEST_IMG",if=scsi,media=cdrom,readonly=on
run_qemu -drive file="$TEST_IMG",if=ide,readonly=on
+ run_qemu -drive file="$TEST_IMG",if=scsi,readonly=on
;;
*)
;;
esac
run_qemu -drive file="$TEST_IMG",if=virtio,readonly=on
-run_qemu -drive file="$TEST_IMG",if=scsi,readonly=on
case "$QEMU_DEFAULT_MACHINE" in
pc)
@@ -211,7 +218,7 @@ run_qemu -drive driver=null-co,cache=invalid_value
for cache in writeback writethrough unsafe invalid_value; do
echo -e "info block\ninfo block file\ninfo block backing\ninfo block backing-file" | \
- run_qemu -drive file="$TEST_IMG",cache=$cache,backing.file.filename="$TEST_IMG.base",backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file -nodefaults
+ run_qemu -drive file="$TEST_IMG",cache=$cache,backing.file.filename="$TEST_IMG.base",backing.cache.no-flush=on,backing.cache.writeback=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=$device_id -nodefaults
done
echo
@@ -277,7 +284,6 @@ echo
$QEMU_IO -c "write -P 0x11 0 4k" "$TEST_IMG" | _filter_qemu_io
-device_id="drive0"
echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG",if=none,id=$device_id -snapshot | _filter_qemu_io
echo "qemu-io $device_id \"write -P 0x22 0 4k\"" | run_qemu -drive file="$TEST_IMG",snapshot=on,if=none,id=$device_id | _filter_qemu_io