From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViIqW-0000cX-2H for qemu-devel@nongnu.org; Mon, 18 Nov 2013 02:02:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ViIqN-0002R1-2e for qemu-devel@nongnu.org; Mon, 18 Nov 2013 02:02:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ViIqM-0002Qi-Qe for qemu-devel@nongnu.org; Mon, 18 Nov 2013 02:01:58 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rAI71wHB011679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Nov 2013 02:01:58 -0500 From: Fam Zheng Date: Mon, 18 Nov 2013 15:01:48 +0800 Message-Id: <1384758111-24143-2-git-send-email-famz@redhat.com> In-Reply-To: <1384758111-24143-1-git-send-email-famz@redhat.com> References: <1384758111-24143-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [PATCH v5 1/4] qemu-iotests: Drop local version of cancel_and_wait from 040 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, mreitz@redhat.com iotests.py already has one. Signed-off-by: Fam Zheng --- tests/qemu-iotests/040 | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040 index a2e18c5..0e85136 100755 --- a/tests/qemu-iotests/040 +++ b/tests/qemu-iotests/040 @@ -39,21 +39,6 @@ class ImageCommitTestCase(iotests.QMPTestCase): result = self.vm.qmp('query-block-jobs') self.assert_qmp(result, 'return', []) - def cancel_and_wait(self, drive='drive0'): - '''Cancel a block job and wait for it to finish''' - result = self.vm.qmp('block-job-cancel', device=drive) - self.assert_qmp(result, 'return', {}) - - cancelled = False - while not cancelled: - for event in self.vm.get_qmp_events(wait=True): - if event['event'] == 'BLOCK_JOB_CANCELLED': - self.assert_qmp(event, 'data/type', 'commit') - self.assert_qmp(event, 'data/device', drive) - cancelled = True - - self.assert_no_active_commit() - class TestSingleDrive(ImageCommitTestCase): image_len = 1 * 1024 * 1024 test_len = 1 * 1024 * 256 -- 1.8.4.2