All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, rjones@redhat.com,
	John Snow <jsnow@redhat.com>, Jeff Cody <jcody@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	stefanha@redhat.com, den@openvz.org, pbonzini@redhat.com,
	berrange@redhat.com
Subject: [Qemu-devel] [PATCH v7 16/20] iotests: 130: Check image info locklessly
Date: Mon,  8 Aug 2016 21:13:29 +0800	[thread overview]
Message-ID: <1470662013-19785-17-git-send-email-famz@redhat.com> (raw)
In-Reply-To: <1470662013-19785-1-git-send-email-famz@redhat.com>

By the time _img_info is run, QEMU process's resources may still be on
its way being cleaned up, asynchronously, even though the process itself
is already gone after the "kill -KILL" and "wait" commands in
_cleanup_qemu.

Change the last HMP command to 'q' to ensure the locks are released.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/qemu-iotests/130     | 4 ++--
 tests/qemu-iotests/130.out | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130
index ecc8a5b..f14a04f 100755
--- a/tests/qemu-iotests/130
+++ b/tests/qemu-iotests/130
@@ -60,7 +60,7 @@ echo
 # Test that a backing file isn't written
 _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)'
+_send_qemu_cmd $QEMU_HANDLE 'q' '(qemu)'
 _cleanup_qemu
 _img_info | _filter_img_info
 
@@ -69,7 +69,7 @@ _img_info | _filter_img_info
 _make_test_img -F raw -b "$TEST_IMG.orig" 64M
 _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)'
+_send_qemu_cmd $QEMU_HANDLE 'q' '(qemu)'
 _cleanup_qemu
 _img_info | _filter_img_info
 
diff --git a/tests/qemu-iotests/130.out b/tests/qemu-iotests/130.out
index ae95b50..2422329 100644
--- a/tests/qemu-iotests/130.out
+++ b/tests/qemu-iotests/130.out
@@ -10,14 +10,14 @@ virtual size: 64M (67108864 bytes)
 
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) c^[[K^[[Dco^[[K^[[D^[[Dcom^[[K^[[D^[[D^[[Dcomm^[[K^[[D^[[D^[[D^[[Dcommi^[[K^[[D^[[D^[[D^[[D^[[Dcommit^[[K^[[D^[[D^[[D^[[D^[[D^[[Dcommit ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit t^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit te^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit tes^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit test^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testd^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testdi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testdis^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testdisk^[[K
-(qemu) 
+(qemu) q^[[K
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
 virtual size: 64M (67108864 bytes)
 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 backing_file=TEST_DIR/t.IMGFMT.orig backing_fmt=raw
 QEMU X.Y.Z monitor - type 'help' for more information
 (qemu) c^[[K^[[Dco^[[K^[[D^[[Dcom^[[K^[[D^[[D^[[Dcomm^[[K^[[D^[[D^[[D^[[Dcommi^[[K^[[D^[[D^[[D^[[D^[[Dcommit^[[K^[[D^[[D^[[D^[[D^[[D^[[Dcommit ^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit t^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit te^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit tes^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit test^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testd^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testdi^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testdis^[[K^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[D^[[Dcommit testdisk^[[K
-(qemu) 
+(qemu) q^[[K
 image: TEST_DIR/t.IMGFMT
 file format: IMGFMT
 virtual size: 64M (67108864 bytes)
-- 
2.7.4

  parent reply	other threads:[~2016-08-08 13:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 13:13 [Qemu-devel] [PATCH v7 00/20] block: Image locking series for 2.8 Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 01/20] block: Add flag bits for image locking Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 02/20] qapi: Add lock-mode in blockdev-add options Fam Zheng
2016-09-06 16:18   ` Kevin Wolf
2016-09-07  2:19     ` Fam Zheng
2016-09-22 14:58   ` Eric Blake
2016-09-23  4:01     ` Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 03/20] block: Add and parse "lock-mode" option for image locking Fam Zheng
2016-09-06 16:33   ` Kevin Wolf
2016-09-07  2:18     ` Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 04/20] block: Introduce image file locking Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 05/20] osdep: Add qemu_lock_fd and qemu_unlock_fd Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 06/20] raw-posix: Add image locking support Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 07/20] qemu-io: Add "-L" option for BDRV_O_NO_LOCK Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 08/20] qemu-img: Add "-L" option to sub commands Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 09/20] qemu-img: Update documentation of "-L" option Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 10/20] qemu-nbd: Add "--no-lock/-L" option Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 11/20] block: Don't lock drive-backup target image in none mode Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 12/20] qemu-iotests: 046: Move version detection out from verify_io Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 13/20] qemu-iotests: Wait for QEMU processes before checking image in 091 Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 14/20] qemu-iotests: 030: Disable image locking when checking test image Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 15/20] iotests: 087: Disable image locking in cases where file is shared Fam Zheng
2016-08-08 13:13 ` Fam Zheng [this message]
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 17/20] iotests: Disable image locking in 085 Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 18/20] tests: Use null-co:// instead of /dev/null Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 19/20] block: Turn on image locking by default Fam Zheng
2016-08-08 13:13 ` [Qemu-devel] [PATCH v7 20/20] qemu-iotests: Add test case 153 for image locking Fam Zheng
2016-08-08 13:59 ` [Qemu-devel] [PATCH v7 00/20] block: Image locking series for 2.8 no-reply
2016-08-09  4:42   ` Fam Zheng
2016-09-06  1:49 ` Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470662013-19785-17-git-send-email-famz@redhat.com \
    --to=famz@redhat.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=den@openvz.org \
    --cc=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rjones@redhat.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.