From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWkOd-0005aM-4K for qemu-devel@nongnu.org; Mon, 08 Aug 2016 09:15:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWkOb-00060a-35 for qemu-devel@nongnu.org; Mon, 08 Aug 2016 09:15:10 -0400 From: Fam Zheng Date: Mon, 8 Aug 2016 21:13:29 +0800 Message-Id: <1470662013-19785-17-git-send-email-famz@redhat.com> In-Reply-To: <1470662013-19785-1-git-send-email-famz@redhat.com> References: <1470662013-19785-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v7 16/20] iotests: 130: Check image info locklessly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, rjones@redhat.com, John Snow , Jeff Cody , Markus Armbruster , Max Reitz , stefanha@redhat.com, den@openvz.org, pbonzini@redhat.com, berrange@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 --- 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) ccocomcommcommicommitcommit commit tcommit tecommit tescommit testcommit testdcommit testdicommit testdiscommit testdisk -(qemu) +(qemu) q 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) ccocomcommcommicommitcommit commit tcommit tecommit tescommit testcommit testdcommit testdicommit testdiscommit testdisk -(qemu) +(qemu) q image: TEST_DIR/t.IMGFMT file format: IMGFMT virtual size: 64M (67108864 bytes) -- 2.7.4