From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWkOI-0005F7-PL for qemu-devel@nongnu.org; Mon, 08 Aug 2016 09:14:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWkOG-0005uI-Qw for qemu-devel@nongnu.org; Mon, 08 Aug 2016 09:14:49 -0400 From: Fam Zheng Date: Mon, 8 Aug 2016 21:13:26 +0800 Message-Id: <1470662013-19785-14-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 13/20] qemu-iotests: Wait for QEMU processes before checking image in 091 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 We should wait for the QEMU process to terminate and close the image before we check the data. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/091 | 3 +++ tests/qemu-iotests/091.out | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/091 b/tests/qemu-iotests/091 index 32bbd56..32aa5c3 100755 --- a/tests/qemu-iotests/091 +++ b/tests/qemu-iotests/091 @@ -95,6 +95,9 @@ echo "vm2: qemu process running successfully" echo "vm2: flush io, and quit" _send_qemu_cmd $h2 'qemu-io disk flush' "(qemu)" _send_qemu_cmd $h2 'quit' "" +echo "vm1: quit" +_send_qemu_cmd $h1 'quit' "" +wait echo "Check image pattern" ${QEMU_IO} -c "read -P 0x22 0 4M" "${TEST_IMG}" | _filter_testdir | _filter_qemu_io diff --git a/tests/qemu-iotests/091.out b/tests/qemu-iotests/091.out index 5017f8c..6658ca8 100644 --- a/tests/qemu-iotests/091.out +++ b/tests/qemu-iotests/091.out @@ -18,6 +18,7 @@ vm1: live migration completed vm2: qemu-io disk write complete vm2: qemu process running successfully vm2: flush io, and quit +vm1: quit Check image pattern read 4194304/4194304 bytes at offset 0 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) -- 2.7.4