2c78857bf6
When opening/creating images, propagating errors instead of immediately emitting them on occurrence results in errors generally being printed on a single line rather than being split up into multiple ones. This in turn requires adjustments to some test results. Also, test 060 used a sed to filter out the test image directory and format by removing everything from the affected line after a certain keyword; this now also removes the error message itself, which can be fixed by using _filter_testdir and _filter_imgfmt. Finally, _make_test_img in common.rc did not filter out the test image directory etc. from stderr. This has been fixed through a redirection of stderr to stdout (which is already done in _check_test_img and _img_info). Signed-off-by: Max Reitz <mreitz@redhat.com>
218 lines
10 KiB
Plaintext
218 lines
10 KiB
Plaintext
QA output created by 051
|
||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||
|
||
=== Unknown option ===
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo: could not open disk image TEST_DIR/t.qcow2: Block format 'qcow2' used by device 'ide0-hd0' doesn't support the option 'unknown_opt'
|
||
|
||
|
||
=== Enable and disable lazy refcounting on the command line, plus some invalid values ===
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: could not open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on' or 'off'
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: could not open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on' or 'off'
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: could not open disk image TEST_DIR/t.qcow2: Parameter 'lazy-refcounts' expects 'on' or 'off'
|
||
|
||
|
||
=== With version 2 images enabling lazy refcounts must fail ===
|
||
|
||
Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: could not open disk image TEST_DIR/t.qcow2: Lazy refcounts require a qcow2 image with at least qemu 1.1 compatibility level
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
|
||
=== No medium ===
|
||
|
||
Testing: -drive if=floppy
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive if=ide,media=cdrom
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive if=scsi,media=cdrom
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive if=ide
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: Device needs media, but drive is empty
|
||
QEMU_PROG: Device initialization failed.
|
||
QEMU_PROG: Initialization of device ide-hd failed
|
||
|
||
Testing: -drive if=virtio
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
|
||
QEMU_PROG: -drive if=virtio: Device initialization failed.
|
||
QEMU_PROG: -drive if=virtio: Device initialization failed.
|
||
QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized
|
||
|
||
Testing: -drive if=scsi
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty
|
||
QEMU_PROG: Device initialization failed.
|
||
QEMU_PROG: Initialization of device lsi53c895a failed
|
||
|
||
Testing: -drive if=none,id=disk -device ide-cd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive if=none,id=disk -device ide-drive,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
|
||
QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
|
||
QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized
|
||
|
||
Testing: -drive if=none,id=disk -device ide-hd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
|
||
QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
|
||
QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
|
||
|
||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
|
||
QEMU_PROG: -device scsi-disk,drive=disk: Device initialization failed.
|
||
QEMU_PROG: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be initialized
|
||
|
||
Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
|
||
QEMU_PROG: -device scsi-hd,drive=disk: Device initialization failed.
|
||
QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be initialized
|
||
|
||
|
||
=== Read-only ===
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on: read-only not supported by this bus type
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-cd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -device ide-drive,drive=disk: Can't use a read-only drive
|
||
QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed.
|
||
QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) QEMU_PROG: -device ide-hd,drive=disk: Can't use a read-only drive
|
||
QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed.
|
||
QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
|
||
=== Cache modes ===
|
||
|
||
Testing: -drive media=cdrom,cache=none
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive media=cdrom,cache=directsync
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive media=cdrom,cache=writeback
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive media=cdrom,cache=writethrough
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive media=cdrom,cache=unsafe
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive media=cdrom,cache=invalid_value
|
||
QEMU_PROG: -drive media=cdrom,cache=invalid_value: invalid cache option
|
||
|
||
|
||
=== Specifying the protocol layer ===
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file
|
||
QEMU X.Y.Z monitor - type 'help' for more information
|
||
(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K
|
||
|
||
Testing: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2
|
||
QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2: could not open disk image TEST_DIR/t.qcow2: Can't use 'qcow2' as a block driver for the protocol level
|
||
|
||
|
||
=== Parsing protocol from file name ===
|
||
|
||
Testing: -hda foo:bar
|
||
QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown protocol
|
||
|
||
Testing: -drive file=foo:bar
|
||
QEMU_PROG: -drive file=foo:bar: could not open disk image foo:bar: Unknown protocol
|
||
|
||
Testing: -drive file.filename=foo:bar
|
||
QEMU_PROG: -drive file.filename=foo:bar: could not open disk image ide0-hd0: Could not open 'foo:bar': No such file or directory
|
||
|
||
*** done
|