Blame SOURCES/kvm-iotests-Tweak-221-sizing-for-different-hole-granular.patch

4ec855
From 6f5c54a54c05143cf9f69a626b398886d1c51358 Mon Sep 17 00:00:00 2001
4ec855
From: Thomas Huth <thuth@redhat.com>
4ec855
Date: Fri, 30 Aug 2019 12:56:25 +0100
4ec855
Subject: [PATCH 07/10] iotests: Tweak 221 sizing for different hole
4ec855
 granularities
4ec855
4ec855
RH-Author: Thomas Huth <thuth@redhat.com>
4ec855
Message-id: <20190830125628.23668-3-thuth@redhat.com>
4ec855
Patchwork-id: 90213
4ec855
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH v2 2/5] iotests: Tweak 221 sizing for different hole granularities
4ec855
Bugzilla: 1738839
4ec855
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
4ec855
RH-Acked-by: Max Reitz <mreitz@redhat.com>
4ec855
RH-Acked-by: David Hildenbrand <david@redhat.com>
4ec855
4ec855
From: Eric Blake <eblake@redhat.com>
4ec855
4ec855
For some particular configurations of ext4, sizing an image to 84
4ec855
sectors + 1 byte causes test failures when the size of the hole is
4ec855
rounded to a 4k alignment. Let's instead size things to 128 sectors +
4ec855
1 byte, as the 64k boundary is more likely to work with various hole
4ec855
granularities.
4ec855
4ec855
Reported-by: Thomas Huth <thuth@redhat.com>
4ec855
Signed-off-by: Eric Blake <eblake@redhat.com>
4ec855
Message-Id: <20190506172111.31594-1-eblake@redhat.com>
4ec855
Tested-by: Thomas Huth <thuth@redhat.com>
4ec855
(cherry picked from commit d3192de752cd6d383d38e50341b39d9550d21fa8)
4ec855
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
4ec855
---
4ec855
 tests/qemu-iotests/221     | 10 +++++-----
4ec855
 tests/qemu-iotests/221.out | 20 ++++++++++----------
4ec855
 2 files changed, 15 insertions(+), 15 deletions(-)
4ec855
4ec855
diff --git a/tests/qemu-iotests/221 b/tests/qemu-iotests/221
4ec855
index 2cc29ba..75aa192 100755
4ec855
--- a/tests/qemu-iotests/221
4ec855
+++ b/tests/qemu-iotests/221
4ec855
@@ -3,7 +3,7 @@
4ec855
 # Test qemu-img vs. unaligned images
4ec855
 # (See also 253, which is the O_DIRECT version)
4ec855
 #
4ec855
-# Copyright (C) 2018 Red Hat, Inc.
4ec855
+# Copyright (C) 2018-2019 Red Hat, Inc.
4ec855
 #
4ec855
 # This program is free software; you can redistribute it and/or modify
4ec855
 # it under the terms of the GNU General Public License as published by
4ec855
@@ -46,16 +46,16 @@ echo
4ec855
 echo "=== Check mapping of unaligned raw image ==="
4ec855
 echo
4ec855
 
4ec855
-_make_test_img 43009 # qemu-img create rounds size up
4ec855
+_make_test_img 65537 # qemu-img create rounds size up
4ec855
 $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map
4ec855
 
4ec855
-truncate --size=43009 "$TEST_IMG" # so we resize it and check again
4ec855
+truncate --size=65537 "$TEST_IMG" # so we resize it and check again
4ec855
 $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map
4ec855
 
4ec855
-$QEMU_IO -c 'w 43008 1' "$TEST_IMG" | _filter_qemu_io # writing also rounds up
4ec855
+$QEMU_IO -c 'w 65536 1' "$TEST_IMG" | _filter_qemu_io # writing also rounds up
4ec855
 $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map
4ec855
 
4ec855
-truncate --size=43009 "$TEST_IMG" # so we resize it and check again
4ec855
+truncate --size=65537 "$TEST_IMG" # so we resize it and check again
4ec855
 $QEMU_IMG map --output=json "$TEST_IMG" | _filter_qemu_img_map
4ec855
 
4ec855
 # success, all done
4ec855
diff --git a/tests/qemu-iotests/221.out b/tests/qemu-iotests/221.out
4ec855
index a9c0190..9f9dd52 100644
4ec855
--- a/tests/qemu-iotests/221.out
4ec855
+++ b/tests/qemu-iotests/221.out
4ec855
@@ -2,15 +2,15 @@ QA output created by 221
4ec855
 
4ec855
 === Check mapping of unaligned raw image ===
4ec855
 
4ec855
-Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=43009
4ec855
-[{ "start": 0, "length": 43520, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
-[{ "start": 0, "length": 43520, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
-wrote 1/1 bytes at offset 43008
4ec855
+Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=65537
4ec855
+[{ "start": 0, "length": 66048, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
+[{ "start": 0, "length": 66048, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
+wrote 1/1 bytes at offset 65536
4ec855
 1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
4ec855
-[{ "start": 0, "length": 40960, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
4ec855
-{ "start": 40960, "length": 2049, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
4ec855
-{ "start": 43009, "length": 511, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
-[{ "start": 0, "length": 40960, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
4ec855
-{ "start": 40960, "length": 2049, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
4ec855
-{ "start": 43009, "length": 511, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
+[{ "start": 0, "length": 65536, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
4ec855
+{ "start": 65536, "length": 1, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
4ec855
+{ "start": 65537, "length": 511, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
+[{ "start": 0, "length": 65536, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
4ec855
+{ "start": 65536, "length": 1, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
4ec855
+{ "start": 65537, "length": 511, "depth": 0, "zero": true, "data": false, "offset": OFFSET}]
4ec855
 *** done
4ec855
-- 
4ec855
1.8.3.1
4ec855