summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/176
diff options
context:
space:
mode:
authorEric Blake2017-11-17 20:04:22 +0100
committerMax Reitz2017-11-21 14:54:02 +0100
commit2807746ff178fe2e62638755693ece57aeeacc05 (patch)
tree8a99e3498a9b08a839a6508a9cf3589f138e186c /tests/qemu-iotests/176
parentblock: Close a BlockDriverState completely even when bs->drv is NULL (diff)
downloadqemu-2807746ff178fe2e62638755693ece57aeeacc05.tar.gz
qemu-2807746ff178fe2e62638755693ece57aeeacc05.tar.xz
qemu-2807746ff178fe2e62638755693ece57aeeacc05.zip
iotests: Fix 176 on 32-bit host
The contents of a qcow2 bitmap are rounded up to a size that matches the number of bits available for the granularity, but that granularity differs for 32-bit hosts (our default 64k cluster allows for 2M bitmap coverage per 'long') and 64-bit hosts (4M bitmap per 'long'). If the image is a multiple of 2M but not 4M, then the number of bytes occupied by the array of longs in memory differs between architecture, thus resulting in different SHA256 hashes. Furthermore (but untested by me), if our computation of the SHA256 hash is at all endian-dependent because of how we store data in memory, that's another variable we'd have to account for (ideally, we specified the bitmap stored in qcow2 as fixed-endian on disk, because the same qcow2 file must be usable across any architecture; but that says nothing about how we represent things in memory). But we already have test 165 to validate that bitmaps are stored correctly on disk, while this test is merely testing that the bitmap exists. So for this test, the easiest solution is to filter out the actual hash value. Broken in commit 4096974e. Reported-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Message-id: 20171117190422.23626-1-eblake@redhat.com Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/176')
-rwxr-xr-xtests/qemu-iotests/1763
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/qemu-iotests/176 b/tests/qemu-iotests/176
index 0f31a20294..b8dc17c592 100755
--- a/tests/qemu-iotests/176
+++ b/tests/qemu-iotests/176
@@ -52,7 +52,8 @@ _supported_os Linux
function run_qemu()
{
$QEMU -nographic -qmp stdio -serial none "$@" 2>&1 \
- | _filter_testdir | _filter_qmp | _filter_qemu
+ | _filter_testdir | _filter_qmp | _filter_qemu \
+ | sed 's/"sha256": ".\{64\}"/"sha256": HASH/'
}
for reason in snapshot bitmap; do