aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-09-25 20:32:31 +0200
committerMax Reitz <mreitz@redhat.com>2019-10-10 10:56:18 +0200
commitf2d86ade4da71d1f32ffc5977ea5417c20996919 (patch)
tree0e311db3ac896bf3689677c1f3967f54c3099270 /tests
parent285f595d74738f9f99c5b5b05005956e0d7c1b77 (diff)
downloadqemu-f2d86ade4da71d1f32ffc5977ea5417c20996919.tar.gz
iotests: Use stat -c %b in 125
125 should not use qemu-img to get the on-disk image size, because that reports it in a human-readable format that is useless to us. Just use stat instead (like we do to get the image file length). Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20190925183231.11196-4-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/qemu-iotests/1253
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/qemu-iotests/125 b/tests/qemu-iotests/125
index 0ef51f1e21e..4e31aa4e5fb 100755
--- a/tests/qemu-iotests/125
+++ b/tests/qemu-iotests/125
@@ -34,8 +34,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
get_image_size_on_host()
{
- $QEMU_IMG info -f "$IMGFMT" "$TEST_IMG" | grep "disk size" \
- | sed -e 's/^[^0-9]*\([0-9]\+\).*$/\1/'
+ echo $(($(stat -c '%b * %B' "$TEST_IMG_FILE")))
}
# get standard environment and filters