Skip to content

Commit

Permalink
tests/qemu-iotests: Fix output of qemu-io related tests
Browse files Browse the repository at this point in the history
One of the recent commits changed the way qemu-io prints out its
errors and warnings - they are now prefixed with the program name.
We've got to adapt the iotests accordingly to prevent that they
are failing.

Fixes: 99e98d7 ("qemu-io: Use error_[gs]et_progname()")
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
  • Loading branch information
huth authored and kevmw committed Apr 30, 2019
1 parent 22d96ea commit 36b9986
Show file tree
Hide file tree
Showing 26 changed files with 214 additions and 214 deletions.
168 changes: 84 additions & 84 deletions tests/qemu-iotests/026.out

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tests/qemu-iotests/060.out
Expand Up @@ -20,7 +20,7 @@ Format specific information:
lazy refcounts: false
refcount bits: 16
corrupt: true
can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write
qemu-io: can't open device TEST_DIR/t.IMGFMT: IMGFMT: Image is corrupt; cannot be opened read/write
no file open, try 'help open'
read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Expand Down Expand Up @@ -267,7 +267,7 @@ No errors were found on the image.
=== Testing zero refcount table size ===

Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.IMGFMT: Image does not contain a reference count table
qemu-io: can't open device TEST_DIR/t.IMGFMT: Image does not contain a reference count table
ERROR cluster 0 refcount=0 reference=1
ERROR cluster 3 refcount=0 reference=1
Rebuilding refcount structure
Expand Down Expand Up @@ -296,7 +296,7 @@ Can't get refcount for cluster 2: Input/output error
Can't get refcount for cluster 3: Input/output error
Rebuilding refcount structure
Repairing cluster 1 refcount=1 reference=0
can't open device TEST_DIR/t.IMGFMT: Could not repair dirty image: Input/output error
qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not repair dirty image: Input/output error
--- Repairing ---
Leaked cluster 1 refcount=1 reference=0
Repairing cluster 1 refcount=1 reference=0
Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/069.out
Expand Up @@ -4,5 +4,5 @@ QA output created by 069

Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=131072
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=131072 backing_file=TEST_DIR/t.IMGFMT.base
can't open device TEST_DIR/t.IMGFMT: Could not open backing file: Could not open 'TEST_DIR/t.IMGFMT.base': No such file or directory
qemu-io: can't open device TEST_DIR/t.IMGFMT: Could not open backing file: Could not open 'TEST_DIR/t.IMGFMT.base': No such file or directory
*** done
2 changes: 1 addition & 1 deletion tests/qemu-iotests/070.out
@@ -1,7 +1,7 @@
QA output created by 070

=== Verify open image read-only fails, due to dirty log ===
can't open device TEST_DIR/iotest-dirtylog-10G-4M.vhdx: VHDX image file 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx' opened read-only, but contains a log that needs to be replayed
qemu-io: can't open device TEST_DIR/iotest-dirtylog-10G-4M.vhdx: VHDX image file 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx' opened read-only, but contains a log that needs to be replayed
To replay the log, run:
qemu-img check -r all 'TEST_DIR/iotest-dirtylog-10G-4M.vhdx'
=== Verify open image replays log ===
Expand Down
14 changes: 7 additions & 7 deletions tests/qemu-iotests/075.out
Expand Up @@ -9,23 +9,23 @@ read 512/512 bytes at offset 1048064
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

== block_size must be a multiple of 512 ==
can't open device TEST_DIR/simple-pattern.cloop: block_size 513 must be a multiple of 512
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: block_size 513 must be a multiple of 512

== block_size cannot be zero ==
can't open device TEST_DIR/simple-pattern.cloop: block_size cannot be zero
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: block_size cannot be zero

== huge block_size ===
can't open device TEST_DIR/simple-pattern.cloop: block_size 4294966784 must be 64 MB or less
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: block_size 4294966784 must be 64 MB or less

== offsets_size overflow ===
can't open device TEST_DIR/simple-pattern.cloop: n_blocks 4294967295 must be 536870911 or less
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: n_blocks 4294967295 must be 536870911 or less

