[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 52/56] iotests: Test creating overlay when guest runn
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 52/56] iotests: Test creating overlay when guest running |
Date: |
Fri, 9 Mar 2018 17:19:29 +0100 |
From: Fam Zheng <address@hidden>
Signed-off-by: Fam Zheng <address@hidden>
Message-id: address@hidden
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Max Reitz <address@hidden>
---
tests/qemu-iotests/153 | 8 +++++---
tests/qemu-iotests/153.out | 7 ++++---
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153
index fa25eb24bd..adfd02695b 100755
--- a/tests/qemu-iotests/153
+++ b/tests/qemu-iotests/153
@@ -32,6 +32,7 @@ _cleanup()
{
_cleanup_test_img
rm -f "${TEST_IMG}.base"
+ rm -f "${TEST_IMG}.overlay"
rm -f "${TEST_IMG}.convert"
rm -f "${TEST_IMG}.a"
rm -f "${TEST_IMG}.b"
@@ -177,8 +178,6 @@ rm -f "${TEST_IMG}.lnk" &>/dev/null
ln -s ${TEST_IMG} "${TEST_IMG}.lnk" || echo "Failed to create link"
_run_qemu_with_images "${TEST_IMG}.lnk" "${TEST_IMG}"
-echo
-echo "== Closing an image should unlock it =="
_launch_qemu
_send_qemu_cmd $QEMU_HANDLE \
@@ -193,7 +192,10 @@ _send_qemu_cmd $QEMU_HANDLE \
_run_cmd $QEMU_IO "${TEST_IMG}" -c 'write 0 512'
-echo "Closing drive"
+echo "Creating overlay with qemu-img when the guest is running should be
allowed"
+_run_cmd $QEMU_IMG create -f $IMGFMT -b "${TEST_IMG}" "${TEST_IMG}.overlay"
+
+echo "== Closing an image should unlock it =="
_send_qemu_cmd $QEMU_HANDLE \
"{ 'execute': 'human-monitor-command',
'arguments': { 'command-line': 'drive_del d0' } }" \
diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out
index 5b917b177c..34309cfb20 100644
--- a/tests/qemu-iotests/153.out
+++ b/tests/qemu-iotests/153.out
@@ -372,15 +372,16 @@ Is another process using the image?
== Symbolic link ==
QEMU_PROG: -drive if=none,file=TEST_DIR/t.qcow2: Failed to get "write" lock
Is another process using the image?
-
-== Closing an image should unlock it ==
{"return": {}}
Adding drive
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
can't open device TEST_DIR/t.qcow2: Failed to get "write" lock
Is another process using the image?
-Closing drive
+Creating overlay with qemu-img when the guest is running should be allowed
+
+_qemu_img_wrapper create -f qcow2 -b TEST_DIR/t.qcow2 TEST_DIR/t.qcow2.overlay
+== Closing an image should unlock it ==
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
Adding two and closing one
--
2.13.6
- [Qemu-block] [PULL 32/56] gluster: Support .bdrv_co_create, (continued)
- [Qemu-block] [PULL 32/56] gluster: Support .bdrv_co_create, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 30/56] file-posix: Support .bdrv_co_create, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 34/56] rbd: Factor out qemu_rbd_connect(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 35/56] rbd: Remove non-schema options from runtime_opts, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 38/56] rbd: Assign s->snap/image_name in qemu_rbd_open(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 42/56] sheepdog: QAPIfy "redundancy" create option, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 41/56] nfs: Support .bdrv_co_create, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 40/56] nfs: Use QAPI options in nfs_client_open(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 47/56] ssh: Support .bdrv_co_create, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 48/56] file-posix: Fix no-op bdrv_truncate() with falloc preallocation, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 52/56] iotests: Test creating overlay when guest running,
Kevin Wolf <=
- [Qemu-block] [PULL 51/56] qemu-iotests: Test ssh image creation over QMP, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 53/56] iotests: Mark all tests executable, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 44/56] ssh: Use QAPI BlockdevOptionsSsh object, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 45/56] ssh: QAPIfy host-key-check option, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 43/56] sheepdog: Support .bdrv_co_create, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 46/56] ssh: Pass BlockdevOptionsSsh to connect_to_ssh(), Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 49/56] block: Fail bdrv_truncate() with negative size, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 50/56] qemu-iotests: Test qcow2 over file image creation with QMP, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 54/56] iotests: Skip test for ENOMEM error, Kevin Wolf, 2018/03/09
- [Qemu-block] [PULL 56/56] qemu-iotests: fix 203 migration completion race, Kevin Wolf, 2018/03/09