a6628605f7
- kvm-qcow2-Fix-theoretical-corruption-in-store_bitmap-err.patch [bz#2150180] - kvm-qemu-img-commit-Report-errors-while-closing-the-imag.patch [bz#2150180] - kvm-qemu-img-bitmap-Report-errors-while-closing-the-imag.patch [bz#2150180] - kvm-qemu-iotests-Test-qemu-img-bitmap-commit-exit-code-o.patch [bz#2150180] - kvm-accel-tcg-Test-CPUJumpCache-in-tb_jmp_cache_clear_pa.patch [bz#2165280] - kvm-block-Improve-empty-format-specific-info-dump.patch [bz#1860292] - kvm-block-file-Add-file-specific-image-info.patch [bz#1860292] - kvm-block-vmdk-Change-extent-info-type.patch [bz#1860292] - kvm-block-Split-BlockNodeInfo-off-of-ImageInfo.patch [bz#1860292] - kvm-qemu-img-Use-BlockNodeInfo.patch [bz#1860292] - kvm-block-qapi-Let-bdrv_query_image_info-recurse.patch [bz#1860292] - kvm-block-qapi-Introduce-BlockGraphInfo.patch [bz#1860292] - kvm-block-qapi-Add-indentation-to-bdrv_node_info_dump.patch [bz#1860292] - kvm-iotests-Filter-child-node-information.patch [bz#1860292] - kvm-iotests-106-214-308-Read-only-one-size-line.patch [bz#1860292] - kvm-qemu-img-Let-info-print-block-graph.patch [bz#1860292] - kvm-qemu-img-Change-info-key-names-for-protocol-nodes.patch [bz#1860292] - kvm-Revert-vhost-user-Monitor-slave-channel-in-vhost_use.patch [bz#2155173] - kvm-Revert-vhost-user-Introduce-nested-event-loop-in-vho.patch [bz#2155173] - kvm-virtio-rng-pci-fix-transitional-migration-compat-for.patch [bz#2162569] - Resolves: bz#2150180 (qemu-img finishes successfully while having errors in commit or bitmaps operations) - Resolves: bz#2165280 ([kvm-unit-tests] debug-wp-migration fails) - Resolves: bz#1860292 (RFE: add extent_size_hint information to qemu-img info) - Resolves: bz#2155173 ([vhost-user] unable to start vhost net: 71: falling back on userspace) - Resolves: bz#2162569 ([transitional device][virtio-rng-pci-transitional]Stable Guest ABI failed between RHEL 8.6 to RHEL 9.2)
100 lines
4.0 KiB
Diff
100 lines
4.0 KiB
Diff
From 6727e92a97f8ee9f367a41111bef3f5cad4a479a Mon Sep 17 00:00:00 2001
|
|
From: Hanna Reitz <hreitz@redhat.com>
|
|
Date: Mon, 20 Jun 2022 18:27:02 +0200
|
|
Subject: [PATCH 15/20] iotests/106, 214, 308: Read only one size line
|
|
|
|
RH-Author: Hanna Czenczek <hreitz@redhat.com>
|
|
RH-MergeRequest: 145: Show protocol-level information in qemu-img info
|
|
RH-Bugzilla: 1860292
|
|
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
RH-Commit: [10/12] 1554e0a92b92ed101a251478ccae43f45f6e071e (hreitz/qemu-kvm-c-9-s)
|
|
|
|
These tests read size information (sometimes disk size, sometimes
|
|
virtual size) from qemu-img info's output. Once qemu-img starts
|
|
printing info about child nodes, we are going to see multiple instances
|
|
of that per image, but these tests are only interested in the first one,
|
|
so use "head -n 1" to get it.
|
|
|
|
Signed-off-by: Hanna Reitz <hreitz@redhat.com>
|
|
Message-Id: <20220620162704.80987-11-hreitz@redhat.com>
|
|
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
|
|
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
(cherry picked from commit 74163adda3101b127943f7cbbf8fcccd2d472426)
|
|
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
|
|
---
|
|
tests/qemu-iotests/106 | 4 ++--
|
|
tests/qemu-iotests/214 | 6 ++++--
|
|
tests/qemu-iotests/308 | 4 ++--
|
|
3 files changed, 8 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/tests/qemu-iotests/106 b/tests/qemu-iotests/106
|
|
index 9d6adb542d..ae0fc46691 100755
|
|
--- a/tests/qemu-iotests/106
|
|
+++ b/tests/qemu-iotests/106
|
|
@@ -66,7 +66,7 @@ for create_mode in off falloc full; do
|
|
expected_size=$((expected_size + $GROWTH_SIZE))
|
|
fi
|
|
|
|
- actual_size=$($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep 'disk size')
|
|
+ actual_size=$($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep 'disk size' | head -n 1)
|
|
actual_size=$(echo "$actual_size" | sed -e 's/^[^0-9]*\([0-9]\+\).*$/\1/')
|
|
|
|
# The actual size may exceed the expected size, depending on the file
|
|
@@ -105,7 +105,7 @@ for growth_mode in falloc full; do
|
|
_make_test_img -o "extent_size_hint=0" 2G
|
|
$QEMU_IMG resize -f "$IMGFMT" --preallocation=$growth_mode "$TEST_IMG" +${GROWTH_SIZE}K
|
|
|
|
- actual_size=$($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep 'disk size')
|
|
+ actual_size=$($QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep 'disk size' | head -n 1)
|
|
actual_size=$(echo "$actual_size" | sed -e 's/^[^0-9]*\([0-9]\+\).*$/\1/')
|
|
|
|
if [ $actual_size -lt $GROWTH_SIZE ]; then
|
|
diff --git a/tests/qemu-iotests/214 b/tests/qemu-iotests/214
|
|
index c66e246ba2..55ffcd7f44 100755
|
|
--- a/tests/qemu-iotests/214
|
|
+++ b/tests/qemu-iotests/214
|
|
@@ -102,7 +102,8 @@ let data_size="8 * $cluster_size"
|
|
$QEMU_IO -c "write -P 0xaa 0 $data_size" "$TEST_IMG" \
|
|
2>&1 | _filter_qemu_io | _filter_testdir
|
|
sizeA=$($QEMU_IMG info --output=json "$TEST_IMG" |
|
|
- sed -n '/"actual-size":/ s/[^0-9]//gp')
|
|
+ sed -n '/"actual-size":/ s/[^0-9]//gp' |
|
|
+ head -n 1)
|
|
|
|
_make_test_img 2M -o cluster_size=$cluster_size
|
|
echo "Write compressed data:"
|
|
@@ -124,7 +125,8 @@ $QEMU_IO -c "write -P 0xcc $offset $data_size" "json:{\
|
|
_filter_qemu_io | _filter_testdir
|
|
|
|
sizeB=$($QEMU_IMG info --output=json "$TEST_IMG" |
|
|
- sed -n '/"actual-size":/ s/[^0-9]//gp')
|
|
+ sed -n '/"actual-size":/ s/[^0-9]//gp' |
|
|
+ head -n 1)
|
|
|
|
if [ $sizeA -lt $sizeB ]
|
|
then
|
|
diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308
|
|
index bde4aac2fa..09275e9a10 100755
|
|
--- a/tests/qemu-iotests/308
|
|
+++ b/tests/qemu-iotests/308
|
|
@@ -217,12 +217,12 @@ echo
|
|
echo '=== Remove export ==='
|
|
|
|
# Double-check that $EXT_MP appears as a non-empty file (the raw image)
|
|
-$QEMU_IMG info -f raw "$EXT_MP" | grep 'virtual size'
|
|
+$QEMU_IMG info -f raw "$EXT_MP" | grep 'virtual size' | head -n 1
|
|
|
|
fuse_export_del 'export-mp'
|
|
|
|
# See that the file appears empty again
|
|
-$QEMU_IMG info -f raw "$EXT_MP" | grep 'virtual size'
|
|
+$QEMU_IMG info -f raw "$EXT_MP" | grep 'virtual size' | head -n 1
|
|
|
|
echo
|
|
echo '=== Writable export ==='
|
|
--
|
|
2.31.1
|
|
|