diff options
author | Kevin Wolf <kwolf@redhat.com> | 2009-07-20 14:35:43 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-02-22 16:17:02 +0100 |
commit | 9c9afe576f88415a4b15ec434e0d8491f4fc36dc (patch) | |
tree | e8d3ed2a9106dca6eda85de3424c47eba7b4fa63 | |
parent | 713d76e82c4196342665b537c68aa8b3a17fb9cf (diff) |
qemu-iotests: common.pattern: allow spaces in io() operation
We need to be able to pass "write -b" as an operation to the pattern testing
functions. Unfortunately, this contains a space character...
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | tests/qemu-iotests/common.pattern | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern index 63df923412..08e1cda084 100644 --- a/tests/qemu-iotests/common.pattern +++ b/tests/qemu-iotests/common.pattern @@ -46,18 +46,18 @@ function do_io() { } function io_pattern() { - do_io $@ | $QEMU_IO $TEST_IMG | _filter_qemu_io + do_io "$@" | $QEMU_IO $TEST_IMG | _filter_qemu_io } function io() { local start=$2 local pattern=$(( (start >> 9) % 256 )) - do_io $@ $pattern | $QEMU_IO $TEST_IMG | _filter_qemu_io + do_io "$@" $pattern | $QEMU_IO $TEST_IMG | _filter_qemu_io } function io_zero() { - do_io $@ 0 | $QEMU_IO $TEST_IMG | _filter_qemu_io + do_io "$@" 0 | $QEMU_IO $TEST_IMG | _filter_qemu_io } function io_test() { @@ -65,28 +65,28 @@ function io_test() { local offset=$2 # Complete clusters (size = 4k) - io $op $offset 4096 4096 256 + io "$op" $offset 4096 4096 256 offset=$((offset + 256 * 4096)) # From somewhere in the middle to the end of a cluster - io $op $((offset + 2048)) 2048 4096 256 + io "$op" $((offset + 2048)) 2048 4096 256 offset=$((offset + 256 * 4096)) # From the start to somewhere in the middle of a cluster - io $op $offset 2048 4096 256 + io "$op" $offset 2048 4096 256 offset=$((offset + 256 * 4096)) # Completely misaligned (and small) - io $op $((offset + 1024)) 2048 4096 256 + io "$op" $((offset + 1024)) 2048 4096 256 offset=$((offset + 256 * 4096)) # Spanning multiple clusters - io $op $((offset + 2048)) 8192 12288 64 + io "$op" $((offset + 2048)) 8192 12288 64 offset=$((offset + 64 * 12288)) # Spanning multiple L2 tables # L2 table size: 512 clusters of 4k = 2M - io $op $((offset + 2048)) 4194304 4999680 8 + io "$op" $((offset + 2048)) 4194304 4999680 8 offset=$((offset + 8 * 4999680)) if false; then |