== refuse images that require too many offsets ===
can't open device TEST_DIR/simple-pattern.cloop: image requires too many offsets, try increasing block size
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: image requires too many offsets, try increasing block size

== refuse images with non-monotonically increasing offsets ==
can't open device TEST_DIR/simple-pattern.cloop: offsets not monotonically increasing at index 1, image file is corrupt
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: offsets not monotonically increasing at index 1, image file is corrupt

== refuse images with invalid compressed block size ==
can't open device TEST_DIR/simple-pattern.cloop: invalid compressed block size at index 1, image file is corrupt
qemu-io: can't open device TEST_DIR/simple-pattern.cloop: invalid compressed block size at index 1, image file is corrupt
*** done
6 changes: 3 additions & 3 deletions tests/qemu-iotests/076.out
Expand Up @@ -5,13 +5,13 @@ read 65536/65536 bytes at offset 0
64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

== Negative catalog size ==
can't open device TEST_DIR/parallels-v1: Catalog too large
qemu-io: can't open device TEST_DIR/parallels-v1: Catalog too large

== Overflow in catalog allocation ==
can't open device TEST_DIR/parallels-v1: Catalog too large
qemu-io: can't open device TEST_DIR/parallels-v1: Catalog too large

== Zero sectors per track ==
can't open device TEST_DIR/parallels-v1: Invalid image: Zero sectors per track
qemu-io: can't open device TEST_DIR/parallels-v1: Invalid image: Zero sectors per track

== Read from a valid v2 image ==
read 65536/65536 bytes at offset 0
Expand Down
12 changes: 6 additions & 6 deletions tests/qemu-iotests/078.out
Expand Up @@ -5,18 +5,18 @@ read 512/512 bytes at offset 0
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

== Negative catalog size ==
can't open device TEST_DIR/empty.bochs: Catalog size is too large
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too large

== Overflow for catalog size * sizeof(uint32_t) ==
can't open device TEST_DIR/empty.bochs: Catalog size is too large
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too large

== Too small catalog bitmap for image size ==
can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size

== Negative extent size ==
can't open device TEST_DIR/empty.bochs: Extent size 2147483648 is too large
qemu-io: can't open device TEST_DIR/empty.bochs: Extent size 2147483648 is too large

== Zero extent size ==
can't open device TEST_DIR/empty.bochs: Extent size must be at least 512
qemu-io: can't open device TEST_DIR/empty.bochs: Extent size must be at least 512
*** done
40 changes: 20 additions & 20 deletions tests/qemu-iotests/080.out
Expand Up @@ -2,34 +2,34 @@ QA output created by 080

== Huge header size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
qemu-io: can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size
qemu-io: can't open device TEST_DIR/t.qcow2: qcow2 header exceeds cluster size

== Huge unknown header extension ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Invalid backing file offset
can't open device TEST_DIR/t.qcow2: Header extension too large
can't open device TEST_DIR/t.qcow2: Header extension too large
qemu-io: can't open device TEST_DIR/t.qcow2: Invalid backing file offset
qemu-io: can't open device TEST_DIR/t.qcow2: Header extension too large
qemu-io: can't open device TEST_DIR/t.qcow2: Header extension too large

== Huge refcount table size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Reference count table too large
can't open device TEST_DIR/t.qcow2: Reference count table too large
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table too large
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table too large

== Misaligned refcount table ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Reference count table offset invalid
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table offset invalid

== Huge refcount offset ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Reference count table offset invalid
qemu-io: can't open device TEST_DIR/t.qcow2: Reference count table offset invalid

== Invalid snapshot table ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Snapshot table too large
can't open device TEST_DIR/t.qcow2: Snapshot table too large
can't open device TEST_DIR/t.qcow2: Snapshot table offset invalid
can't open device TEST_DIR/t.qcow2: Snapshot table offset invalid
qemu-io: can't open device TEST_DIR/t.qcow2: Snapshot table too large
qemu-io: can't open device TEST_DIR/t.qcow2: Snapshot table too large
qemu-io: can't open device TEST_DIR/t.qcow2: Snapshot table offset invalid
qemu-io: can't open device TEST_DIR/t.qcow2: Snapshot table offset invalid

