master
out 261 lines 13.1 KB
Raw
1 QA output created by 244
2
3 === Create and open image with external data file ===
4
5 With data file name in the image:
6 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data
7 No errors were found on the image.
8 read 65536/65536 bytes at offset 0
9 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
10 read 65536/65536 bytes at offset 0
11 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
12 qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory
13 qemu-io: no file open, try 'help open'
14
15 Data file required, but without data file name in the image:
16 qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' is required for this image
17 qemu-io: no file open, try 'help open'
18 read 65536/65536 bytes at offset 0
19 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
20 qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory
21 qemu-io: no file open, try 'help open'
22
23 Setting data-file for an image with internal data:
24 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864
25 qemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' can only be set for images with an external data file
26 qemu-io: no file open, try 'help open'
27 qemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory
28 qemu-io: no file open, try 'help open'
29
30 === Conflicting features ===
31
32 Convert to compressed target with data file:
33 Formatting 'TEST_DIR/t.IMGFMT.src', fmt=IMGFMT size=67108864
34 wrote 1048576/1048576 bytes at offset 0
35 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
36 qemu-img: error while writing at byte 0: Operation not supported
37
38 Convert uncompressed, then write compressed data manually:
39 Images are identical.
40 qemu-io: write failed: Operation not supported
41 No errors were found on the image.
42
43 Take an internal snapshot:
44 qemu-img: Could not create snapshot 'test': Operation not supported
45 No errors were found on the image.
46
47 === Standalone image with external data file (efficient) ===
48
49 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data
50 qcow2 file size before I/O: 196616
51
52 wrote 4194304/4194304 bytes at offset 1048576
53 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
54 discard 2097152/2097152 bytes at offset 2097152
55 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
56 wrote 3145728/3145728 bytes at offset 3145728
57 3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
58 No errors were found on the image.
59
60 [{ "start": 0, "length": 1048576, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false},
61 { "start": 1048576, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 1048576},
62 { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false},
63 { "start": 4194304, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": 4194304},
64 { "start": 5242880, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false},
65 { "start": 6291456, "length": 60817408, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}]
66
67 read 1048576/1048576 bytes at offset 0
68 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
69 read 1048576/1048576 bytes at offset 1048576
70 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
71 read 4194304/4194304 bytes at offset 2097152
72 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
73
74 read 1048576/1048576 bytes at offset 0
75 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
76 read 1048576/1048576 bytes at offset 1048576
77 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
78 read 1048576/1048576 bytes at offset 4194304
79 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
80 read 1048576/1048576 bytes at offset 5242880
81 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
82 qcow2 file size after I/O: 327680
83
84 === Standalone image with external data file (valid raw) ===
85
86 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on
87 qcow2 file size before I/O: 327680
88
89 wrote 4194304/4194304 bytes at offset 1048576
90 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
91 discard 2097152/2097152 bytes at offset 2097152
92 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
93 wrote 3145728/3145728 bytes at offset 3145728
94 3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
95 No errors were found on the image.
96
97 [{ "start": 0, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 0},
98 { "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false},
99 { "start": 4194304, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": 4194304},
100 { "start": 6291456, "length": 60817408, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 6291456}]
101
102 read 1048576/1048576 bytes at offset 0
103 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
104 read 1048576/1048576 bytes at offset 1048576
105 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
106 read 4194304/4194304 bytes at offset 2097152
107 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
108
109 read 1048576/1048576 bytes at offset 0
110 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
111 read 1048576/1048576 bytes at offset 1048576
112 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
113 read 3145728/3145728 bytes at offset 3145728
114 3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
115 qcow2 file size after I/O: 327680
116
117 === bdrv_co_block_status test for file and offset=0 ===
118
119 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data
120 wrote 1048576/1048576 bytes at offset 0
121 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
122 read 1048576/1048576 bytes at offset 0
123 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
124 Offset Length Mapped to File
125 0 0x100000 0 TEST_DIR/t.qcow2.data
126 [{ "start": 0, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 0},
127 { "start": 1048576, "length": 66060288, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}]
128
129 === Copy offloading ===
130
131 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data
132 Images are identical.
133 Images are identical.
134
135 === Flushing should flush the data file ===
136
137 wrote 512/512 bytes at offset 0
138 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
139
140 Success: qemu-io failed, so the data file was flushed
141
142 === Preallocation with data-file-raw ===
143
144 --- Using a non-zeroed data file ---
145 wrote 1048576/1048576 bytes at offset 0
146 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
147 { "execute": "qmp_capabilities" }
148 {"return": {}}
149 { "execute": "blockdev-create",
150 "arguments": {
151 "job-id": "create",
152 "options": {
153 "driver": "IMGFMT",
154 "size": 1048576,
155 "file": "meta",
156 "data-file": "data",
157 "data-file-raw": true
158 } } }
159 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "create"}}
160 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "create"}}
161 {"return": {}}
162 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "create"}}
163 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "create"}}
164 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "create"}}
165 { "execute": "job-dismiss", "arguments": { "id": "create" } }
166 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "create"}}
167 {"return": {}}
168
169 Comparing pattern:
170 read 1048576/1048576 bytes at offset 0
171 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
172 read 1048576/1048576 bytes at offset 0
173 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
174 Images are identical.
175
176 --- Truncation (growing) ---
177 wrote 1048576/1048576 bytes at offset 1048576
178 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
179 Image resized.
180
181 Comparing pattern:
182 read 1048576/1048576 bytes at offset 0
183 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
184 read 1048576/1048576 bytes at offset 1048576
185 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
186 read 1048576/1048576 bytes at offset 0
187 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
188 read 1048576/1048576 bytes at offset 1048576
189 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
190 Images are identical.
191
192 --- Giving a backing file at runtime ---
193 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on
194 Formatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=1048576
195 wrote 1048576/1048576 bytes at offset 0
196 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
197
198 Comparing qcow2 image and raw data file:
199 Images are identical.
200
201 === keep_data_file tests ===
202
203 --- Creating test data file ---
204 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on
205 wrote 524288/524288 bytes at offset 0
206 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
207 wrote 524288/524288 bytes at offset 524288
208 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
209
210 --- Testing stand-alone option ---
211 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 keep_data_file=on
212 qemu-img: TEST_DIR/t.IMGFMT: Must not use 'keep_data_file=on' without 'data_file'
213 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 keep_data_file=true
214 qemu-img: TEST_DIR/t.IMGFMT: Invalid value 'true' for 'keep_data_file': Must be 'on' or 'off'
215 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 keep_data_file=off
216
217 --- Testing prealloc=off data_file_raw=off ---
218 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=off keep_data_file=on preallocation=off
219 qemu-img: TEST_DIR/t.IMGFMT: 'keep_data_file=on' requires 'preallocation=metadata' or 'data_file_raw=on', or the file contents will not be visible
220
221 --- Testing prealloc=off data_file_raw=on ---
222 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on keep_data_file=on preallocation=off
223 read 524288/524288 bytes at offset 0
224 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
225 read 524288/524288 bytes at offset 524288
226 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
227
228 --- Testing prealloc=metadata data_file_raw=off ---
229 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=off keep_data_file=on preallocation=metadata
230 read 524288/524288 bytes at offset 0
231 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
232 read 524288/524288 bytes at offset 524288
233 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
234
235 --- Testing prealloc=metadata data_file_raw=on ---
236 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on keep_data_file=on preallocation=metadata
237 read 524288/524288 bytes at offset 0
238 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
239 read 524288/524288 bytes at offset 524288
240 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
241
242 --- Testing prealloc=falloc data_file_raw=off ---
243 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=off keep_data_file=on preallocation=falloc
244 qemu-img: TEST_DIR/t.IMGFMT: Preallocating more than only metadata would overwrite the external data file's content and is therefore incompatible with 'keep_data_file=on'
245
246 --- Testing prealloc=falloc data_file_raw=on ---
247 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on keep_data_file=on preallocation=falloc
248 qemu-img: TEST_DIR/t.IMGFMT: Preallocating more than only metadata would overwrite the external data file's content and is therefore incompatible with 'keep_data_file=on'
249
250 --- Testing prealloc=full data_file_raw=off ---
251 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=off keep_data_file=on preallocation=full
252 qemu-img: TEST_DIR/t.IMGFMT: Preallocating more than only metadata would overwrite the external data file's content and is therefore incompatible with 'keep_data_file=on'
253
254 --- Testing prealloc=full data_file_raw=on ---
255 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on keep_data_file=on preallocation=full
256 qemu-img: TEST_DIR/t.IMGFMT: Preallocating more than only metadata would overwrite the external data file's content and is therefore incompatible with 'keep_data_file=on'
257
258 --- Testing non-existent data file ---
259 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.doesnotexist data_file_raw=on keep_data_file=on
260 qemu-img: TEST_DIR/t.IMGFMT: Could not open 'TEST_DIR/t.IMGFMT.doesnotexist': No such file or directory
261 *** done