Commit f2d86ade authored by Max Reitz's avatar Max Reitz
Browse files

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: default avatarMax Reitz <mreitz@redhat.com>
Message-id: 20190925183231.11196-4-mreitz@redhat.com
Reviewed-by: default avatarEric Blake <eblake@redhat.com>
Signed-off-by: default avatarMax Reitz <mreitz@redhat.com>
parent 285f595d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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