qom: Use return values to check for error where that's simpler
[qemu/ar7.git] / tests / qemu-iotests / 206.out
blob1a14255a8342f70f764c4f18e4626f5f0aec30b4
1 === Successful image creation (defaults) ===
3 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
4 {"return": {}}
5 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
6 {"return": {}}
8 {"execute": "blockdev-add", "arguments": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "node-name": "imgfile"}}
9 {"return": {}}
10 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "imgfile", "size": 134217728}}}
11 {"return": {}}
12 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
13 {"return": {}}
15 image: TEST_IMG
16 file format: IMGFMT
17 virtual size: 128 MiB (134217728 bytes)
18 cluster_size: 65536
19 Format specific information:
20     compat: 1.1
21     compression type: zlib
22     lazy refcounts: false
23     refcount bits: 16
24     corrupt: false
26 === Successful image creation (inline blockdev-add, explicit defaults) ===
28 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": false, "preallocation": "off", "size": 0}}}
29 {"return": {}}
30 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
31 {"return": {}}
33 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 65536, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "lazy-refcounts": false, "preallocation": "off", "refcount-bits": 16, "size": 67108864, "version": "v3"}}}
34 {"return": {}}
35 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
36 {"return": {}}
38 image: TEST_IMG
39 file format: IMGFMT
40 virtual size: 64 MiB (67108864 bytes)
41 cluster_size: 65536
42 Format specific information:
43     compat: 1.1
44     compression type: zlib
45     lazy refcounts: false
46     refcount bits: 16
47     corrupt: false
49 === Successful image creation (v3 non-default options) ===
51 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "nocow": true, "preallocation": "falloc", "size": 0}}}
52 {"return": {}}
53 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
54 {"return": {}}
56 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 2097152, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "lazy-refcounts": true, "preallocation": "metadata", "refcount-bits": 1, "size": 33554432, "version": "v3"}}}
57 {"return": {}}
58 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
59 {"return": {}}
61 image: TEST_IMG
62 file format: IMGFMT
63 virtual size: 32 MiB (33554432 bytes)
64 cluster_size: 2097152
65 Format specific information:
66     compat: 1.1
67     compression type: zlib
68     lazy refcounts: true
69     refcount bits: 1
70     corrupt: false
72 === Successful image creation (v2 non-default options) ===
74 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2", "size": 0}}}
75 {"return": {}}
76 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
77 {"return": {}}
79 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "TEST_DIR/PID-t.qcow2.base", "backing-fmt": "qcow2", "cluster-size": 512, "driver": "qcow2", "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "size": 33554432, "version": "v2"}}}
80 {"return": {}}
81 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
82 {"return": {}}
84 image: TEST_IMG
85 file format: IMGFMT
86 virtual size: 32 MiB (33554432 bytes)
87 cluster_size: 512
88 backing file: TEST_IMG.base
89 backing file format: IMGFMT
90 Format specific information:
91     compat: 0.10
92     compression type: zlib
93     refcount bits: 16
95 === Successful image creation (encrypted) ===
97 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "encrypt": {"cipher-alg": "twofish-128", "cipher-mode": "ctr", "format": "luks", "hash-alg": "sha1", "iter-time": 10, "ivgen-alg": "plain64", "ivgen-hash-alg": "md5", "key-secret": "keysec0"}, "file": {"driver": "file", "filename": "TEST_DIR/PID-t.qcow2"}, "size": 33554432}}}
98 {"return": {}}
99 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
100 {"return": {}}
102 image: TEST_IMG
103 file format: IMGFMT
104 virtual size: 32 MiB (33554432 bytes)
105 encrypted: yes
106 cluster_size: 65536
107 Format specific information:
108     compat: 1.1
109     compression type: zlib
110     lazy refcounts: false
111     refcount bits: 16
112     encrypt:
113         ivgen alg: plain64
114         hash alg: sha1
115         cipher alg: twofish-128
116         uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
117         format: luks
118         cipher mode: ctr
119         slots:
120             [0]:
121                 active: true
122                 iters: XXX
123                 key offset: 4096
124                 stripes: 4000
125             [1]:
126                 active: false
127                 key offset: 69632
128             [2]:
129                 active: false
130                 key offset: 135168
131             [3]:
132                 active: false
133                 key offset: 200704
134             [4]:
135                 active: false
136                 key offset: 266240
137             [5]:
138                 active: false
139                 key offset: 331776
140             [6]:
141                 active: false
142                 key offset: 397312
143             [7]:
144                 active: false
145                 key offset: 462848
146         payload offset: 528384
147         master key iters: XXX
148     corrupt: false
150 === Invalid BlockdevRef ===
152 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "this doesn't exist", "size": 33554432}}}
153 {"return": {}}
154 Job failed: Cannot find device=this doesn't exist nor node_name=this doesn't exist
155 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
156 {"return": {}}
158 === Invalid sizes ===
159 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 1234}}}
160 {"return": {}}
161 Job failed: Image size must be a multiple of 512 bytes
162 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
163 {"return": {}}
165 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 18446744073709551104}}}
166 {"return": {}}
167 Job failed: Could not resize image: Image size cannot be negative
168 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
169 {"return": {}}
171 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775808}}}
172 {"return": {}}
173 Job failed: Could not resize image: Image size cannot be negative
174 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
175 {"return": {}}
177 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 9223372036854775296}}}
178 {"return": {}}
179 Job failed: Could not resize image: Failed to grow the L1 table: File too large
180 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
181 {"return": {}}
183 === Invalid version ===
184 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "size": 67108864, "version": "v1"}}}
185 {"error": {"class": "GenericError", "desc": "Invalid parameter 'v1'"}}
187 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "lazy-refcounts": true, "size": 67108864, "version": "v2"}}}
188 {"return": {}}
189 Job failed: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
190 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
191 {"return": {}}
193 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 8, "size": 67108864, "version": "v2"}}}
194 {"return": {}}
195 Job failed: Different refcount widths than 16 bits require compatibility level 1.1 or above (use version=v3 or greater)
196 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
197 {"return": {}}
199 === Invalid backing file options ===
200 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-file": "/dev/null", "driver": "qcow2", "file": "node0", "preallocation": "full", "size": 67108864}}}
201 {"return": {}}
202 Job failed: Backing file and preallocation cannot be used at the same time
203 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
204 {"return": {}}
206 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"backing-fmt": "qcow2", "driver": "qcow2", "file": "node0", "size": 67108864}}}
207 {"return": {}}
208 Job failed: Backing format cannot be used without backing file
209 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
210 {"return": {}}
212 === Invalid cluster size ===
213 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 1234, "driver": "qcow2", "file": "node0", "size": 67108864}}}
214 {"return": {}}
215 Job failed: Cluster size must be a power of two between 512 and 2048k
216 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
217 {"return": {}}
219 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 128, "driver": "qcow2", "file": "node0", "size": 67108864}}}
220 {"return": {}}
221 Job failed: Cluster size must be a power of two between 512 and 2048k
222 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
223 {"return": {}}
225 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 4194304, "driver": "qcow2", "file": "node0", "size": 67108864}}}
226 {"return": {}}
227 Job failed: Cluster size must be a power of two between 512 and 2048k
228 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
229 {"return": {}}
231 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 0, "driver": "qcow2", "file": "node0", "size": 67108864}}}
232 {"return": {}}
233 Job failed: Cluster size must be a power of two between 512 and 2048k
234 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
235 {"return": {}}
237 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"cluster-size": 512, "driver": "qcow2", "file": "node0", "size": 281474976710656}}}
238 {"return": {}}
239 Job failed: Could not resize image: Failed to grow the L1 table: File too large
240 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
241 {"return": {}}
243 === Invalid refcount width ===
244 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 128, "size": 67108864}}}
245 {"return": {}}
246 Job failed: Refcount width must be a power of two and may not exceed 64 bits
247 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
248 {"return": {}}
250 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 0, "size": 67108864}}}
251 {"return": {}}
252 Job failed: Refcount width must be a power of two and may not exceed 64 bits
253 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
254 {"return": {}}
256 {"execute": "blockdev-create", "arguments": {"job-id": "job0", "options": {"driver": "qcow2", "file": "node0", "refcount-bits": 7, "size": 67108864}}}
257 {"return": {}}
258 Job failed: Refcount width must be a power of two and may not exceed 64 bits
259 {"execute": "job-dismiss", "arguments": {"id": "job0"}}
260 {"return": {}}