diff options
author | Kevin Wolf <kwolf@redhat.com> | 2009-07-16 19:11:09 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-02-22 16:17:02 +0100 |
commit | 9128ae5e617b67c95a27822a938bed1607119ba2 (patch) | |
tree | 2cb4dc8962897c78ce4e52ec4fa9583e8162d549 /tests/qemu-iotests/common.pattern | |
parent | 1670140005a82a4790991fdcd2eee290dbcf8f38 (diff) |
qemu-iotests: test qemu-img convert with backing file for the output image
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'tests/qemu-iotests/common.pattern')
-rw-r--r-- | tests/qemu-iotests/common.pattern | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern index 9e7f2f20db..12f813d817 100644 --- a/tests/qemu-iotests/common.pattern +++ b/tests/qemu-iotests/common.pattern @@ -18,6 +18,21 @@ # USA # +function do_is_allocated() { + local start=$1 + local size=$(( $2 / 512)) + local step=$3 + local count=$4 + + for i in `seq 1 $count`; do + echo alloc $(( start + i * step )) $size + done +} + +function is_allocated() { + do_is_allocated "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io +} + function do_io() { local op=$1 local start=$2 |