xref: /openbmc/qemu/tests/qemu-iotests/049.out (revision d2dfe0b5)
1QA output created by 049
2=== Check correct interpretation of suffixes for image size ===
3
4== 1. Traditional size parameter ==
5
6qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024
7Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
8
9qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024b
10Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
11
12qemu-img create -f qcow2 TEST_DIR/t.qcow2 1k
13Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
14
15qemu-img create -f qcow2 TEST_DIR/t.qcow2 1K
16Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
17
18qemu-img create -f qcow2 TEST_DIR/t.qcow2 1M
19Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 lazy_refcounts=off refcount_bits=16
20
21qemu-img create -f qcow2 TEST_DIR/t.qcow2 1G
22Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1073741824 lazy_refcounts=off refcount_bits=16
23
24qemu-img create -f qcow2 TEST_DIR/t.qcow2 1T
25Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1099511627776 lazy_refcounts=off refcount_bits=16
26
27qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024.0
28Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
29
30qemu-img create -f qcow2 TEST_DIR/t.qcow2 1024.0b
31Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
32
33qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5k
34Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16
35
36qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5K
37Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16
38
39qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5M
40Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1572864 lazy_refcounts=off refcount_bits=16
41
42qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5G
43Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1610612736 lazy_refcounts=off refcount_bits=16
44
45qemu-img create -f qcow2 TEST_DIR/t.qcow2 1.5T
46Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1649267441664 lazy_refcounts=off refcount_bits=16
47
48== 2. Specifying size via -o ==
49
50qemu-img create -f qcow2 -o size=1024 TEST_DIR/t.qcow2
51Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
52
53qemu-img create -f qcow2 -o size=1024b TEST_DIR/t.qcow2
54Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
55
56qemu-img create -f qcow2 -o size=1k TEST_DIR/t.qcow2
57Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
58
59qemu-img create -f qcow2 -o size=1K TEST_DIR/t.qcow2
60Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
61
62qemu-img create -f qcow2 -o size=1M TEST_DIR/t.qcow2
63Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1048576 lazy_refcounts=off refcount_bits=16
64
65qemu-img create -f qcow2 -o size=1G TEST_DIR/t.qcow2
66Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1073741824 lazy_refcounts=off refcount_bits=16
67
68qemu-img create -f qcow2 -o size=1T TEST_DIR/t.qcow2
69Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1099511627776 lazy_refcounts=off refcount_bits=16
70
71qemu-img create -f qcow2 -o size=1024.0 TEST_DIR/t.qcow2
72Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
73
74qemu-img create -f qcow2 -o size=1024.0b TEST_DIR/t.qcow2
75Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1024 lazy_refcounts=off refcount_bits=16
76
77qemu-img create -f qcow2 -o size=1.5k TEST_DIR/t.qcow2
78Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16
79
80qemu-img create -f qcow2 -o size=1.5K TEST_DIR/t.qcow2
81Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1536 lazy_refcounts=off refcount_bits=16
82
83qemu-img create -f qcow2 -o size=1.5M TEST_DIR/t.qcow2
84Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1572864 lazy_refcounts=off refcount_bits=16
85
86qemu-img create -f qcow2 -o size=1.5G TEST_DIR/t.qcow2
87Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1610612736 lazy_refcounts=off refcount_bits=16
88
89qemu-img create -f qcow2 -o size=1.5T TEST_DIR/t.qcow2
90Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=1649267441664 lazy_refcounts=off refcount_bits=16
91
92== 3. Invalid sizes ==
93
94qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- -1024
95qemu-img: Invalid image size specified. Must be between 0 and 9223372036854775807.
96
97qemu-img create -f qcow2 -o size=-1024 TEST_DIR/t.qcow2
98qemu-img: TEST_DIR/t.qcow2: Value '-1024' is out of range for parameter 'size'
99
100qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- -1k
101qemu-img: Invalid image size specified. You may use k, M, G, T, P or E suffixes for
102qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes.
103
104qemu-img create -f qcow2 -o size=-1k TEST_DIR/t.qcow2
105qemu-img: TEST_DIR/t.qcow2: Parameter 'size' expects a non-negative number below 2^64
106Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-
107and exabytes, respectively.
108
109qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- 1kilobyte
110qemu-img: Invalid image size specified. You may use k, M, G, T, P or E suffixes for
111qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes.
112
113qemu-img create -f qcow2 -o size=1kilobyte TEST_DIR/t.qcow2
114qemu-img: TEST_DIR/t.qcow2: Parameter 'size' expects a non-negative number below 2^64
115Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-
116and exabytes, respectively.
117
118qemu-img create -f qcow2 TEST_DIR/t.qcow2 -- foobar
119qemu-img: Invalid image size specified. You may use k, M, G, T, P or E suffixes for
120qemu-img: kilobytes, megabytes, gigabytes, terabytes, petabytes and exabytes.
121
122qemu-img create -f qcow2 -o size=foobar TEST_DIR/t.qcow2
123qemu-img: TEST_DIR/t.qcow2: Parameter 'size' expects a non-negative number below 2^64
124Optional suffix k, M, G, T, P or E means kilo-, mega-, giga-, tera-, peta-
125and exabytes, respectively.
126
127== 4. Specify size twice (-o and traditional parameter) ==
128
129qemu-img create -f qcow2 -o size=10M TEST_DIR/t.qcow2 20M
130qemu-img: TEST_DIR/t.qcow2: The image size must be specified only once
131
132== Check correct interpretation of suffixes for cluster size ==
133
134qemu-img create -f qcow2 -o cluster_size=1024 TEST_DIR/t.qcow2 64M
135Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
136
137qemu-img create -f qcow2 -o cluster_size=1024b TEST_DIR/t.qcow2 64M
138Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
139
140qemu-img create -f qcow2 -o cluster_size=1k TEST_DIR/t.qcow2 64M
141Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
142
143qemu-img create -f qcow2 -o cluster_size=1K TEST_DIR/t.qcow2 64M
144Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
145
146qemu-img create -f qcow2 -o cluster_size=1M TEST_DIR/t.qcow2 64M
147Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1048576 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
148
149qemu-img create -f qcow2 -o cluster_size=1024.0 TEST_DIR/t.qcow2 64M
150Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
151
152qemu-img create -f qcow2 -o cluster_size=1024.0b TEST_DIR/t.qcow2 64M
153Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=1024 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
154
155qemu-img create -f qcow2 -o cluster_size=0.5k TEST_DIR/t.qcow2 64M
156Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=512 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
157
158qemu-img create -f qcow2 -o cluster_size=0.5K TEST_DIR/t.qcow2 64M
159Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=512 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
160
161qemu-img create -f qcow2 -o cluster_size=0.5M TEST_DIR/t.qcow2 64M
162Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=524288 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
163
164== Check compat level option ==
165
166qemu-img create -f qcow2 -o compat=0.10 TEST_DIR/t.qcow2 64M
167Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.10 lazy_refcounts=off refcount_bits=16
168
169qemu-img create -f qcow2 -o compat=1.1 TEST_DIR/t.qcow2 64M
170Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=1.1 lazy_refcounts=off refcount_bits=16
171
172qemu-img create -f qcow2 -o compat=0.42 TEST_DIR/t.qcow2 64M
173Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.42 lazy_refcounts=off refcount_bits=16
174qemu-img: TEST_DIR/t.qcow2: Parameter 'version' does not accept value '0.42'
175
176qemu-img create -f qcow2 -o compat=foobar TEST_DIR/t.qcow2 64M
177Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=foobar lazy_refcounts=off refcount_bits=16
178qemu-img: TEST_DIR/t.qcow2: Parameter 'version' does not accept value 'foobar'
179
180== Check preallocation option ==
181
182qemu-img create -f qcow2 -o preallocation=off TEST_DIR/t.qcow2 64M
183Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
184
185qemu-img create -f qcow2 -o preallocation=metadata TEST_DIR/t.qcow2 64M
186Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=metadata compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
187
188qemu-img create -f qcow2 -o preallocation=1234 TEST_DIR/t.qcow2 64M
189Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off preallocation=1234 compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
190qemu-img: TEST_DIR/t.qcow2: Parameter 'preallocation' does not accept value '1234'
191
192== Check encryption option ==
193
194qemu-img create -f qcow2 -o encryption=off TEST_DIR/t.qcow2 64M
195Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 encryption=off cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
196
197qemu-img create -f qcow2 --object secret,id=sec0,data=123456 -o encryption=on,encrypt.key-secret=sec0 TEST_DIR/t.qcow2 64M
198Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 encryption=on encrypt.key-secret=sec0 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 lazy_refcounts=off refcount_bits=16
199
200== Check lazy_refcounts option (only with v3) ==
201
202qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=off TEST_DIR/t.qcow2 64M
203Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=1.1 lazy_refcounts=off refcount_bits=16
204
205qemu-img create -f qcow2 -o compat=1.1,lazy_refcounts=on TEST_DIR/t.qcow2 64M
206Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=1.1 lazy_refcounts=on refcount_bits=16
207
208qemu-img create -f qcow2 -o compat=0.10,lazy_refcounts=off TEST_DIR/t.qcow2 64M
209Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.10 lazy_refcounts=off refcount_bits=16
210
211qemu-img create -f qcow2 -o compat=0.10,lazy_refcounts=on TEST_DIR/t.qcow2 64M
212Formatting 'TEST_DIR/t.qcow2', fmt=qcow2 cluster_size=65536 extended_l2=off compression_type=zlib size=67108864 compat=0.10 lazy_refcounts=on refcount_bits=16
213qemu-img: TEST_DIR/t.qcow2: Lazy refcounts only supported with compatibility level 1.1 and above (use version=v3 or greater)
214
215== Expect error when backing file name is empty string ==
216
217qemu-img create -f qcow2 -b  TEST_DIR/t.qcow2 1M
218qemu-img: TEST_DIR/t.qcow2: Expected backing file name, got empty string
219
220*** done
221