qemu/tests/qemu-iotests
Hanna Reitz d570177b50 qemu-img: Change info key names for protocol nodes
Currently, when querying a qcow2 image, qemu-img info reports something
like this:

image: test.qcow2
file format: qcow2
virtual size: 64 MiB (67108864 bytes)
disk size: 196 KiB
cluster_size: 65536
Format specific information:
    compat: 1.1
    compression type: zlib
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
    extended l2: false
Child node '/file':
    image: test.qcow2
    file format: file
    virtual size: 192 KiB (197120 bytes)
    disk size: 196 KiB
    Format specific information:
        extent size hint: 1048576

Notably, the way the keys are named is specific for image files: The
filename is shown under "image", the BDS driver under "file format", and
the BDS length under "virtual size".  This does not make much sense for
nodes that are not actually supposed to be guest images, like the /file
child node shown above.

Give bdrv_node_info_dump() a @protocol parameter that gives a hint that
the respective node is probably just used for data storage and does not
necessarily present the data for a VM guest disk.  This renames the keys
so that with this patch, the output becomes:

image: test.qcow2
[...]
Child node '/file':
    filename: test.qcow2
    protocol type: file
    file length: 192 KiB (197120 bytes)
    disk size: 196 KiB
    Format specific information:
        extent size hint: 1048576

(Perhaps we should also rename "Format specific information", but I
could not come up with anything better that will not become problematic
if we guess wrong with the protocol "heuristic".)

This change affects iotest 302, which has protocol node information in
its reference output.

Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20220620162704.80987-13-hreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-02-01 16:52:33 +01:00
..
001
002
003
004
005
007
008
009
010
011
012
013
014
015
017
018
019
020
021
022
023
024
026
029
032
033
034
035
037
038
041
2022-03-29 16:30:55 +02:00
042
043
044
2022-02-01 10:51:39 +01:00
045
046
047
048
049
050
051
2022-10-27 20:13:32 +02:00
2022-10-27 20:13:32 +02:00
2022-10-27 20:13:32 +02:00
052
053
054
055
057
058
063
065
2023-02-01 16:52:33 +01:00
073
075
076
077
078
079
080
081
082
083
086
087
088
092
093
096
101
104
109
114
116
118
124
128
129
130
131
2022-07-26 22:05:20 +03:00
132
133
134
136
137
2022-02-01 10:51:39 +01:00
139
142
145
147
148
152
154
155
157
158
159
160
161
163
2022-04-25 14:30:03 +02:00
170
171
172
174
175
177
178
179
181
183
184
185
2022-03-04 18:14:40 +01:00
2022-03-04 18:14:40 +01:00
186
187
188
189
190
191
195
197
198
201
204
206
207
2022-03-22 10:50:10 +01:00
2022-03-22 10:50:10 +01:00
208
209
2022-02-01 10:51:39 +01:00
211
2022-03-22 10:14:34 +01:00
2022-03-22 10:14:34 +01:00
212
213
215
217
219
220
221
226
227
232
235
236
238
239
240
243
244
247
248
249
253
256
263
265
267
268
270
272
273
2022-01-14 12:03:16 +01:00
277
279
282
283
284
286
288
289
292
293
294
295
297
299
300
301
302
2022-02-01 10:51:39 +01:00
2022-02-01 10:51:39 +01:00
304
305
307
2022-01-14 12:03:16 +01:00
313

=== This is the QEMU I/O test suite ===

* Intro

This package contains a simple test suite for the I/O layer of qemu.
It does not require a guest, but only the qemu, qemu-img and qemu-io
binaries.  This does limit it to exercise the low-level I/O path only
but no actual block drivers like ide, scsi or virtio.

* Usage

Just run ./check to run all tests for the raw image format, or ./check
-qcow2 to test the qcow2 image format.  The output of ./check -h explains
additional options to test further image formats or I/O methods.

* Feedback and patches

Please send improvements to the test suite, general feedback or just
reports of failing tests cases to qemu-devel@nongnu.org with a CC:
to qemu-block@nongnu.org.