thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

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

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