[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 16/36] iotest: Test the blkverify mode of the Quorum
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 16/36] iotest: Test the blkverify mode of the Quorum driver |
Date: |
Mon, 5 Nov 2018 17:37:24 +0100 |
From: Alberto Garcia <address@hidden>
Signed-off-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
tests/qemu-iotests/081 | 30 ++++++++++++++++++++++++++++++
tests/qemu-iotests/081.out | 16 ++++++++++++++++
2 files changed, 46 insertions(+)
diff --git a/tests/qemu-iotests/081 b/tests/qemu-iotests/081
index da3fb0984b..0ea010afbf 100755
--- a/tests/qemu-iotests/081
+++ b/tests/qemu-iotests/081
@@ -168,6 +168,36 @@ echo "== checking that quorum is broken =="
$QEMU_IO -c "open -o $quorum" -c "read -P 0x32 0 $size" | _filter_qemu_io
+echo
+echo "== checking the blkverify mode with broken content =="
+
+quorum="driver=raw,file.driver=quorum,file.vote-threshold=2,file.blkverify=on"
+quorum="$quorum,file.children.0.file.filename=$TEST_DIR/1.raw"
+quorum="$quorum,file.children.1.file.filename=$TEST_DIR/2.raw"
+quorum="$quorum,file.children.0.driver=raw"
+quorum="$quorum,file.children.1.driver=raw"
+
+$QEMU_IO -c "open -o $quorum" -c "read -P 0x32 0 $size" | _filter_qemu_io
+
+echo
+echo "== writing the same data to both files =="
+
+$QEMU_IO -c "write -P 0x32 0 $size" "$TEST_DIR/1.raw" | _filter_qemu_io
+$QEMU_IO -c "write -P 0x32 0 $size" "$TEST_DIR/2.raw" | _filter_qemu_io
+
+echo
+echo "== checking the blkverify mode with valid content =="
+
+$QEMU_IO -c "open -o $quorum" -c "read -P 0x32 0 $size" | _filter_qemu_io
+
+echo
+echo "== checking the blkverify mode with invalid settings =="
+
+quorum="$quorum,file.children.2.file.filename=$TEST_DIR/3.raw"
+quorum="$quorum,file.children.2.driver=raw"
+
+$QEMU_IO -c "open -o $quorum" | _filter_qemu_io
+
# success, all done
echo "*** done"
rm -f $seq.full
diff --git a/tests/qemu-iotests/081.out b/tests/qemu-iotests/081.out
index 2533c31c78..2f12c890e9 100644
--- a/tests/qemu-iotests/081.out
+++ b/tests/qemu-iotests/081.out
@@ -55,4 +55,20 @@ wrote 10485760/10485760 bytes at offset 0
== checking that quorum is broken ==
read failed: Input/output error
+
+== checking the blkverify mode with broken content ==
+quorum: offset=0 bytes=10485760 contents mismatch at offset 0
+
+== writing the same data to both files ==
+wrote 10485760/10485760 bytes at offset 0
+10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+wrote 10485760/10485760 bytes at offset 0
+10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== checking the blkverify mode with valid content ==
+read 10485760/10485760 bytes at offset 0
+10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
+
+== checking the blkverify mode with invalid settings ==
+can't open: blkverify=on can only be set if there are exactly two files and
vote-threshold is 2
*** done
--
2.19.1
- [Qemu-block] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag, (continued)
- [Qemu-block] [PULL 07/36] crypto: initialize sector size even when opening with no IO flag, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 06/36] block/qcow2-bitmap: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 04/36] block/qcow2: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 08/36] qcow2: Get the request alignment for encrypted images from QCryptoBlock, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 09/36] block: change some function return type to bool, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 12/36] block/vhdx: Don't take address of fields in packed structs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 10/36] iotests: make 083 specific to raw, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 22/36] block: Require auto-read-only for existing fallbacks, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 30/36] option: Make option help nicer to read, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 15/36] quorum: Return an error if the blkverify mode has invalid settings, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 16/36] iotest: Test the blkverify mode of the Quorum driver,
Kevin Wolf <=
- [Qemu-block] [PULL 17/36] quorum: Forbid adding children in blkverify mode, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 31/36] chardev: Indent list of chardevs, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 19/36] block: Update flags in bdrv_set_read_only(), Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 18/36] iotest: Test x-blockdev-change on a Quorum, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 23/36] nbd: Support auto-read-only option, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 14/36] quorum: Remove quorum_err(), Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 11/36] vpc: Don't leak opts in vpc_open(), Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 28/36] block: Make auto-read-only=on default for -drive, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 32/36] qdev-monitor: Make device options help nicer, Kevin Wolf, 2018/11/05
- [Qemu-block] [PULL 35/36] vdi: Use a literal number of bytes for DEFAULT_CLUSTER_SIZE, Kevin Wolf, 2018/11/05