|
|
ae23c9 |
From 471ed976b9bd7ed28c1cd2bf514e69098495f4ed Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Date: Wed, 3 Apr 2019 17:13:08 +0100
|
|
|
ae23c9 |
Subject: [PATCH 01/11] iotests: 153: Fix dead code
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Message-id: <20190403171315.20841-2-mreitz@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 85399
|
|
|
ae23c9 |
O-Subject: [RHEL-8.1 qemu-kvm PATCH 1/8] iotests: 153: Fix dead code
|
|
|
ae23c9 |
Bugzilla: 1694148
|
|
|
ae23c9 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Stefano Garzarella <sgarzare@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
From: Fam Zheng <famz@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
This step was left behind my mistake. As suggested by the echoed text,
|
|
|
ae23c9 |
the intention was to test two devices with the same image, with
|
|
|
ae23c9 |
different options. The behavior should be the same as two QEMU
|
|
|
ae23c9 |
processes. Complete it.
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 0e1a582750269d3dde0481ca034b08a5784e430c)
|
|
|
ae23c9 |
Signed-off-by: Max Reitz <mreitz@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
tests/qemu-iotests/153 | 2 ++
|
|
|
ae23c9 |
tests/qemu-iotests/153.out | 25 +++++++++++++++++++++++++
|
|
|
ae23c9 |
2 files changed, 27 insertions(+)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153
|
|
|
ae23c9 |
index 673813c..0daeb1b 100755
|
|
|
ae23c9 |
--- a/tests/qemu-iotests/153
|
|
|
ae23c9 |
+++ b/tests/qemu-iotests/153
|
|
|
ae23c9 |
@@ -162,6 +162,7 @@ for opts1 in "" "read-only=on" "read-only=on,force-share=on"; do
|
|
|
ae23c9 |
_cleanup_qemu
|
|
|
ae23c9 |
done
|
|
|
ae23c9 |
|
|
|
ae23c9 |
+test_opts="read-only=off read-only=on read-only=on,force-share=on"
|
|
|
ae23c9 |
for opt1 in $test_opts; do
|
|
|
ae23c9 |
for opt2 in $test_opts; do
|
|
|
ae23c9 |
echo
|
|
|
ae23c9 |
@@ -170,6 +171,7 @@ for opt1 in $test_opts; do
|
|
|
ae23c9 |
done
|
|
|
ae23c9 |
done
|
|
|
ae23c9 |
|
|
|
ae23c9 |
+echo
|
|
|
ae23c9 |
echo "== Creating ${TEST_IMG}.[abc] ==" | _filter_testdir
|
|
|
ae23c9 |
(
|
|
|
ae23c9 |
$QEMU_IMG create -f qcow2 "${TEST_IMG}.a" -b "${TEST_IMG}"
|
|
|
ae23c9 |
diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out
|
|
|
ae23c9 |
index 3492ba7..93eaf10 100644
|
|
|
ae23c9 |
--- a/tests/qemu-iotests/153.out
|
|
|
ae23c9 |
+++ b/tests/qemu-iotests/153.out
|
|
|
ae23c9 |
@@ -369,6 +369,31 @@ _qemu_img_wrapper bench -U -w -c 1 TEST_DIR/t.qcow2
|
|
|
ae23c9 |
qemu-img: Could not open 'TEST_DIR/t.qcow2': force-share=on can only be used with read-only images
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Round done
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=off - read-only=off) ==
|
|
|
ae23c9 |
+QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=off: Failed to get "write" lock
|
|
|
ae23c9 |
+Is another process using the image?
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=off - read-only=on) ==
|
|
|
ae23c9 |
+QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=on: Failed to get shared "write" lock
|
|
|
ae23c9 |
+Is another process using the image?
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=off - read-only=on,force-share=on) ==
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=on - read-only=off) ==
|
|
|
ae23c9 |
+QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2,read-only=off: Failed to get "write" lock
|
|
|
ae23c9 |
+Is another process using the image?
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=on - read-only=on) ==
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=on - read-only=on,force-share=on) ==
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=on,force-share=on - read-only=off) ==
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=on,force-share=on - read-only=on) ==
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
+== Two devices with the same image (read-only=on,force-share=on - read-only=on,force-share=on) ==
|
|
|
ae23c9 |
+
|
|
|
ae23c9 |
== Creating TEST_DIR/t.qcow2.[abc] ==
|
|
|
ae23c9 |
Formatting 'TEST_DIR/t.IMGFMT.a', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT
|
|
|
ae23c9 |
Formatting 'TEST_DIR/t.IMGFMT.b', fmt=IMGFMT size=33554432 backing_file=TEST_DIR/t.IMGFMT
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|