blob: b01f9a90d7b972651fe44332289a1b8772c5e5ae [file] [log] [blame]
Bo Tu289f3eb2015-12-03 18:01:30 +08001QA 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
Bo Tudd87de02016-01-04 13:29:20 +08007Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=,if=none,id=drive0
Max Reitzd0e46a52016-03-16 19:54:34 +01008QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=,if=none,id=drive0: Block format 'qcow2' does not support the option 'unknown_opt'
Bo Tu289f3eb2015-12-03 18:01:30 +08009
Bo Tudd87de02016-01-04 13:29:20 +080010Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on,if=none,id=drive0
Max Reitzd0e46a52016-03-16 19:54:34 +010011QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on,if=none,id=drive0: Block format 'qcow2' does not support the option 'unknown_opt'
Bo Tu289f3eb2015-12-03 18:01:30 +080012
Bo Tudd87de02016-01-04 13:29:20 +080013Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234,if=none,id=drive0
Max Reitzd0e46a52016-03-16 19:54:34 +010014QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234,if=none,id=drive0: Block format 'qcow2' does not support the option 'unknown_opt'
Bo Tu289f3eb2015-12-03 18:01:30 +080015
Bo Tudd87de02016-01-04 13:29:20 +080016Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo,if=none,id=drive0
Max Reitzd0e46a52016-03-16 19:54:34 +010017QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo,if=none,id=drive0: Block format 'qcow2' does not support the option 'unknown_opt'
Bo Tu289f3eb2015-12-03 18:01:30 +080018
19
20=== Unknown protocol option ===
21
22Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=
23QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=: Block protocol 'file' doesn't support the option 'unknown_opt'
24
25Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on
26QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=on: Block protocol 'file' doesn't support the option 'unknown_opt'
27
28Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234
29QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=1234: Block protocol 'file' doesn't support the option 'unknown_opt'
30
31Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo
32QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,file.unknown_opt=foo: Block protocol 'file' doesn't support the option 'unknown_opt'
33
34
35=== Invalid format ===
36
37Testing: -drive file=TEST_DIR/t.qcow2,format=foo
38QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=foo: Unknown driver 'foo'
39
40Testing: -drive file=TEST_DIR/t.qcow2,driver=foo
41QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=foo: Unknown driver 'foo'
42
43Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2
44QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,format=qcow2: Cannot specify both 'driver' and 'format'
45
46Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2
47QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=qcow2,format=qcow2: Cannot specify both 'driver' and 'format'
48
49
50=== Device without drive ===
51
Cornelia Huck75f02ed2017-09-13 11:10:37 +020052Testing: -device VIRTIO_SCSI -device scsi-hd
Bo Tu289f3eb2015-12-03 18:01:30 +080053QEMU X.Y.Z monitor - type 'help' for more information
54(qemu) QEMU_PROG: -device scsi-hd: drive property not set
55
56
57=== Overriding backing file ===
58
Bo Tudd87de02016-01-04 13:29:20 +080059Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig,if=none,id=drive0 -nodefaults
Bo Tu289f3eb2015-12-03 18:01:30 +080060QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +020061(qemu) info block
Bo Tudd87de02016-01-04 13:29:20 +080062drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
63 Removable device: not locked, tray closed
Bo Tu289f3eb2015-12-03 18:01:30 +080064 Cache mode: writeback
65 Backing file: TEST_DIR/t.qcow2.orig (chain depth: 1)
Kevin Wolf69404d92017-04-13 19:19:51 +020066(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +080067
68Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig
69QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig: Driver doesn't support backing files
70
71Testing: -drive file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig
72QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig: Driver doesn't support backing files
73
74Testing: -drive file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig
75QEMU_PROG: -drive file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig: Driver doesn't support backing files
76
77
78=== Enable and disable lazy refcounting on the command line, plus some invalid values ===
79
Max Reitz7e0db6f2017-11-23 03:08:26 +010080Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
Bo Tu289f3eb2015-12-03 18:01:30 +080081Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
82QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +020083(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +080084
85Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
86QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +020087(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +080088
89Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
90QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: Parameter 'lazy-refcounts' expects 'on' or 'off'
91
92Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
93QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: Parameter 'lazy-refcounts' expects 'on' or 'off'
94
95Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
96QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: Parameter 'lazy-refcounts' expects 'on' or 'off'
97
98
99=== With version 2 images enabling lazy refcounts must fail ===
100
101Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
102Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
103QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on: Lazy refcounts require a qcow2 image with at least qemu 1.1 compatibility level
104
105Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
106QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200107(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800108
109
110=== No medium ===
111
112Testing: -drive if=floppy
113QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200114(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800115
116Testing: -drive if=ide,media=cdrom
117QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200118(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800119
Bo Tu289f3eb2015-12-03 18:01:30 +0800120Testing: -drive if=ide
121QEMU X.Y.Z monitor - type 'help' for more information
Mao Zhongyi794939e2017-09-18 22:05:13 +0800122(qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs media, but drive is empty
Bo Tu289f3eb2015-12-03 18:01:30 +0800123
Bo Tudd87de02016-01-04 13:29:20 +0800124Testing: -drive if=virtio
125QEMU X.Y.Z monitor - type 'help' for more information
126(qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
127
Bo Tu289f3eb2015-12-03 18:01:30 +0800128Testing: -drive if=none,id=disk -device ide-cd,drive=disk
129QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200130(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800131
132Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
133QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200134(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800135
136Testing: -drive if=none,id=disk -device ide-drive,drive=disk
137QEMU X.Y.Z monitor - type 'help' for more information
138(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
Bo Tu289f3eb2015-12-03 18:01:30 +0800139
140Testing: -drive if=none,id=disk -device ide-hd,drive=disk
141QEMU X.Y.Z monitor - type 'help' for more information
142(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
Bo Tu289f3eb2015-12-03 18:01:30 +0800143
144Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
145QEMU X.Y.Z monitor - type 'help' for more information
146(qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
147
148Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
149QEMU X.Y.Z monitor - type 'help' for more information
150(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
151
152
153=== Read-only ===
154
155Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
156QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200157(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800158
159Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
160QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200161(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800162
Bo Tu289f3eb2015-12-03 18:01:30 +0800163Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
164QEMU X.Y.Z monitor - type 'help' for more information
Mao Zhongyi794939e2017-09-18 22:05:13 +0800165(qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is read-only
Bo Tu289f3eb2015-12-03 18:01:30 +0800166
Bo Tudd87de02016-01-04 13:29:20 +0800167Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
Bo Tu289f3eb2015-12-03 18:01:30 +0800168QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200169(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800170
171Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-cd,drive=disk
172QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200173(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800174
175Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
176QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200177(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800178
179Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
180QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolfa17c17a2017-01-24 13:43:31 +0100181(qemu) QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
Bo Tu289f3eb2015-12-03 18:01:30 +0800182
183Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
184QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolfa17c17a2017-01-24 13:43:31 +0100185(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
Bo Tu289f3eb2015-12-03 18:01:30 +0800186
187Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
188QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200189(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800190
191Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
192QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200193(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800194
195
196=== Cache modes ===
197
198Testing: -drive driver=null-co,cache=none
199QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200200(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800201
202Testing: -drive driver=null-co,cache=directsync
203QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200204(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800205
206Testing: -drive driver=null-co,cache=writeback
207QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200208(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800209
210Testing: -drive driver=null-co,cache=writethrough
211QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200212(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800213
214Testing: -drive driver=null-co,cache=unsafe
215QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200216(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800217
218Testing: -drive driver=null-co,cache=invalid_value
219QEMU_PROG: -drive driver=null-co,cache=invalid_value: invalid cache option
220
Kevin Wolf61de4c62016-03-18 17:46:45 +0100221Testing: -drive file=TEST_DIR/t.qcow2,cache=writeback,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
Bo Tu289f3eb2015-12-03 18:01:30 +0800222QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200223(qemu) info block
Bo Tudd87de02016-01-04 13:29:20 +0800224drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
225 Removable device: not locked, tray closed
Bo Tu289f3eb2015-12-03 18:01:30 +0800226 Cache mode: writeback
227 Backing file: TEST_DIR/t.qcow2.base (chain depth: 1)
Kevin Wolf69404d92017-04-13 19:19:51 +0200228(qemu) info block file
Bo Tu289f3eb2015-12-03 18:01:30 +0800229
230file: TEST_DIR/t.qcow2 (file)
231 Cache mode: writeback
Kevin Wolf69404d92017-04-13 19:19:51 +0200232(qemu) info block backing
Bo Tu289f3eb2015-12-03 18:01:30 +0800233backing: TEST_DIR/t.qcow2.base (qcow2, read-only)
234 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200235(qemu) info block backing-file
Bo Tu289f3eb2015-12-03 18:01:30 +0800236
237backing-file: TEST_DIR/t.qcow2.base (file, read-only)
238 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200239(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800240
Kevin Wolf61de4c62016-03-18 17:46:45 +0100241Testing: -drive file=TEST_DIR/t.qcow2,cache=writethrough,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
Bo Tu289f3eb2015-12-03 18:01:30 +0800242QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200243(qemu) info block
Bo Tudd87de02016-01-04 13:29:20 +0800244drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
245 Removable device: not locked, tray closed
Bo Tu289f3eb2015-12-03 18:01:30 +0800246 Cache mode: writethrough
247 Backing file: TEST_DIR/t.qcow2.base (chain depth: 1)
Kevin Wolf69404d92017-04-13 19:19:51 +0200248(qemu) info block file
Bo Tu289f3eb2015-12-03 18:01:30 +0800249
250file: TEST_DIR/t.qcow2 (file)
251 Cache mode: writeback
Kevin Wolf69404d92017-04-13 19:19:51 +0200252(qemu) info block backing
Bo Tu289f3eb2015-12-03 18:01:30 +0800253backing: TEST_DIR/t.qcow2.base (qcow2, read-only)
254 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200255(qemu) info block backing-file
Bo Tu289f3eb2015-12-03 18:01:30 +0800256
257backing-file: TEST_DIR/t.qcow2.base (file, read-only)
258 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200259(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800260
Kevin Wolf61de4c62016-03-18 17:46:45 +0100261Testing: -drive file=TEST_DIR/t.qcow2,cache=unsafe,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
Bo Tu289f3eb2015-12-03 18:01:30 +0800262QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200263(qemu) info block
Bo Tudd87de02016-01-04 13:29:20 +0800264drive0 (NODE_NAME): TEST_DIR/t.qcow2 (qcow2)
265 Removable device: not locked, tray closed
Bo Tu289f3eb2015-12-03 18:01:30 +0800266 Cache mode: writeback, ignore flushes
267 Backing file: TEST_DIR/t.qcow2.base (chain depth: 1)
Kevin Wolf69404d92017-04-13 19:19:51 +0200268(qemu) info block file
Bo Tu289f3eb2015-12-03 18:01:30 +0800269
270file: TEST_DIR/t.qcow2 (file)
271 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200272(qemu) info block backing
Bo Tu289f3eb2015-12-03 18:01:30 +0800273backing: TEST_DIR/t.qcow2.base (qcow2, read-only)
274 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200275(qemu) info block backing-file
Bo Tu289f3eb2015-12-03 18:01:30 +0800276
277backing-file: TEST_DIR/t.qcow2.base (file, read-only)
278 Cache mode: writeback, ignore flushes
Kevin Wolf69404d92017-04-13 19:19:51 +0200279(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800280
Kevin Wolf61de4c62016-03-18 17:46:45 +0100281Testing: -drive file=TEST_DIR/t.qcow2,cache=invalid_value,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0 -nodefaults
282QEMU_PROG: -drive file=TEST_DIR/t.qcow2,cache=invalid_value,backing.file.filename=TEST_DIR/t.qcow2.base,backing.cache.no-flush=on,backing.node-name=backing,backing.file.node-name=backing-file,file.node-name=file,if=none,id=drive0: invalid cache option
Bo Tu289f3eb2015-12-03 18:01:30 +0800283
284
285=== Specifying the protocol layer ===
286
287Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file
288QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200289(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800290
291
292=== Leaving out required options ===
293
294Testing: -drive driver=file
295QEMU_PROG: -drive driver=file: The 'file' block driver requires a file name
296
Max Reitz42dc10f2017-04-13 18:06:25 +0200297Testing: -drive driver=file,filename=
298QEMU_PROG: -drive driver=file,filename=: The 'file' block driver requires a file name
299
Bo Tu289f3eb2015-12-03 18:01:30 +0800300Testing: -drive driver=nbd
Max Reitz491d6c72016-10-25 15:11:34 +0200301QEMU_PROG: -drive driver=nbd: NBD server address missing
Bo Tu289f3eb2015-12-03 18:01:30 +0800302
303Testing: -drive driver=raw
Kevin Wolf4e4bf5c2016-12-16 18:52:37 +0100304QEMU_PROG: -drive driver=raw: A block device must be specified for "file"
Bo Tu289f3eb2015-12-03 18:01:30 +0800305
306Testing: -drive file.driver=file
307QEMU_PROG: -drive file.driver=file: The 'file' block driver requires a file name
308
309Testing: -drive file.driver=nbd
Max Reitz491d6c72016-10-25 15:11:34 +0200310QEMU_PROG: -drive file.driver=nbd: NBD server address missing
Bo Tu289f3eb2015-12-03 18:01:30 +0800311
312Testing: -drive file.driver=raw
Kevin Wolf4e4bf5c2016-12-16 18:52:37 +0100313QEMU_PROG: -drive file.driver=raw: A block device must be specified for "file"
Bo Tu289f3eb2015-12-03 18:01:30 +0800314
315Testing: -drive foo=bar
316QEMU_PROG: -drive foo=bar: Must specify either driver or file
317
318
319=== Specifying both an option and its legacy alias ===
320
321Testing: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678
322QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678: 'throttling.iops-total' and its alias 'iops' can't be used at the same time
323
324Testing: -drive file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678
325QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678: 'throttling.iops-read' and its alias 'iops_rd' can't be used at the same time
326
327Testing: -drive file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678
328QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678: 'throttling.iops-write' and its alias 'iops_wr' can't be used at the same time
329
330Testing: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678
331QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678: 'throttling.bps-total' and its alias 'bps' can't be used at the same time
332
333Testing: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678
334QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678: 'throttling.bps-read' and its alias 'bps_rd' can't be used at the same time
335
336Testing: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678
337QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678: 'throttling.bps-write' and its alias 'bps_wr' can't be used at the same time
338
339Testing: -drive file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678
340QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678: 'throttling.iops-total-max' and its alias 'iops_max' can't be used at the same time
341
342Testing: -drive file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678
343QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678: 'throttling.iops-read-max' and its alias 'iops_rd_max' can't be used at the same time
344
345Testing: -drive file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678
346QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678: 'throttling.iops-write-max' and its alias 'iops_wr_max' can't be used at the same time
347
348Testing: -drive file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678
349QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678: 'throttling.bps-total-max' and its alias 'bps_max' can't be used at the same time
350
351Testing: -drive file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678
352QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678: 'throttling.bps-read-max' and its alias 'bps_rd_max' can't be used at the same time
353
354Testing: -drive file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678
355QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678: 'throttling.bps-write-max' and its alias 'bps_wr_max' can't be used at the same time
356
357Testing: -drive file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678
358QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678: 'throttling.iops-size' and its alias 'iops_size' can't be used at the same time
359
360Testing: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off
361QEMU_PROG: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off: 'read-only' and its alias 'readonly' can't be used at the same time
362
363
Fam Zhenge9b15552016-01-20 12:21:21 +0800364=== Catching negative/large throttling values ===
365
366Testing: -drive file=TEST_DIR/t.qcow2,iops=-1
367QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops=-1: bps/iops/max values must be within [0, 1000000000000000]
368
369Testing: -drive file=TEST_DIR/t.qcow2,bps=-2
370QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=-2: bps/iops/max values must be within [0, 1000000000000000]
371
372Testing: -drive file=TEST_DIR/t.qcow2,bps_rd=-3
373QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd=-3: bps/iops/max values must be within [0, 1000000000000000]
374
375Testing: -drive file=TEST_DIR/t.qcow2,bps_rd_max=-3
376QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd_max=-3: bps/iops/max values must be within [0, 1000000000000000]
377
378Testing: -drive file=TEST_DIR/t.qcow2,throttling.iops-total=-4
379QEMU_PROG: -drive file=TEST_DIR/t.qcow2,throttling.iops-total=-4: bps/iops/max values must be within [0, 1000000000000000]
380
381Testing: -drive file=TEST_DIR/t.qcow2,throttling.bps-total=-5
382QEMU_PROG: -drive file=TEST_DIR/t.qcow2,throttling.bps-total=-5: bps/iops/max values must be within [0, 1000000000000000]
383
384Testing: -drive file=TEST_DIR/t.qcow2,bps=0
385QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200386(qemu) quit
Fam Zhenge9b15552016-01-20 12:21:21 +0800387
388Testing: -drive file=TEST_DIR/t.qcow2,bps=1
389QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200390(qemu) quit
Fam Zhenge9b15552016-01-20 12:21:21 +0800391
392Testing: -drive file=TEST_DIR/t.qcow2,bps=1000000000000000
393QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200394(qemu) quit
Fam Zhenge9b15552016-01-20 12:21:21 +0800395
396Testing: -drive file=TEST_DIR/t.qcow2,bps=1000000000000001
397QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=1000000000000001: bps/iops/max values must be within [0, 1000000000000000]
398
399Testing: -drive file=TEST_DIR/t.qcow2,bps=9999999999999999
400QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=9999999999999999: bps/iops/max values must be within [0, 1000000000000000]
401
402
Bo Tu289f3eb2015-12-03 18:01:30 +0800403=== Parsing protocol from file name ===
404
405Testing: -hda foo:bar
406QEMU_PROG: -hda foo:bar: Unknown protocol 'foo'
407
408Testing: -drive file=foo:bar
409QEMU_PROG: -drive file=foo:bar: Unknown protocol 'foo'
410
411Testing: -drive file.filename=foo:bar
412QEMU_PROG: -drive file.filename=foo:bar: Could not open 'foo:bar': No such file or directory
413
414Testing: -hda file:TEST_DIR/t.qcow2
415QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200416(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800417
418Testing: -drive file=file:TEST_DIR/t.qcow2
419QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200420(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800421
422Testing: -drive file.filename=file:TEST_DIR/t.qcow2
423QEMU_PROG: -drive file.filename=file:TEST_DIR/t.qcow2: Could not open 'file:TEST_DIR/t.qcow2': No such file or directory
424
425
426=== Snapshot mode ===
427
428wrote 4096/4096 bytes at offset 0
4294 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
430Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=drive0 -snapshot
431QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200432(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800433wrote 4096/4096 bytes at offset 0
4344 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200435(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800436
437Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
438QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200439(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800440wrote 4096/4096 bytes at offset 0
4414 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200442(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800443
444Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,snapshot=on,if=none,id=drive0
445QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200446(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800447wrote 4096/4096 bytes at offset 0
4484 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200449(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800450
451Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,if=none,id=drive0 -snapshot
452QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200453(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800454wrote 4096/4096 bytes at offset 0
4554 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200456(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800457
458Testing: -drive file=file:TEST_DIR/t.qcow2,if=none,id=drive0 -snapshot
459QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200460(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800461wrote 4096/4096 bytes at offset 0
4624 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200463(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800464
465Testing: -drive file=file:TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
466QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200467(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800468wrote 4096/4096 bytes at offset 0
4694 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200470(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800471
472Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=drive0 -snapshot
473QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200474(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800475wrote 4096/4096 bytes at offset 0
4764 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200477(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800478
479Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
480QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200481(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800482wrote 4096/4096 bytes at offset 0
4834 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200484(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800485
486read 4096/4096 bytes at offset 0
4874 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
488Testing: -drive file=TEST_DIR/t.qcow2,snapshot=off,if=none,id=drive0
489QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200490(qemu) qemu-io drive0 "write -P 0x22 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800491wrote 4096/4096 bytes at offset 0
4924 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200493(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800494
495read 4096/4096 bytes at offset 0
4964 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
497Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
498QEMU X.Y.Z monitor - type 'help' for more information
Kevin Wolf69404d92017-04-13 19:19:51 +0200499(qemu) qemu-io drive0 "write -P 0x33 0 4k"
Bo Tu289f3eb2015-12-03 18:01:30 +0800500wrote 4096/4096 bytes at offset 0
5014 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
Kevin Wolf69404d92017-04-13 19:19:51 +0200502(qemu) commit drive0
503(qemu) quit
Bo Tu289f3eb2015-12-03 18:01:30 +0800504
505read 4096/4096 bytes at offset 0
5064 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
507*** done