aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/221
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qemu-iotests/221')
-rwxr-xr-xtests/qemu-iotests/2217
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221
index ca62b3baa1..7e6086b205 100755
--- a/tests/qemu-iotests/221
+++ b/tests/qemu-iotests/221
@@ -46,6 +46,13 @@ echo "=== Check mapping of unaligned raw image ==="
echo
_make_test_img 65537 # qemu-img create rounds size up
+
+# file-posix allocates the first block of any images when it is created;
+# the size of this block depends on the host page size and the file
+# system block size, none of which are constant. Discard the whole
+# image so we will not see this allocation in qemu-img map's output.
+$QEMU_IO -c 'discard 0 65537' "$TEST_IMG" | _filter_qemu_io
+
$QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map
truncate --size=65537 "$TEST_IMG" # so we resize it and check again