== Hitting snapshot table size limit ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
Expand All @@ -39,18 +39,18 @@ read 512/512 bytes at offset 0

== Invalid L1 table ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Active L1 table too large
can't open device TEST_DIR/t.qcow2: Active L1 table too large
can't open device TEST_DIR/t.qcow2: Active L1 table offset invalid
can't open device TEST_DIR/t.qcow2: Active L1 table offset invalid
qemu-io: can't open device TEST_DIR/t.qcow2: Active L1 table too large
qemu-io: can't open device TEST_DIR/t.qcow2: Active L1 table too large
qemu-io: can't open device TEST_DIR/t.qcow2: Active L1 table offset invalid
qemu-io: can't open device TEST_DIR/t.qcow2: Active L1 table offset invalid

== Invalid L1 table (with internal snapshot in the image) ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
qemu-img: Could not open 'TEST_DIR/t.IMGFMT': L1 table is too small

== Invalid backing file size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.qcow2: Backing file name too long
qemu-io: can't open device TEST_DIR/t.qcow2: Backing file name too long

== Invalid L2 entry (huge physical offset) ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
Expand All @@ -66,7 +66,7 @@ wrote 512/512 bytes at offset 0
qemu-img: Failed to load snapshot: Snapshot L1 table offset invalid
qemu-img: Snapshot L1 table offset invalid
qemu-img: Failed to turn zero into data clusters: Invalid argument
Failed to flush the refcount block cache: Invalid argument
qemu-io: Failed to flush the refcount block cache: Invalid argument
write failed: Invalid argument
qemu-img: Snapshot L1 table offset invalid
qemu-img: Could not apply snapshot 'test': Failed to load snapshot: Invalid argument
Expand All @@ -89,7 +89,7 @@ wrote 512/512 bytes at offset 0
qemu-img: Failed to load snapshot: Snapshot L1 table too large
qemu-img: Snapshot L1 table too large
qemu-img: Failed to turn zero into data clusters: File too large
Failed to flush the refcount block cache: File too large
qemu-io: Failed to flush the refcount block cache: File too large
write failed: File too large
qemu-img: Snapshot L1 table too large
qemu-img: Could not apply snapshot 'test': Failed to load snapshot: File too large
Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/081.out
Expand Up @@ -70,7 +70,7 @@ read 10485760/10485760 bytes at offset 0
10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)

== checking the blkverify mode with invalid settings ==
can't open: blkverify=on can only be set if there are exactly two files and vote-threshold is 2
qemu-io: can't open: blkverify=on can only be set if there are exactly two files and vote-threshold is 2

== dynamically adding a child to a quorum ==
Testing:
Expand Down
12 changes: 6 additions & 6 deletions tests/qemu-iotests/088.out
Expand Up @@ -2,10 +2,10 @@ QA output created by 088

== Invalid block size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
can't open device TEST_DIR/t.vpc: Invalid block size 0
can't open device TEST_DIR/t.vpc: Invalid block size 0
can't open device TEST_DIR/t.vpc: Invalid block size 128
can't open device TEST_DIR/t.vpc: Invalid block size 128
can't open device TEST_DIR/t.vpc: Invalid block size 305419896
can't open device TEST_DIR/t.vpc: Invalid block size 305419896
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 0
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 0
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 128
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 128
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 305419896
qemu-io: can't open device TEST_DIR/t.vpc: Invalid block size 305419896
*** done
14 changes: 7 additions & 7 deletions tests/qemu-iotests/103.out
Expand Up @@ -5,13 +5,13 @@ wrote 65536/65536 bytes at offset 0

=== Testing invalid option combinations ===

can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time
can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size
can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size
can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time
can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of two between 512 and the cluster size (65536)
can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of two between 512 and the cluster size (65536)
can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of two between 512 and the cluster size (65536)
qemu-io: can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time
qemu-io: can't open device TEST_DIR/t.IMGFMT: l2-cache-size may not exceed cache-size
qemu-io: can't open device TEST_DIR/t.IMGFMT: refcount-cache-size may not exceed cache-size
qemu-io: can't open device TEST_DIR/t.IMGFMT: cache-size, l2-cache-size and refcount-cache-size may not be set at the same time
qemu-io: can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of two between 512 and the cluster size (65536)
qemu-io: can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of two between 512 and the cluster size (65536)
qemu-io: can't open device TEST_DIR/t.IMGFMT: L2 cache entry size must be a power of two between 512 and the cluster size (65536)

