iotests: Make 150 use qemu-img map instead of du
authorMax Reitz <mreitz@redhat.com>
Tue, 29 Mar 2016 16:24:17 +0000 (18:24 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 12 Apr 2016 16:06:51 +0000 (18:06 +0200)
commit1fd06db03da73db868e54b838bb5ea02c10eea6c
tree8e76168587ec5ddf8f913e764af10706223e1b3c
parentc229708848cc77b0277e7260f7e739d441c1d086
iotests: Make 150 use qemu-img map instead of du

The actual on-disk size of a file does not only depend on factors qemu
can control. Thus, we should not depend on this to determine whether a
file has indeed been fully allocated. Instead, use qemu-img map and hope
that if an area is referenced, it is indeed allocated, too.

Also, limit the supported image formats to raw and qcow2 because the
actual qemu-img map output may depend on the image format.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Tested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/150
tests/qemu-iotests/150.out