qemu/tests
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
..
avocado tests/avocado: add RISC-V OpenSBI boot test 2023-01-20 10:14:13 +10:00
bench cleanup: Tweak and re-run return_directly.cocci 2022-12-14 16:19:35 +01:00
data tests: acpi: aarch64: Add *.topology tables 2023-01-08 01:54:23 -05:00
decode
docker tests/docker: use prebuilt toolchain for debian-hexagon-cross 2022-12-23 15:16:31 +00:00
fp enforce use of G_GNUC_PRINTF attributes 2023-01-11 10:44:34 +01:00
guest-debug
image-fuzzer
include
keys
lcitool ci: replace x86_64 macos-11 with aarch64 macos-12 2022-11-17 09:58:11 +01:00
migration tests/migration: remove the unused local variable 2022-10-11 12:37:12 +02:00
multiboot
perf/block/qcow2
plugin
qapi-schema tests/qapi-schema: remove Meson workaround 2023-01-06 00:51:02 +01:00
qemu-iotests qemu-img: Change info key names for protocol nodes 2023-02-01 16:52:33 +01:00
qtest trivial branch pull request 20230118 2023-01-19 15:05:29 +00:00
rocker
tcg First RISC-V PR for QEMU 8.0 2023-01-06 22:15:53 +00:00
tsan
uefi-test-tools
unit block: Convert bdrv_refresh_total_sectors() to co_wrapper_mixed 2023-02-01 16:52:32 +01:00
vm tests/vm/haiku.x86_64: Update the Haiku VM to Beta 4 2023-01-18 12:27:21 +01:00
vmstate-static-checker-data
check-block.sh
dbus-vmstate-daemon.sh
Makefile.include configure: move tests/tcg/Makefile.prereqs to root build directory 2022-10-06 11:53:40 +01:00
meson.build
requirements.txt tests: install "qemu" namespace package into venv 2022-06-06 09:26:54 +02:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00