|
|
383d26 |
From 071df911bc33bc213570bf40135272c8cd3bcf77 Mon Sep 17 00:00:00 2001
|
|
|
383d26 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
383d26 |
Date: Mon, 18 Jun 2018 16:31:06 +0200
|
|
|
383d26 |
Subject: [PATCH 39/54] iotests: Add test for -U/force-share conflicts
|
|
|
383d26 |
|
|
|
383d26 |
RH-Author: Max Reitz <mreitz@redhat.com>
|
|
|
383d26 |
Message-id: <20180618163106.23010-4-mreitz@redhat.com>
|
|
|
383d26 |
Patchwork-id: 80773
|
|
|
383d26 |
O-Subject: [RHV-7.6 qemu-kvm-rhev PATCH 3/3] iotests: Add test for -U/force-share conflicts
|
|
|
383d26 |
Bugzilla: 1576598
|
|
|
383d26 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Fam Zheng <famz@redhat.com>
|
|
|
383d26 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
|
|
|
383d26 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
383d26 |
Message-id: 20180502202051.15493-4-mreitz@redhat.com
|
|
|
383d26 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
383d26 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
383d26 |
(cherry picked from commit 4e7d73c5fbd97e55ffe5af02f24d1f7dbe3bbf20)
|
|
|
383d26 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
383d26 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
383d26 |
---
|
|
|
383d26 |
tests/qemu-iotests/153 | 17 +++++++++++++++++
|
|
|
383d26 |
tests/qemu-iotests/153.out | 16 ++++++++++++++++
|
|
|
383d26 |
2 files changed, 33 insertions(+)
|
|
|
383d26 |
|
|
|
383d26 |
diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153
|
|
|
383d26 |
index a0fd815..ec508c7 100755
|
|
|
383d26 |
--- a/tests/qemu-iotests/153
|
|
|
383d26 |
+++ b/tests/qemu-iotests/153
|
|
|
383d26 |
@@ -242,6 +242,23 @@ _run_cmd $QEMU_IO "${TEST_IMG}" -c 'write 0 512'
|
|
|
383d26 |
|
|
|
383d26 |
_cleanup_qemu
|
|
|
383d26 |
|
|
|
383d26 |
+echo
|
|
|
383d26 |
+echo "== Detecting -U and force-share conflicts =="
|
|
|
383d26 |
+
|
|
|
383d26 |
+echo
|
|
|
383d26 |
+echo 'No conflict:'
|
|
|
383d26 |
+$QEMU_IMG info -U --image-opts driver=null-co,force-share=on
|
|
|
383d26 |
+echo
|
|
|
383d26 |
+echo 'Conflict:'
|
|
|
383d26 |
+$QEMU_IMG info -U --image-opts driver=null-co,force-share=off
|
|
|
383d26 |
+
|
|
|
383d26 |
+echo
|
|
|
383d26 |
+echo 'No conflict:'
|
|
|
383d26 |
+$QEMU_IO -c 'open -r -U -o driver=null-co,force-share=on'
|
|
|
383d26 |
+echo
|
|
|
383d26 |
+echo 'Conflict:'
|
|
|
383d26 |
+$QEMU_IO -c 'open -r -U -o driver=null-co,force-share=off'
|
|
|
383d26 |
+
|
|
|
383d26 |
# success, all done
|
|
|
383d26 |
echo "*** done"
|
|
|
383d26 |
rm -f $seq.full
|
|
|
383d26 |
diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out
|
|
|
383d26 |
index bb721cb..2510762 100644
|
|
|
383d26 |
--- a/tests/qemu-iotests/153.out
|
|
|
383d26 |
+++ b/tests/qemu-iotests/153.out
|
|
|
383d26 |
@@ -399,4 +399,20 @@ Is another process using the image?
|
|
|
383d26 |
Closing the other
|
|
|
383d26 |
|
|
|
383d26 |
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
|
|
|
383d26 |
+
|
|
|
383d26 |
+== Detecting -U and force-share conflicts ==
|
|
|
383d26 |
+
|
|
|
383d26 |
+No conflict:
|
|
|
383d26 |
+image: null-co://
|
|
|
383d26 |
+file format: null-co
|
|
|
383d26 |
+virtual size: 1.0G (1073741824 bytes)
|
|
|
383d26 |
+disk size: unavailable
|
|
|
383d26 |
+
|
|
|
383d26 |
+Conflict:
|
|
|
383d26 |
+qemu-img: --force-share/-U conflicts with image options
|
|
|
383d26 |
+
|
|
|
383d26 |
+No conflict:
|
|
|
383d26 |
+
|
|
|
383d26 |
+Conflict:
|
|
|
383d26 |
+-U conflicts with image options
|
|
|
383d26 |
*** done
|
|
|
383d26 |
--
|
|
|
383d26 |
1.8.3.1
|
|
|
383d26 |
|