1QA output created by 051 2Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 3Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 backing_file='TEST_DIR/t.IMGFMT.base' 4 5=== Unknown option === 6 7Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt= 8QEMU_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' 9 10Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on 11QEMU_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' 12 13Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234 14QEMU_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' 15 16Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo 17QEMU_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' 18 19 20=== Invalid format === 21 22Testing: -drive file=TEST_DIR/t.qcow2,format=foo 23QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=foo: 'foo' invalid format 24 25Testing: -drive file=TEST_DIR/t.qcow2,driver=foo 26QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: could not open disk image TEST_DIR/t.qcow2: Invalid driver: 'foo' 27 28 29=== Overriding backing file === 30 31Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig -nodefaults 32QEMU X.Y.Z monitor - type 'help' for more information 33(qemu) i[K[Din[K[D[Dinf[K[D[D[Dinfo[K[D[D[D[Dinfo [K[D[D[D[D[Dinfo b[K[D[D[D[D[D[Dinfo bl[K[D[D[D[D[D[D[Dinfo blo[K[D[D[D[D[D[D[D[Dinfo bloc[K[D[D[D[D[D[D[D[D[Dinfo block[K 34ide0-hd0: TEST_DIR/t.qcow2 (qcow2) 35 Backing file: TEST_DIR/t.qcow2.orig (chain depth: 1) 36(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 37 38 39=== Enable and disable lazy refcounting on the command line, plus some invalid values === 40 41Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on 42QEMU X.Y.Z monitor - type 'help' for more information 43(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 44 45Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off 46QEMU X.Y.Z monitor - type 'help' for more information 47(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 48 49Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts= 50QEMU_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' 51 52Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42 53QEMU_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' 54 55Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo 56QEMU_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' 57 58 59=== With version 2 images enabling lazy refcounts must fail === 60 61Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728 62Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on 63QEMU_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 64 65Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off 66QEMU X.Y.Z monitor - type 'help' for more information 67(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 68 69 70=== No medium === 71 72Testing: -drive if=floppy 73QEMU X.Y.Z monitor - type 'help' for more information 74(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 75 76Testing: -drive if=ide,media=cdrom 77QEMU X.Y.Z monitor - type 'help' for more information 78(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 79 80Testing: -drive if=scsi,media=cdrom 81QEMU X.Y.Z monitor - type 'help' for more information 82(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 83 84Testing: -drive if=ide 85QEMU X.Y.Z monitor - type 'help' for more information 86(qemu) QEMU_PROG: Device needs media, but drive is empty 87QEMU_PROG: Device initialization failed. 88QEMU_PROG: Initialization of device ide-hd failed 89 90Testing: -drive if=virtio 91QEMU X.Y.Z monitor - type 'help' for more information 92(qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty 93QEMU_PROG: -drive if=virtio: Device initialization failed. 94QEMU_PROG: -drive if=virtio: Device initialization failed. 95QEMU_PROG: -drive if=virtio: Device 'virtio-blk-pci' could not be initialized 96 97Testing: -drive if=scsi 98QEMU X.Y.Z monitor - type 'help' for more information 99(qemu) QEMU_PROG: -drive if=scsi: Device needs media, but drive is empty 100QEMU_PROG: Device initialization failed. 101QEMU_PROG: Initialization of device lsi53c895a failed 102 103Testing: -drive if=none,id=disk -device ide-cd,drive=disk 104QEMU X.Y.Z monitor - type 'help' for more information 105(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 106 107Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk 108QEMU X.Y.Z monitor - type 'help' for more information 109(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 110 111Testing: -drive if=none,id=disk -device ide-drive,drive=disk 112QEMU X.Y.Z monitor - type 'help' for more information 113(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty 114QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed. 115QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized 116 117Testing: -drive if=none,id=disk -device ide-hd,drive=disk 118QEMU X.Y.Z monitor - type 'help' for more information 119(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty 120QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed. 121QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized 122 123Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk 124QEMU X.Y.Z monitor - type 'help' for more information 125(qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty 126QEMU_PROG: -device scsi-disk,drive=disk: Device initialization failed. 127QEMU_PROG: -device scsi-disk,drive=disk: Device 'scsi-disk' could not be initialized 128 129Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk 130QEMU X.Y.Z monitor - type 'help' for more information 131(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty 132QEMU_PROG: -device scsi-hd,drive=disk: Device initialization failed. 133QEMU_PROG: -device scsi-hd,drive=disk: Device 'scsi-hd' could not be initialized 134 135 136=== Read-only === 137 138Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on 139QEMU X.Y.Z monitor - type 'help' for more information 140(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 141 142Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on 143QEMU X.Y.Z monitor - type 'help' for more information 144(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 145 146Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,media=cdrom,readonly=on 147QEMU X.Y.Z monitor - type 'help' for more information 148(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 149 150Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on 151QEMU X.Y.Z monitor - type 'help' for more information 152(qemu) QEMU_PROG: Can't use a read-only drive 153QEMU_PROG: Device initialization failed. 154QEMU_PROG: Initialization of device ide-hd failed 155 156Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on 157QEMU X.Y.Z monitor - type 'help' for more information 158(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 159 160Testing: -drive file=TEST_DIR/t.qcow2,if=scsi,readonly=on 161QEMU X.Y.Z monitor - type 'help' for more information 162(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 163 164Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-cd,drive=disk 165QEMU X.Y.Z monitor - type 'help' for more information 166(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 167 168Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk 169QEMU X.Y.Z monitor - type 'help' for more information 170(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 171 172Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk 173QEMU X.Y.Z monitor - type 'help' for more information 174(qemu) QEMU_PROG: -device ide-drive,drive=disk: Can't use a read-only drive 175QEMU_PROG: -device ide-drive,drive=disk: Device initialization failed. 176QEMU_PROG: -device ide-drive,drive=disk: Device 'ide-drive' could not be initialized 177 178Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk 179QEMU X.Y.Z monitor - type 'help' for more information 180(qemu) QEMU_PROG: -device ide-hd,drive=disk: Can't use a read-only drive 181QEMU_PROG: -device ide-hd,drive=disk: Device initialization failed. 182QEMU_PROG: -device ide-hd,drive=disk: Device 'ide-hd' could not be initialized 183 184Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk 185QEMU X.Y.Z monitor - type 'help' for more information 186(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 187 188Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk 189QEMU X.Y.Z monitor - type 'help' for more information 190(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 191 192 193=== Cache modes === 194 195Testing: -drive media=cdrom,cache=none 196QEMU X.Y.Z monitor - type 'help' for more information 197(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 198 199Testing: -drive media=cdrom,cache=directsync 200QEMU X.Y.Z monitor - type 'help' for more information 201(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 202 203Testing: -drive media=cdrom,cache=writeback 204QEMU X.Y.Z monitor - type 'help' for more information 205(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 206 207Testing: -drive media=cdrom,cache=writethrough 208QEMU X.Y.Z monitor - type 'help' for more information 209(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 210 211Testing: -drive media=cdrom,cache=unsafe 212QEMU X.Y.Z monitor - type 'help' for more information 213(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 214 215Testing: -drive media=cdrom,cache=invalid_value 216QEMU_PROG: -drive media=cdrom,cache=invalid_value: invalid cache option 217 218 219=== Specifying the protocol layer === 220 221Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file 222QEMU X.Y.Z monitor - type 'help' for more information 223(qemu) q[K[Dqu[K[D[Dqui[K[D[D[Dquit[K 224 225Testing: -drive file=TEST_DIR/t.qcow2,file.driver=qcow2 226QEMU_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 227 228 229=== Parsing protocol from file name === 230 231Testing: -hda foo:bar 232QEMU_PROG: -hda foo:bar: could not open disk image foo:bar: Unknown protocol 233 234Testing: -drive file=foo:bar 235QEMU_PROG: -drive file=foo:bar: could not open disk image foo:bar: Unknown protocol 236 237Testing: -drive file.filename=foo:bar 238QEMU_PROG: -drive file.filename=foo:bar: could not open disk image ide0-hd0: Could not open 'foo:bar': No such file or directory 239 240*** done 241