]> git.ipfire.org Git - thirdparty/qemu.git/blobdiff - tests/qemu-iotests/153
iotests: Add test for -U/force-share conflicts
[thirdparty/qemu.git] / tests / qemu-iotests / 153
index fa25eb24bd2815ff3ae9df2ce4ff5becc74e2c4d..b3fa308171332de007ecaa13b3a892b86e86d4c6 100755 (executable)
@@ -228,6 +228,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