qemu-iotests: make compare_images() common
commit3a3918c396c5caeab35a7f51af905172a13d996a
authorStefan Hajnoczi <stefanha@redhat.com>
Tue, 28 May 2013 15:11:36 +0000 (28 17:11 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 4 Jun 2013 10:11:58 +0000 (4 12:11 +0200)
tree4faa0b5a8e4f5be73e9c530f92c2359b859385ac
parent2575fe16d257a1fb5f452391b868b3c3263a9aca
qemu-iotests: make compare_images() common

The iotests.compare_images() function returns True if two image files
have the identical data.  Previously this was implemented by converting
images to raw and then comparing their contents using Python.  Since
"qemu-img compare" is now available and is more efficient, switch to it.

This function will be reused by the 'drive-backup' test case.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/041
tests/qemu-iotests/iotests.py