xref: /openbmc/qemu/tests/qemu-iotests/051.pc.out (revision 500eb6db)
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=,if=none,id=drive0
8QEMU_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'
9
10Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=on,if=none,id=drive0
11QEMU_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'
12
13Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=1234,if=none,id=drive0
14QEMU_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'
15
16Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,unknown_opt=foo,if=none,id=drive0
17QEMU_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'
18
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=== Node names ===
51
52Testing: -drive file=TEST_DIR/t.qcow2,node-name=x123456789012345678901234567890
53QEMU X.Y.Z monitor - type 'help' for more information
54(qemu) quit
55
56Testing: -drive file=TEST_DIR/t.qcow2,node-name=x1234567890123456789012345678901
57QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=x1234567890123456789012345678901: Node name too long
58
59Testing: -drive file=TEST_DIR/t.qcow2,node-name=All-Types.of_all0wed_chars
60QEMU X.Y.Z monitor - type 'help' for more information
61(qemu) quit
62
63Testing: -drive file=TEST_DIR/t.qcow2,node-name=123foo
64QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=123foo: Invalid node name
65
66Testing: -drive file=TEST_DIR/t.qcow2,node-name=_foo
67QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=_foo: Invalid node name
68
69Testing: -drive file=TEST_DIR/t.qcow2,node-name=foo#12
70QEMU_PROG: -drive file=TEST_DIR/t.qcow2,node-name=foo#12: Invalid node name
71
72
73=== Device without drive ===
74
75Testing: -device VIRTIO_SCSI -device scsi-hd
76QEMU X.Y.Z monitor - type 'help' for more information
77(qemu) QEMU_PROG: -device scsi-hd: drive property not set
78
79
80=== Overriding backing file ===
81
82Testing: -drive file=TEST_DIR/t.qcow2,driver=qcow2,backing.file.filename=TEST_DIR/t.qcow2.orig,if=none,id=drive0 -nodefaults
83QEMU X.Y.Z monitor - type 'help' for more information
84(qemu) info block
85drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2.orig"}}, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}} (qcow2)
86    Removable device: not locked, tray closed
87    Cache mode:       writeback
88    Backing file:     TEST_DIR/t.qcow2.orig (chain depth: 1)
89(qemu) quit
90
91Testing: -drive file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig
92QEMU_PROG: -drive file=TEST_DIR/t.qcow2,driver=raw,backing.file.filename=TEST_DIR/t.qcow2.orig: Driver doesn't support backing files
93
94Testing: -drive file=TEST_DIR/t.qcow2,file.backing.driver=file,file.backing.filename=TEST_DIR/t.qcow2.orig
95QEMU_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
96
97Testing: -drive file=TEST_DIR/t.qcow2,file.backing.driver=qcow2,file.backing.file.filename=TEST_DIR/t.qcow2.orig
98QEMU_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
99
100
101=== Enable and disable lazy refcounting on the command line, plus some invalid values ===
102
103Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
104Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
105QEMU X.Y.Z monitor - type 'help' for more information
106(qemu) quit
107
108Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
109QEMU X.Y.Z monitor - type 'help' for more information
110(qemu) quit
111
112Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=
113QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=: Parameter 'lazy-refcounts' expects 'on' or 'off'
114
115Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42
116QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=42: Parameter 'lazy-refcounts' expects 'on' or 'off'
117
118Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo
119QEMU_PROG: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=foo: Parameter 'lazy-refcounts' expects 'on' or 'off'
120
121
122=== With version 2 images enabling lazy refcounts must fail ===
123
124Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=134217728
125Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=on
126QEMU_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
127
128Testing: -drive file=TEST_DIR/t.qcow2,format=qcow2,lazy-refcounts=off
129QEMU X.Y.Z monitor - type 'help' for more information
130(qemu) quit
131
132
133=== No medium ===
134
135Testing: -drive if=floppy
136QEMU X.Y.Z monitor - type 'help' for more information
137(qemu) quit
138
139Testing: -drive if=ide,media=cdrom
140QEMU X.Y.Z monitor - type 'help' for more information
141(qemu) quit
142
143Testing: -drive if=ide
144QEMU X.Y.Z monitor - type 'help' for more information
145(qemu) QEMU_PROG: Initialization of device ide-hd failed: Device needs media, but drive is empty
146
147Testing: -drive if=virtio
148QEMU X.Y.Z monitor - type 'help' for more information
149(qemu) QEMU_PROG: -drive if=virtio: Device needs media, but drive is empty
150
151Testing: -drive if=none,id=disk -device ide-cd,drive=disk
152QEMU X.Y.Z monitor - type 'help' for more information
153(qemu) quit
154
155Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-cd,drive=disk
156QEMU X.Y.Z monitor - type 'help' for more information
157(qemu) quit
158
159Testing: -drive if=none,id=disk -device ide-drive,drive=disk
160QEMU X.Y.Z monitor - type 'help' for more information
161(qemu) QEMU_PROG: -device ide-drive,drive=disk: Device needs media, but drive is empty
162
163Testing: -drive if=none,id=disk -device ide-hd,drive=disk
164QEMU X.Y.Z monitor - type 'help' for more information
165(qemu) QEMU_PROG: -device ide-hd,drive=disk: Device needs media, but drive is empty
166
167Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-disk,drive=disk
168QEMU X.Y.Z monitor - type 'help' for more information
169(qemu) QEMU_PROG: -device scsi-disk,drive=disk: Device needs media, but drive is empty
170
171Testing: -drive if=none,id=disk -device lsi53c895a -device scsi-hd,drive=disk
172QEMU X.Y.Z monitor - type 'help' for more information
173(qemu) QEMU_PROG: -device scsi-hd,drive=disk: Device needs media, but drive is empty
174
175
176=== Attach to node in non-default iothread ===
177
178Testing: -drive file=TEST_DIR/t.qcow2,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on -device ide-hd,drive=disk,share-rw=on
179QEMU X.Y.Z monitor - type 'help' for more information
180(qemu) QEMU_PROG: -device ide-hd,drive=disk,share-rw=on: Cannot change iothread of active block backend
181
182Testing: -drive file=TEST_DIR/t.qcow2,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on -device virtio-blk-pci,drive=disk,share-rw=on
183QEMU X.Y.Z monitor - type 'help' for more information
184(qemu) QEMU_PROG: -device virtio-blk-pci,drive=disk,share-rw=on: Cannot change iothread of active block backend
185
186Testing: -drive file=TEST_DIR/t.qcow2,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on -device lsi53c895a,id=lsi0 -device scsi-hd,bus=lsi0.0,drive=disk,share-rw=on
187QEMU X.Y.Z monitor - type 'help' for more information
188(qemu) QEMU_PROG: -device scsi-hd,bus=lsi0.0,drive=disk,share-rw=on: HBA does not support iothreads
189
190Testing: -drive file=TEST_DIR/t.qcow2,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on -device virtio-scsi,id=virtio-scsi1 -device scsi-hd,bus=virtio-scsi1.0,drive=disk,share-rw=on
191QEMU X.Y.Z monitor - type 'help' for more information
192(qemu) QEMU_PROG: -device scsi-hd,bus=virtio-scsi1.0,drive=disk,share-rw=on: Cannot change iothread of active block backend
193
194Testing: -drive file=TEST_DIR/t.qcow2,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on -device virtio-blk-pci,drive=disk,iohtread=iothread0,share-rw=on
195QEMU X.Y.Z monitor - type 'help' for more information
196(qemu) QEMU_PROG: -device virtio-blk-pci,drive=disk,iohtread=iothread0,share-rw=on: Cannot change iothread of active block backend
197
198Testing: -drive file=TEST_DIR/t.qcow2,if=none,node-name=disk -object iothread,id=thread0 -device virtio-scsi,iothread=thread0,id=virtio-scsi0 -device scsi-hd,bus=virtio-scsi0.0,drive=disk,share-rw=on -device virtio-scsi,id=virtio-scsi1,iothread=thread0 -device scsi-hd,bus=virtio-scsi1.0,drive=disk,share-rw=on
199QEMU X.Y.Z monitor - type 'help' for more information
200(qemu) quit
201
202
203=== Read-only ===
204
205Testing: -drive file=TEST_DIR/t.qcow2,if=floppy,readonly=on
206QEMU X.Y.Z monitor - type 'help' for more information
207(qemu) quit
208
209Testing: -drive file=TEST_DIR/t.qcow2,if=ide,media=cdrom,readonly=on
210QEMU X.Y.Z monitor - type 'help' for more information
211(qemu) quit
212
213Testing: -drive file=TEST_DIR/t.qcow2,if=ide,readonly=on
214QEMU X.Y.Z monitor - type 'help' for more information
215(qemu) QEMU_PROG: Initialization of device ide-hd failed: Block node is read-only
216
217Testing: -drive file=TEST_DIR/t.qcow2,if=virtio,readonly=on
218QEMU X.Y.Z monitor - type 'help' for more information
219(qemu) quit
220
221Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-cd,drive=disk
222QEMU X.Y.Z monitor - type 'help' for more information
223(qemu) quit
224
225Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-cd,drive=disk
226QEMU X.Y.Z monitor - type 'help' for more information
227(qemu) quit
228
229Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-drive,drive=disk
230QEMU X.Y.Z monitor - type 'help' for more information
231(qemu) QEMU_PROG: -device ide-drive,drive=disk: Block node is read-only
232
233Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device ide-hd,drive=disk
234QEMU X.Y.Z monitor - type 'help' for more information
235(qemu) QEMU_PROG: -device ide-hd,drive=disk: Block node is read-only
236
237Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-disk,drive=disk
238QEMU X.Y.Z monitor - type 'help' for more information
239(qemu) quit
240
241Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=disk,readonly=on -device lsi53c895a -device scsi-hd,drive=disk
242QEMU X.Y.Z monitor - type 'help' for more information
243(qemu) quit
244
245
246=== Cache modes ===
247
248Testing: -drive driver=null-co,cache=none
249QEMU X.Y.Z monitor - type 'help' for more information
250(qemu) quit
251
252Testing: -drive driver=null-co,cache=directsync
253QEMU X.Y.Z monitor - type 'help' for more information
254(qemu) quit
255
256Testing: -drive driver=null-co,cache=writeback
257QEMU X.Y.Z monitor - type 'help' for more information
258(qemu) quit
259
260Testing: -drive driver=null-co,cache=writethrough
261QEMU X.Y.Z monitor - type 'help' for more information
262(qemu) quit
263
264Testing: -drive driver=null-co,cache=unsafe
265QEMU X.Y.Z monitor - type 'help' for more information
266(qemu) quit
267
268Testing: -drive driver=null-co,cache=invalid_value
269QEMU_PROG: -drive driver=null-co,cache=invalid_value: invalid cache option
270
271Testing: -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
272QEMU X.Y.Z monitor - type 'help' for more information
273(qemu) info block
274drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2.base"}}, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}} (qcow2)
275    Removable device: not locked, tray closed
276    Cache mode:       writeback
277    Backing file:     TEST_DIR/t.qcow2.base (chain depth: 1)
278(qemu) info block file
279
280file: TEST_DIR/t.qcow2 (file)
281    Cache mode:       writeback
282(qemu) info block backing
283backing: TEST_DIR/t.qcow2.base (qcow2, read-only)
284    Cache mode:       writeback, ignore flushes
285(qemu) info block backing-file
286
287backing-file: TEST_DIR/t.qcow2.base (file, read-only)
288    Cache mode:       writeback, ignore flushes
289(qemu) quit
290
291Testing: -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
292QEMU X.Y.Z monitor - type 'help' for more information
293(qemu) info block
294drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2.base"}}, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}} (qcow2)
295    Removable device: not locked, tray closed
296    Cache mode:       writethrough
297    Backing file:     TEST_DIR/t.qcow2.base (chain depth: 1)
298(qemu) info block file
299
300file: TEST_DIR/t.qcow2 (file)
301    Cache mode:       writeback
302(qemu) info block backing
303backing: TEST_DIR/t.qcow2.base (qcow2, read-only)
304    Cache mode:       writeback, ignore flushes
305(qemu) info block backing-file
306
307backing-file: TEST_DIR/t.qcow2.base (file, read-only)
308    Cache mode:       writeback, ignore flushes
309(qemu) quit
310
311Testing: -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
312QEMU X.Y.Z monitor - type 'help' for more information
313(qemu) info block
314drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2.base"}}, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}} (qcow2)
315    Removable device: not locked, tray closed
316    Cache mode:       writeback, ignore flushes
317    Backing file:     TEST_DIR/t.qcow2.base (chain depth: 1)
318(qemu) info block file
319
320file: TEST_DIR/t.qcow2 (file)
321    Cache mode:       writeback, ignore flushes
322(qemu) info block backing
323backing: TEST_DIR/t.qcow2.base (qcow2, read-only)
324    Cache mode:       writeback, ignore flushes
325(qemu) info block backing-file
326
327backing-file: TEST_DIR/t.qcow2.base (file, read-only)
328    Cache mode:       writeback, ignore flushes
329(qemu) quit
330
331Testing: -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
332QEMU_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
333
334
335=== Specifying the protocol layer ===
336
337Testing: -drive file=TEST_DIR/t.qcow2,file.driver=file
338QEMU X.Y.Z monitor - type 'help' for more information
339(qemu) quit
340
341
342=== Leaving out required options ===
343
344Testing: -drive driver=file
345QEMU_PROG: -drive driver=file: The 'file' block driver requires a file name
346
347Testing: -drive driver=file,filename=
348QEMU_PROG: -drive driver=file,filename=: The 'file' block driver requires a file name
349
350Testing: -drive driver=nbd
351QEMU_PROG: -drive driver=nbd: NBD server address missing
352
353Testing: -drive driver=raw
354QEMU_PROG: -drive driver=raw: A block device must be specified for "file"
355
356Testing: -drive file.driver=file
357QEMU_PROG: -drive file.driver=file: The 'file' block driver requires a file name
358
359Testing: -drive file.driver=nbd
360QEMU_PROG: -drive file.driver=nbd: NBD server address missing
361
362Testing: -drive file.driver=raw
363QEMU_PROG: -drive file.driver=raw: A block device must be specified for "file"
364
365Testing: -drive foo=bar
366QEMU_PROG: -drive foo=bar: Must specify either driver or file
367
368
369=== Specifying both an option and its legacy alias ===
370
371Testing: -drive file=TEST_DIR/t.qcow2,iops=1234,throttling.iops-total=5678
372QEMU_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
373
374Testing: -drive file=TEST_DIR/t.qcow2,iops_rd=1234,throttling.iops-read=5678
375QEMU_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
376
377Testing: -drive file=TEST_DIR/t.qcow2,iops_wr=1234,throttling.iops-write=5678
378QEMU_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
379
380Testing: -drive file=TEST_DIR/t.qcow2,bps=1234,throttling.bps-total=5678
381QEMU_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
382
383Testing: -drive file=TEST_DIR/t.qcow2,bps_rd=1234,throttling.bps-read=5678
384QEMU_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
385
386Testing: -drive file=TEST_DIR/t.qcow2,bps_wr=1234,throttling.bps-write=5678
387QEMU_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
388
389Testing: -drive file=TEST_DIR/t.qcow2,iops_max=1234,throttling.iops-total-max=5678
390QEMU_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
391
392Testing: -drive file=TEST_DIR/t.qcow2,iops_rd_max=1234,throttling.iops-read-max=5678
393QEMU_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
394
395Testing: -drive file=TEST_DIR/t.qcow2,iops_wr_max=1234,throttling.iops-write-max=5678
396QEMU_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
397
398Testing: -drive file=TEST_DIR/t.qcow2,bps_max=1234,throttling.bps-total-max=5678
399QEMU_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
400
401Testing: -drive file=TEST_DIR/t.qcow2,bps_rd_max=1234,throttling.bps-read-max=5678
402QEMU_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
403
404Testing: -drive file=TEST_DIR/t.qcow2,bps_wr_max=1234,throttling.bps-write-max=5678
405QEMU_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
406
407Testing: -drive file=TEST_DIR/t.qcow2,iops_size=1234,throttling.iops-size=5678
408QEMU_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
409
410Testing: -drive file=TEST_DIR/t.qcow2,readonly=on,read-only=off
411QEMU_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
412
413
414=== Catching negative/large throttling values ===
415
416Testing: -drive file=TEST_DIR/t.qcow2,iops=-1
417QEMU_PROG: -drive file=TEST_DIR/t.qcow2,iops=-1: bps/iops/max values must be within [0, 1000000000000000]
418
419Testing: -drive file=TEST_DIR/t.qcow2,bps=-2
420QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=-2: bps/iops/max values must be within [0, 1000000000000000]
421
422Testing: -drive file=TEST_DIR/t.qcow2,bps_rd=-3
423QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd=-3: bps/iops/max values must be within [0, 1000000000000000]
424
425Testing: -drive file=TEST_DIR/t.qcow2,bps_rd_max=-3
426QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps_rd_max=-3: bps/iops/max values must be within [0, 1000000000000000]
427
428Testing: -drive file=TEST_DIR/t.qcow2,throttling.iops-total=-4
429QEMU_PROG: -drive file=TEST_DIR/t.qcow2,throttling.iops-total=-4: bps/iops/max values must be within [0, 1000000000000000]
430
431Testing: -drive file=TEST_DIR/t.qcow2,throttling.bps-total=-5
432QEMU_PROG: -drive file=TEST_DIR/t.qcow2,throttling.bps-total=-5: bps/iops/max values must be within [0, 1000000000000000]
433
434Testing: -drive file=TEST_DIR/t.qcow2,bps=0
435QEMU X.Y.Z monitor - type 'help' for more information
436(qemu) quit
437
438Testing: -drive file=TEST_DIR/t.qcow2,bps=1
439QEMU X.Y.Z monitor - type 'help' for more information
440(qemu) quit
441
442Testing: -drive file=TEST_DIR/t.qcow2,bps=1000000000000000
443QEMU X.Y.Z monitor - type 'help' for more information
444(qemu) quit
445
446Testing: -drive file=TEST_DIR/t.qcow2,bps=1000000000000001
447QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=1000000000000001: bps/iops/max values must be within [0, 1000000000000000]
448
449Testing: -drive file=TEST_DIR/t.qcow2,bps=9999999999999999
450QEMU_PROG: -drive file=TEST_DIR/t.qcow2,bps=9999999999999999: bps/iops/max values must be within [0, 1000000000000000]
451
452
453=== Parsing protocol from file name ===
454
455Testing: -hda foo:bar
456QEMU_PROG: -hda foo:bar: Unknown protocol 'foo'
457
458Testing: -drive file=foo:bar
459QEMU_PROG: -drive file=foo:bar: Unknown protocol 'foo'
460
461Testing: -drive file.filename=foo:bar
462QEMU_PROG: -drive file.filename=foo:bar: Could not open 'foo:bar': No such file or directory
463
464Testing: -hda file:TEST_DIR/t.qcow2
465QEMU X.Y.Z monitor - type 'help' for more information
466(qemu) quit
467
468Testing: -drive file=file:TEST_DIR/t.qcow2
469QEMU X.Y.Z monitor - type 'help' for more information
470(qemu) quit
471
472Testing: -drive file.filename=file:TEST_DIR/t.qcow2
473QEMU_PROG: -drive file.filename=file:TEST_DIR/t.qcow2: Could not open 'file:TEST_DIR/t.qcow2': No such file or directory
474
475
476=== Snapshot mode ===
477
478wrote 4096/4096 bytes at offset 0
4794 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
480Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=drive0 -snapshot
481QEMU X.Y.Z monitor - type 'help' for more information
482(qemu) qemu-io drive0 "write -P 0x22 0 4k"
483wrote 4096/4096 bytes at offset 0
4844 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
485(qemu) quit
486
487Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
488QEMU X.Y.Z monitor - type 'help' for more information
489(qemu) qemu-io drive0 "write -P 0x22 0 4k"
490wrote 4096/4096 bytes at offset 0
4914 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
492(qemu) quit
493
494Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,snapshot=on,if=none,id=drive0
495QEMU X.Y.Z monitor - type 'help' for more information
496(qemu) qemu-io drive0 "write -P 0x22 0 4k"
497wrote 4096/4096 bytes at offset 0
4984 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
499(qemu) quit
500
501Testing: -drive file.filename=TEST_DIR/t.qcow2,driver=qcow2,if=none,id=drive0 -snapshot
502QEMU X.Y.Z monitor - type 'help' for more information
503(qemu) qemu-io drive0 "write -P 0x22 0 4k"
504wrote 4096/4096 bytes at offset 0
5054 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
506(qemu) quit
507
508Testing: -drive file=file:TEST_DIR/t.qcow2,if=none,id=drive0 -snapshot
509QEMU X.Y.Z monitor - type 'help' for more information
510(qemu) qemu-io drive0 "write -P 0x22 0 4k"
511wrote 4096/4096 bytes at offset 0
5124 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
513(qemu) quit
514
515Testing: -drive file=file:TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
516QEMU X.Y.Z monitor - type 'help' for more information
517(qemu) qemu-io drive0 "write -P 0x22 0 4k"
518wrote 4096/4096 bytes at offset 0
5194 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
520(qemu) quit
521
522Testing: -drive file=TEST_DIR/t.qcow2,if=none,id=drive0 -snapshot
523QEMU X.Y.Z monitor - type 'help' for more information
524(qemu) qemu-io drive0 "write -P 0x22 0 4k"
525wrote 4096/4096 bytes at offset 0
5264 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
527(qemu) quit
528
529Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
530QEMU X.Y.Z monitor - type 'help' for more information
531(qemu) qemu-io drive0 "write -P 0x22 0 4k"
532wrote 4096/4096 bytes at offset 0
5334 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
534(qemu) quit
535
536read 4096/4096 bytes at offset 0
5374 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
538Testing: -drive file=TEST_DIR/t.qcow2,snapshot=off,if=none,id=drive0
539QEMU X.Y.Z monitor - type 'help' for more information
540(qemu) qemu-io drive0 "write -P 0x22 0 4k"
541wrote 4096/4096 bytes at offset 0
5424 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
543(qemu) quit
544
545read 4096/4096 bytes at offset 0
5464 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
547Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,if=none,id=drive0
548QEMU X.Y.Z monitor - type 'help' for more information
549(qemu) qemu-io drive0 "write -P 0x33 0 4k"
550wrote 4096/4096 bytes at offset 0
5514 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
552(qemu) commit drive0
553(qemu) quit
554
555read 4096/4096 bytes at offset 0
5564 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
557Testing: -drive driver=null-co,snapshot=on
558QEMU_PROG: -drive driver=null-co,snapshot=on: Could not get temporary filename: No such file or directory
559
560Testing: -drive file=TEST_DIR/t.qcow2,snapshot=on,read-only=on,if=none,id=drive0
561QEMU X.Y.Z monitor - type 'help' for more information
562(qemu) info block
563drive0 (NODE_NAME): json:{"backing": {"driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/t.qcow2"}}, "driver": "qcow2", "file": {"driver": "file", "filename": SNAPSHOT_PATH}} (qcow2, read-only)
564    Removable device: not locked, tray closed
565    Cache mode:       writeback, ignore flushes
566    Backing file:     TEST_DIR/t.qcow2 (chain depth: 1)
567(qemu) quit
568
569*** done
570