[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/9] tests/qemu-iotests: Fix test 033 for running with non-file p
From: |
Thomas Huth |
Subject: |
[PATCH 1/9] tests/qemu-iotests: Fix test 033 for running with non-file protocols |
Date: |
Fri, 15 Mar 2024 12:11:00 +0100 |
When running iotest 033 with the ssh protocol, it fails with:
033 fail [14:48:31] [14:48:41] 10.2s output mismatch
--- /.../tests/qemu-iotests/033.out
+++ /.../tests/qemu-iotests/scratch/qcow2-ssh-033/033.out.bad
@@ -174,6 +174,7 @@
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
wrote 512/512 bytes at offset 2097152
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io: warning: Failed to truncate the tail of the image: ssh driver does
not support shrinking files
read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
We already check for the qcow2 format here, so let's simply also
add a check for the protocol here, too, to only test the truncation
with the file protocol.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qemu-iotests/033 | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/033 b/tests/qemu-iotests/033
index da9133c44b..4bc7a071bd 100755
--- a/tests/qemu-iotests/033
+++ b/tests/qemu-iotests/033
@@ -123,9 +123,9 @@ do_test 512 "write -P 1 0 0x200" "$TEST_IMG" |
_filter_qemu_io
# next L2 table
do_test 512 "write -P 1 $L2_COVERAGE 0x200" "$TEST_IMG" | _filter_qemu_io
-# only interested in qcow2 here; also other formats might respond with
-# "not supported" error message
-if [ $IMGFMT = "qcow2" ]; then
+# only interested in qcow2 with file protocol here; also other formats
+# might respond with "not supported" error message
+if [ $IMGFMT = "qcow2" ] && [ $IMGPROTO = "file" ]; then
do_test 512 "truncate $L2_COVERAGE" "$TEST_IMG" | _filter_qemu_io
fi
--
2.44.0
- [PATCH 0/9] tests/qemu-iotests: Fix running with "check -ssh -qcow2", Thomas Huth, 2024/03/15
- [PATCH 3/9] tests/qemu-iotests: Restrict test 114 to the 'file' protocol, Thomas Huth, 2024/03/15
- [PATCH 1/9] tests/qemu-iotests: Fix test 033 for running with non-file protocols,
Thomas Huth <=
- [PATCH 2/9] tests/qemu-iotests: Restrict test 066 to the 'file' protocol, Thomas Huth, 2024/03/15
- [PATCH 5/9] tests/qemu-iotests: Restrict test 134 and 158 to the 'file' protocol, Thomas Huth, 2024/03/15
- [PATCH 4/9] tests/qemu-iotests: Restrict test 130 to the 'file' protocol, Thomas Huth, 2024/03/15
- [PATCH 6/9] tests/qemu-iotests: Restrict test 156 to the 'file' protocol, Thomas Huth, 2024/03/15
- [PATCH 7/9] tests/qemu-iotests: Restrict tests that use --image-opts to the 'file' protocol, Thomas Huth, 2024/03/15
- [PATCH 9/9] tests/qemu-iotests: Restrict tests using "--blockdev file" to the file protocol, Thomas Huth, 2024/03/15
- [PATCH 8/9] tests/qemu-iotests: Fix some tests that use --image-opts for other protocols, Thomas Huth, 2024/03/15
- Re: [PATCH 0/9] tests/qemu-iotests: Fix running with "check -ssh -qcow2", Kevin Wolf, 2024/03/18