提交 ca3150da 编写于 作者: M Max Reitz 提交者: Michael Roth

iotests: Add test for -U/force-share conflicts

Signed-off-by: NMax Reitz <mreitz@redhat.com>
Message-id: 20180502202051.15493-4-mreitz@redhat.com
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NMax Reitz <mreitz@redhat.com>
(cherry picked from commit 4e7d73c5)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 9e724c05
......@@ -242,6 +242,23 @@ _run_cmd $QEMU_IO "${TEST_IMG}" -c 'write 0 512'
_cleanup_qemu
echo
echo "== Detecting -U and force-share conflicts =="
echo
echo 'No conflict:'
$QEMU_IMG info -U --image-opts driver=null-co,force-share=on
echo
echo 'Conflict:'
$QEMU_IMG info -U --image-opts driver=null-co,force-share=off
echo
echo 'No conflict:'
$QEMU_IO -c 'open -r -U -o driver=null-co,force-share=on'
echo
echo 'Conflict:'
$QEMU_IO -c 'open -r -U -o driver=null-co,force-share=off'
# success, all done
echo "*** done"
rm -f $seq.full
......
......@@ -399,4 +399,20 @@ Is another process using the image?
Closing the other
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
== Detecting -U and force-share conflicts ==
No conflict:
image: null-co://
file format: null-co
virtual size: 1.0G (1073741824 bytes)
disk size: unavailable
Conflict:
qemu-img: --force-share/-U conflicts with image options
No conflict:
Conflict:
-U conflicts with image options
*** done
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册