iotests: Test creating overlay when guest running
PATCH v2 1/1 iotests: Test creating overlay when guest running
Signed-off-by Fam Zheng <[email protected]>
---
v2: Actually test the thing. [Kevin]
--- tests/qemu-iotests/153 | 8 +++++--- tests/qemu-iotests/153.out | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-)
tests/qemu-iotests/153 +5 -3
@@ -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' } }" \
tests/qemu-iotests/153.out +4 -3
@@ -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
Signature · 1 line
2.14.3
Quoted 9 lines · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>---
v2: Actually test the thing. [Kevin]
--- tests/qemu-iotests/153 | 8 +++++--- tests/qemu-iotests/153.out | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-)
Reviewed-by Eric Blake <[email protected]>
tests/qemu-iotests/153 _cleanup() · line 35
Quoted 10 lines
tests/qemu-iotests/153 +1
-0@@ -32,6 +32,7 @@ _cleanup() { _cleanup_test_img rm -f "${TEST_IMG}.base" + rm -f "${TEST_IMG}.overlay"
Trivial conflict with Jeff's work to do per-test temporary directories in iotests.
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
Ping?
Quoted 32 lines · Eric Blake
Quoted 9 lines · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>---
v2: Actually test the thing. [Kevin]
--- tests/qemu-iotests/153 | 8 +++++--- tests/qemu-iotests/153.out | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-)Reviewed-by Eric Blake <[email protected]>tests/qemu-iotests/153 _cleanup() · line 35
Quoted 10 lines
tests/qemu-iotests/153 +1
-0@@ -32,6 +32,7 @@ _cleanup() { _cleanup_test_img rm -f "${TEST_IMG}.base" + rm -f "${TEST_IMG}.overlay"Trivial conflict with Jeff's work to do per-test temporary directories in iotests.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Quoted 1 line · Fam Zheng
Ping?
Ping?
Max Reitz
AppliedQuoted 9 lines · Fam Zheng
Signed-off-by Fam Zheng <[email protected]>---
v2: Actually test the thing. [Kevin]
--- tests/qemu-iotests/153 | 8 +++++--- tests/qemu-iotests/153.out | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-)
Thanks, applied to my block tree:
https://github.com/XanClic/qemu/commits/block
Max