=== Testing valid option combinations ===

Expand Down
2 changes: 1 addition & 1 deletion tests/qemu-iotests/114.out
Expand Up @@ -7,7 +7,7 @@ virtual size: 64M (67108864 bytes)
cluster_size: 65536
backing file: TEST_DIR/t.IMGFMT.base
backing file format: foo
can't open device TEST_DIR/t.qcow2: Could not open backing file: Unknown driver 'foo'
qemu-io: can't open device TEST_DIR/t.qcow2: Could not open backing file: Unknown driver 'foo'
no file open, try 'help open'
read 4096/4096 bytes at offset 0
4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Expand Down
14 changes: 7 additions & 7 deletions tests/qemu-iotests/116.out
Expand Up @@ -2,29 +2,29 @@ QA output created by 116

== truncated header cluster ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument

== invalid header magic ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Image not in QED format
qemu-io: can't open device TEST_DIR/t.qed: Image not in QED format

== invalid cluster size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument

== invalid table size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument

== invalid header size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument

== invalid L1 table offset ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument

== invalid image size ==
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
qemu-io: can't open device TEST_DIR/t.qed: Could not open 'TEST_DIR/t.qed': Invalid argument
*** done
2 changes: 1 addition & 1 deletion tests/qemu-iotests/131.out
Expand Up @@ -22,7 +22,7 @@ read 32768/32768 bytes at offset 163840
read 32768/32768 bytes at offset 0
32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
== Corrupt image ==
can't open device TEST_DIR/t.parallels: parallels: Image was not closed correctly; cannot be opened read/write
qemu-io: can't open device TEST_DIR/t.parallels: parallels: Image was not closed correctly; cannot be opened read/write
ERROR image was not closed correctly

1 errors were found on the image.
Expand Down
30 changes: 15 additions & 15 deletions tests/qemu-iotests/133.out
Expand Up @@ -4,18 +4,18 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t

=== Check that node-name can't be changed ===

Cannot change the option 'node-name'
Cannot change the option 'node-name'
Cannot change the option 'node-name'
qemu-io: Cannot change the option 'node-name'
qemu-io: Cannot change the option 'node-name'
qemu-io: Cannot change the option 'node-name'

=== Check that unchanged node-name is okay ===


=== Check that driver can't be changed ===

Cannot change the option 'driver'
Cannot change the option 'driver'
Cannot change the option 'driver'
qemu-io: Cannot change the option 'driver'
qemu-io: Cannot change the option 'driver'
qemu-io: Cannot change the option 'driver'

=== Check that unchanged driver is okay ===

Expand All @@ -27,16 +27,16 @@ format name: null-co

=== Check that mixing -c/-r/-w and their corresponding options is forbidden ===

Cannot set both -r/-w and 'read-only'
Cannot set both -r/-w and 'read-only'
Cannot set both -c and the cache options
Cannot set both -c and the cache options
Cannot set both -c and the cache options
qemu-io: Cannot set both -r/-w and 'read-only'
qemu-io: Cannot set both -r/-w and 'read-only'
qemu-io: Cannot set both -c and the cache options
qemu-io: Cannot set both -c and the cache options
qemu-io: Cannot set both -c and the cache options

=== Check that invalid options are handled correctly ===

Parameter 'read-only' expects 'on' or 'off'
Parameter 'cache.no-flush' expects 'on' or 'off'
Parameter 'cache.direct' expects 'on' or 'off'
Parameter 'auto-read-only' expects 'on' or 'off'
qemu-io: Parameter 'read-only' expects 'on' or 'off'
qemu-io: Parameter 'cache.no-flush' expects 'on' or 'off'
qemu-io: Parameter 'cache.direct' expects 'on' or 'off'
qemu-io: Parameter 'auto-read-only' expects 'on' or 'off'
*** done

0 comments on commit 36b9986

Please sign in to comment.