2019-10-15 22:37:05 +02:00
|
|
|
From: Bruce Rogers <brogers@suse.com>
|
|
|
|
Date: Tue, 15 Oct 2019 11:16:14 -0600
|
|
|
|
Subject: tests: Fix block tests to be compatible with membarrier configuration
|
|
|
|
|
|
|
|
The use of membarriers collides with the block test's practice of
|
2019-11-27 13:46:32 +01:00
|
|
|
SIGKILLing test vm's. Have them quit politely. Tests: 130, 153 - and
|
|
|
|
though test 161 seems to have the same issue, it is not yet fixed, but
|
|
|
|
just marked here as possibly needing a fix.
|
2019-10-15 22:37:05 +02:00
|
|
|
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
|
|
---
|
|
|
|
tests/qemu-iotests/130 | 6 ++++--
|
|
|
|
tests/qemu-iotests/130.out | 2 ++
|
|
|
|
tests/qemu-iotests/153 | 6 ++++--
|
|
|
|
tests/qemu-iotests/153.out | 4 ++++
|
2019-11-27 13:46:32 +01:00
|
|
|
4 files changed, 14 insertions(+), 4 deletions(-)
|
2019-10-15 22:37:05 +02:00
|
|
|
|
|
|
|
diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130
|
2021-04-30 23:53:49 +02:00
|
|
|
index 7257f096774f6e9e835479006ba4..bfb7bfda6b4d0925fccc87853cd2 100755
|
2019-10-15 22:37:05 +02:00
|
|
|
--- a/tests/qemu-iotests/130
|
|
|
|
+++ b/tests/qemu-iotests/130
|
2021-04-30 23:53:49 +02:00
|
|
|
@@ -64,7 +64,8 @@ echo
|
2019-10-15 22:37:05 +02:00
|
|
|
_launch_qemu -drive id=testdisk,file="$TEST_IMG",backing.file.filename="$TEST_IMG.base"
|
|
|
|
_send_qemu_cmd $QEMU_HANDLE "commit testdisk" "(qemu)"
|
|
|
|
_send_qemu_cmd $QEMU_HANDLE '' '(qemu)'
|
|
|
|
-_cleanup_qemu
|
|
|
|
+_send_qemu_cmd $QEMU_HANDLE 'quit' ''
|
|
|
|
+wait=1 _cleanup_qemu
|
|
|
|
_img_info | _filter_img_info
|
|
|
|
|
|
|
|
# Make sure that if there was a backing file that was just overridden on the
|
2021-04-30 23:53:49 +02:00
|
|
|
@@ -73,7 +74,8 @@ _make_test_img -F raw -b "$TEST_IMG.orig" 64M
|
2019-10-15 22:37:05 +02:00
|
|
|
_launch_qemu -drive id=testdisk,file="$TEST_IMG",backing.file.filename="$TEST_IMG.base",backing.driver=$IMGFMT
|
|
|
|
_send_qemu_cmd $QEMU_HANDLE "commit testdisk" "(qemu)"
|
|
|
|
_send_qemu_cmd $QEMU_HANDLE '' '(qemu)'
|
|
|
|
-_cleanup_qemu
|
|
|
|
+_send_qemu_cmd $QEMU_HANDLE 'quit' ''
|
|
|
|
+wait=1 _cleanup_qemu
|
|
|
|
_img_info | _filter_img_info
|
|
|
|
|
|
|
|
echo
|
|
|
|
diff --git a/tests/qemu-iotests/130.out b/tests/qemu-iotests/130.out
|
|
|
|
index e45285ccc311522481ac1b27ba99..7168bdf70c3eb32d4de0d28bb947 100644
|
|
|
|
--- a/tests/qemu-iotests/130.out
|
|
|
|
+++ b/tests/qemu-iotests/130.out
|
|
|
|
@@ -11,6 +11,7 @@ virtual size: 64 MiB (67108864 bytes)
|
|
|
|
QEMU X.Y.Z monitor - type 'help' for more information
|
|
|
|
(qemu) commit testdisk
|
|
|
|
(qemu)
|
|
|
|
+(qemu) quit
|
|
|
|
image: TEST_DIR/t.IMGFMT
|
|
|
|
file format: IMGFMT
|
|
|
|
virtual size: 64 MiB (67108864 bytes)
|
|
|
|
@@ -18,6 +19,7 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t
|
|
|
|
QEMU X.Y.Z monitor - type 'help' for more information
|
|
|
|
(qemu) commit testdisk
|
|
|
|
(qemu)
|
|
|
|
+(qemu) quit
|
|
|
|
image: TEST_DIR/t.IMGFMT
|
|
|
|
file format: IMGFMT
|
|
|
|
virtual size: 64 MiB (67108864 bytes)
|
|
|
|
diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153
|
2021-04-30 23:53:49 +02:00
|
|
|
index 607af590918aaccd12490493b42a..987158ca49a88cef0815ea86f39e 100755
|
2019-10-15 22:37:05 +02:00
|
|
|
--- a/tests/qemu-iotests/153
|
|
|
|
+++ b/tests/qemu-iotests/153
|
2021-04-30 23:53:49 +02:00
|
|
|
@@ -202,7 +202,8 @@ _send_qemu_cmd $QEMU_HANDLE \
|
2019-10-15 22:37:05 +02:00
|
|
|
'return'
|
|
|
|
_run_cmd $QEMU_IMG commit -b "${TEST_IMG}.b" "${TEST_IMG}.c"
|
|
|
|
|
|
|
|
-_cleanup_qemu
|
|
|
|
+_send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'quit' }" ''
|
|
|
|
+wait=1 _cleanup_qemu
|
|
|
|
|
|
|
|
_launch_qemu
|
|
|
|
|
2021-04-30 23:53:49 +02:00
|
|
|
@@ -254,7 +255,8 @@ _send_qemu_cmd $QEMU_HANDLE \
|
2019-10-15 22:37:05 +02:00
|
|
|
|
|
|
|
_run_cmd $QEMU_IO "${TEST_IMG}" -c 'write 0 512'
|
|
|
|
|
|
|
|
-_cleanup_qemu
|
|
|
|
+_send_qemu_cmd $QEMU_HANDLE "{ 'execute': 'quit' }" ''
|
|
|
|
+wait=1 _cleanup_qemu
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "== Detecting -U and force-share conflicts =="
|
|
|
|
diff --git a/tests/qemu-iotests/153.out b/tests/qemu-iotests/153.out
|
2021-02-05 20:59:39 +01:00
|
|
|
index ff8e55864a53501197bb4a66bf99..4e9c4607bdb3d46c24bad9e80f64 100644
|
2019-10-15 22:37:05 +02:00
|
|
|
--- a/tests/qemu-iotests/153.out
|
|
|
|
+++ b/tests/qemu-iotests/153.out
|
2020-08-12 00:53:07 +02:00
|
|
|
@@ -424,6 +424,8 @@ Is another process using the image [TEST_DIR/t.qcow2]?
|
2019-10-15 22:37:05 +02:00
|
|
|
_qemu_img_wrapper commit -b TEST_DIR/t.qcow2.b TEST_DIR/t.qcow2.c
|
2019-11-27 13:46:32 +01:00
|
|
|
{ 'execute': 'qmp_capabilities' }
|
2019-10-15 22:37:05 +02:00
|
|
|
{"return": {}}
|
|
|
|
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
|
|
|
|
+{"return": {}}
|
|
|
|
Adding drive
|
2021-02-05 20:59:39 +01:00
|
|
|
{ 'execute': 'human-monitor-command',
|
|
|
|
'arguments': { 'command-line': 'drive_add 0 if=none,id=d0,file=TEST_DIR/t.IMGFMT' } }
|
|
|
|
@@ -463,6 +465,8 @@ Closing the other
|
2019-10-15 22:37:05 +02:00
|
|
|
{"return": ""}
|
|
|
|
|
|
|
|
_qemu_io_wrapper TEST_DIR/t.qcow2 -c write 0 512
|
|
|
|
+{"return": {}}
|
|
|
|
+{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
|
|
|
|
|
|
|
|
== Detecting -U and force-share conflicts ==
|
|
|
|
|