aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/308
diff options
context:
space:
mode:
authorHanna Reitz <hreitz@redhat.com>2022-06-20 18:27:02 +0200
committerKevin Wolf <kwolf@redhat.com>2023-02-01 16:52:33 +0100
commit74163adda3101b127943f7cbbf8fcccd2d472426 (patch)
tree9abd3d159664229f79c1a2841f08346c05ff81b2 /tests/qemu-iotests/308
parentbcc6777ad6facede73c0cf8b1700045bf4365f7d (diff)
downloadqemu-74163adda3101b127943f7cbbf8fcccd2d472426.zip
qemu-74163adda3101b127943f7cbbf8fcccd2d472426.tar.gz
qemu-74163adda3101b127943f7cbbf8fcccd2d472426.tar.bz2
iotests/106, 214, 308: Read only one size line
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>
Diffstat (limited to 'tests/qemu-iotests/308')
-rwxr-xr-xtests/qemu-iotests/3084
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/qemu-iotests/308 b/tests/qemu-iotests/308
index bde4aac..09275e9 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 ==='