aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/165
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-09-25 09:55:24 -0500
committerKevin Wolf <kwolf@redhat.com>2017-10-06 16:28:58 +0200
commit49d741b5041b79214db58f364cebe2f367517711 (patch)
treeed74cc93cfcbf73fc4e9044ba9c48f883315b388 /tests/qemu-iotests/165
parentab94db6f7609e562b5f68cc71807d5d50e24e224 (diff)
downloadqemu-49d741b5041b79214db58f364cebe2f367517711.zip
qemu-49d741b5041b79214db58f364cebe2f367517711.tar.gz
qemu-49d741b5041b79214db58f364cebe2f367517711.tar.bz2
qcow2: Switch store_bitmap_data() to byte-based iteration
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. iotests 165 was rather weak - on a default 64k-cluster image, where bitmap granularity also defaults to 64k bytes, a single cluster of the bitmap table thus covers (64*1024*8) bits which each cover 64k bytes, or 32G of image space. But the test only uses a 1G image, so it cannot trigger any more than one loop of the code in store_bitmap_data(); and it was writing to the first cluster. In order to test that we are properly aligning which portions of the bitmap are being written to the file, we really want to test a case where the first dirty bit returned by bdrv_dirty_iter_next() is not aligned to the start of a cluster, which we can do by modifying the test to write data that doesn't happen to fall in the first cluster of the image. Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/165')
-rwxr-xr-xtests/qemu-iotests/1652
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165
index 74d7b79..a3932db 100755
--- a/tests/qemu-iotests/165
+++ b/tests/qemu-iotests/165
@@ -27,7 +27,7 @@ disk = os.path.join(iotests.test_dir, 'disk')
disk_size = 0x40000000 # 1G
# regions for qemu_io: (start, count) in bytes
-regions1 = ((0, 0x100000),
+regions1 = ((0x0fff00, 0x10000),
(0x200000, 0x100000))
regions2 = ((0x10000000, 0x20000),