Patchwork [RFC,v2,21/23] qemu-iotests: Another concurrent multicluster allocation case

login
register
mail settings
Submitter Kevin Wolf
Date Feb. 13, 2013, 1:22 p.m.
Message ID <1360761733-25347-22-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/220144/
State New
Headers show

Comments

Kevin Wolf - Feb. 13, 2013, 1:22 p.m.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 tests/qemu-iotests/046     |   19 +++++++++++++++++++
 tests/qemu-iotests/046.out |   16 ++++++++++++++++
 2 files changed, 35 insertions(+), 0 deletions(-)

Patch

diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index e0176f4..6c73675 100755
--- a/tests/qemu-iotests/046
+++ b/tests/qemu-iotests/046
@@ -153,6 +153,20 @@  aio_write -P 101 0xaa000 0xe000
 resume A
 aio_flush
 EOF
+
+# First overlap to the next cluster, and then add a sequential write
+cat <<EOF
+break write_aio A
+aio_write -P 120 0xcc000 0x10000
+wait_break A
+break write_aio B
+aio_write -P 121 0xdc000 0x2000
+wait_break B
+resume A
+resume B
+aio_flush
+EOF
+
 }
 
 overlay_io | $QEMU_IO blkdebug::$TEST_IMG | _filter_qemu_io |\
@@ -203,6 +217,11 @@  function verify_io()
     echo read -P 10  0xa8000 0x2000
     echo read -P 101 0xaa000 0xe000
     echo read -P 110 0xb8000 0x8000
+
+    echo read -P 12  0xc0000 0xc000
+    echo read -P 120 0xcc000 0x10000
+    echo read -P 121 0xdc000 0x2000
+    echo read -P 13  0xde000 0x2000
 }
 
 verify_io | $QEMU_IO $TEST_IMG | _filter_qemu_io
diff --git a/tests/qemu-iotests/046.out b/tests/qemu-iotests/046.out
index 565360f..6e3d749 100644
--- a/tests/qemu-iotests/046.out
+++ b/tests/qemu-iotests/046.out
@@ -89,6 +89,14 @@  qemu-io> wrote 8192/8192 bytes at offset XXX
 8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 wrote 57344/57344 bytes at offset XXX
 56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io> qemu-io> blkdebug: Suspended request 'A'
+qemu-io> qemu-io> qemu-io> blkdebug: Suspended request 'B'
+qemu-io> qemu-io> blkdebug: Resuming request 'A'
+qemu-io> blkdebug: Resuming request 'B'
+qemu-io> wrote 65536/65536 bytes at offset XXX
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 8192/8192 bytes at offset XXX
+8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 qemu-io> 
 == Verify image content ==
 qemu-io> read 65536/65536 bytes at offset 0
@@ -159,5 +167,13 @@  qemu-io> read 57344/57344 bytes at offset 696320
 56 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 qemu-io> read 32768/32768 bytes at offset 753664
 32 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io> read 49152/49152 bytes at offset 786432
+48 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io> read 65536/65536 bytes at offset 835584
+64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io> read 8192/8192 bytes at offset 901120
+8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+qemu-io> read 8192/8192 bytes at offset 909312
+8 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
 qemu-io> No errors were found on the image.
 *** done