From patchwork Fri Nov 29 16:45:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 295475 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E0F872C00A2 for ; Sat, 30 Nov 2013 04:06:06 +1100 (EST) Received: from localhost ([::1]:48559 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmRW0-0001Ay-AQ for incoming@patchwork.ozlabs.org; Fri, 29 Nov 2013 12:06:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmRDk-0004oM-OP for qemu-devel@nongnu.org; Fri, 29 Nov 2013 11:47:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VmRDf-0002z4-9X for qemu-devel@nongnu.org; Fri, 29 Nov 2013 11:47:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36898) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VmRDe-0002yw-QW for qemu-devel@nongnu.org; Fri, 29 Nov 2013 11:47:07 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rATGl52S015593 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 29 Nov 2013 11:47:05 -0500 Received: from dhcp-200-207.str.redhat.com (ovpn-116-75.ams2.redhat.com [10.36.116.75]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rATGkEqv019151; Fri, 29 Nov 2013 11:47:04 -0500 From: Kevin Wolf To: anthony@codemonkey.ws Date: Fri, 29 Nov 2013 17:45:46 +0100 Message-Id: <1385743555-27888-32-git-send-email-kwolf@redhat.com> In-Reply-To: <1385743555-27888-1-git-send-email-kwolf@redhat.com> References: <1385743555-27888-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 31/41] qemu-iotests: Drop local version of cancel_and_wait from 040 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Fam Zheng iotests.py already has one. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- 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