2012-07-27 12:05:24 +04:00
|
|
|
QA output created by 039
|
|
|
|
|
|
|
|
== Checking that image is clean on shutdown ==
|
2014-12-09 10:38:03 +03:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
2012-07-27 12:05:24 +04:00
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features []
|
2012-07-27 12:05:24 +04:00
|
|
|
No errors were found on the image.
|
|
|
|
|
|
|
|
== Creating a dirty image file ==
|
2014-12-09 10:38:03 +03:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
2012-07-27 12:05:24 +04:00
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-09-04 12:11:19 +03:00
|
|
|
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features [0]
|
2012-07-27 12:05:24 +04:00
|
|
|
ERROR cluster 5 refcount=0 reference=1
|
2013-09-02 18:36:15 +04:00
|
|
|
ERROR OFLAG_COPIED data cluster: l2_entry=8000000000050000 refcount=0
|
2012-07-27 12:05:24 +04:00
|
|
|
|
|
|
|
2 errors were found on the image.
|
|
|
|
Data may be corrupted, or further writes to the image may corrupt it.
|
|
|
|
|
|
|
|
== Read-only access must still work ==
|
|
|
|
read 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features [0]
|
2012-07-27 12:05:24 +04:00
|
|
|
|
|
|
|
== Repairing the image file must succeed ==
|
2014-10-22 16:09:42 +04:00
|
|
|
ERROR cluster 5 refcount=0 reference=1
|
|
|
|
Rebuilding refcount structure
|
|
|
|
Repairing cluster 1 refcount=1 reference=0
|
|
|
|
Repairing cluster 2 refcount=1 reference=0
|
2012-08-09 16:05:56 +04:00
|
|
|
The following inconsistencies were found and repaired:
|
|
|
|
|
|
|
|
0 leaked clusters
|
|
|
|
1 corruptions
|
|
|
|
|
|
|
|
Double checking the fixed image now...
|
2012-07-27 12:05:24 +04:00
|
|
|
No errors were found on the image.
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features []
|
2012-07-27 12:05:24 +04:00
|
|
|
|
|
|
|
== Data should still be accessible after repair ==
|
|
|
|
read 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
|
|
|
|
== Opening a dirty image read/write should repair it ==
|
2014-12-09 10:38:03 +03:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
2012-07-27 12:05:24 +04:00
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-09-04 12:11:19 +03:00
|
|
|
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features [0]
|
2014-10-22 16:09:42 +04:00
|
|
|
ERROR cluster 5 refcount=0 reference=1
|
|
|
|
Rebuilding refcount structure
|
|
|
|
Repairing cluster 1 refcount=1 reference=0
|
|
|
|
Repairing cluster 2 refcount=1 reference=0
|
2012-07-27 12:05:24 +04:00
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features []
|
2012-07-27 12:05:24 +04:00
|
|
|
|
|
|
|
== Creating an image file with lazy_refcounts=off ==
|
2014-12-09 10:38:03 +03:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
2012-07-27 12:05:24 +04:00
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-09-04 12:11:19 +03:00
|
|
|
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features []
|
2012-07-27 12:05:24 +04:00
|
|
|
No errors were found on the image.
|
2014-04-03 15:47:50 +04:00
|
|
|
|
|
|
|
== Committing to a backing file with lazy_refcounts=on ==
|
2014-12-09 10:38:03 +03:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=134217728
|
iotests: Specify explicit backing format where sensible
There are many existing qcow2 images that specify a backing file but
no format. This has been the source of CVEs in the past, but has
become more prominent of a problem now that libvirt has switched to
-blockdev. With older -drive, at least the probing was always done by
qemu (so the only risk of a changed format between successive boots of
a guest was if qemu was upgraded and probed differently). But with
newer -blockdev, libvirt must specify a format; if libvirt guesses raw
where the image was formatted, this results in data corruption visible
to the guest; conversely, if libvirt guesses qcow2 where qemu was
using raw, this can result in potential security holes, so modern
libvirt instead refuses to use images without explicit backing format.
The change in libvirt to reject images without explicit backing format
has pointed out that a number of tools have been far too reliant on
probing in the past. It's time to set a better example in our own
iotests of properly setting this parameter.
iotest calls to create, rebase, and convert are all impacted to some
degree. It's a bit annoying that we are inconsistent on command line
- while all of those accept -o backing_file=...,backing_fmt=..., the
shortcuts are different: create and rebase have -b and -F, while
convert has -B but no -F. (amend has no shortcuts, but the previous
patch just deprecated the use of amend to change backing chains).
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200706203954.341758-9-eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2020-07-06 23:39:52 +03:00
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file=TEST_DIR/t.IMGFMT.base backing_fmt=IMGFMT
|
2014-04-03 15:47:50 +04:00
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
Image committed.
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features []
|
|
|
|
incompatible_features []
|
2014-04-03 15:47:50 +04:00
|
|
|
No errors were found on the image.
|
|
|
|
No errors were found on the image.
|
2015-09-04 19:26:09 +03:00
|
|
|
|
|
|
|
== Changing lazy_refcounts setting at runtime ==
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-09-04 12:11:19 +03:00
|
|
|
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features [0]
|
2015-09-04 19:26:09 +03:00
|
|
|
ERROR cluster 5 refcount=0 reference=1
|
|
|
|
ERROR OFLAG_COPIED data cluster: l2_entry=8000000000050000 refcount=0
|
|
|
|
|
|
|
|
2 errors were found on the image.
|
|
|
|
Data may be corrupted, or further writes to the image may corrupt it.
|
|
|
|
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
|
|
|
wrote 512/512 bytes at offset 0
|
|
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
2019-09-04 12:11:19 +03:00
|
|
|
./common.rc: Killed ( VALGRIND_QEMU="${VALGRIND_QEMU_IO}" _qemu_proc_exec "${VALGRIND_LOGFILE}" "$QEMU_IO_PROG" $QEMU_IO_ARGS "$@" )
|
2019-11-07 19:36:49 +03:00
|
|
|
incompatible_features []
|
2015-09-04 19:26:09 +03:00
|
|
|
No errors were found on the image.
|
2012-07-27 12:05:24 +04:00
|
|
|
*** done
|