diff options
author | Alberto Garcia <berto@igalia.com> | 2018-10-17 17:33:51 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-11-05 15:09:54 +0100 |
commit | 82c4c85978da41294fbd1d621fec373a4be6788f (patch) | |
tree | 405955e7ca7dc116a2751a3bd7753bd7668dc7e1 /tests/qemu-iotests/081 | |
parent | 83aedca872b5c2bacf9fd35f62cf96479fbf062e (diff) |
iotest: Test the blkverify mode of the Quorum driver
Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/081')
-rwxr-xr-x | tests/qemu-iotests/081 | 30 |
1 files changed, 30 insertions, 0 deletions
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 |