]> git.proxmox.com Git - mirror_qemu.git/commitdiff
iotests: Test failure to loosen restrictions
authorMax Reitz <mreitz@redhat.com>
Wed, 22 May 2019 17:03:52 +0000 (19:03 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 18 Jun 2019 14:41:10 +0000 (16:41 +0200)
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/qemu-iotests/182
tests/qemu-iotests/182.out

index 3a90ebfbfd61831fc2c061f23654bacd4b573717..7f494eb9bb3d1db1c8792d403bb3f8d9211239d6 100755 (executable)
@@ -152,6 +152,27 @@ success_or_failure=y _send_qemu_cmd $QEMU_HANDLE \
 
 _cleanup_qemu
 
+echo
+echo '=== Testing failure to loosen restrictions ==='
+echo
+
+_launch_qemu -drive file=$TEST_IMG,if=none,file.locking=on
+
+_send_qemu_cmd $QEMU_HANDLE \
+    "{'execute': 'qmp_capabilities'}" \
+    'return'
+
+_cleanup_test_img
+
+# When quitting qemu, it will try to drop its locks on the test image.
+# Because that file no longer exists, it will be unable to do so.
+# However, that is not fatal, so it should just move on.
+_send_qemu_cmd $QEMU_HANDLE \
+    "{'execute': 'quit'}" \
+    'return'
+
+wait=1 _cleanup_qemu
+
 # success, all done
 echo "*** done"
 rm -f $seq.full
index 33d41eea91502c280f3dd075b2a83431930c70b9..ffef23e32bc2306f768d871ec8dd285104cd3072 100644 (file)
@@ -15,4 +15,10 @@ Formatting 'TEST_DIR/t.qcow2.overlay', fmt=qcow2 size=197120 backing_file=TEST_D
 {"return": {}}
 {"return": {}}
 {"return": {}}
+
+=== Testing failure to loosen restrictions ===
+
+{"return": {}}
+{"return": {}}
+{"timestamp": {"seconds":  TIMESTAMP, "microseconds":  TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
 *** done