From patchwork Mon Dec 16 17:08:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 11294853 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DBB97930 for ; Mon, 16 Dec 2019 17:29:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1042206E0 for ; Mon, 16 Dec 2019 17:29:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="E18yVHlM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B1042206E0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:57592 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iguB9-0006vE-Nc for patchwork-qemu-devel@patchwork.kernel.org; Mon, 16 Dec 2019 12:29:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49819) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igts0-0005IE-Rj for qemu-devel@nongnu.org; Mon, 16 Dec 2019 12:09:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igtry-0004Zb-Pn for qemu-devel@nongnu.org; Mon, 16 Dec 2019 12:09:19 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:34075 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1igtrx-0004Xw-TS for qemu-devel@nongnu.org; Mon, 16 Dec 2019 12:09:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576516156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IDVqTpY3pjj42+37hfJNvN2IixURt4Ln1YS2ABghS38=; b=E18yVHlM9wRtsfV/T/NR08bTlPwZFHvGvjng1ERJ/i4UB1+b15teTX/qPl9groka5BCE2s 60JKxWRzZyx/KbVMVCOPxvJ96VjTUUV1IUt0HSEN6g2KVknS2BEBCITI2FKuPs2BlbmXqH /xnCE+Hze8wUCaYBXdeQoEfQ/so9Jac= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-394-cJCzuQnwMKCl_U_4FalFgw-1; Mon, 16 Dec 2019 12:09:15 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BFDA5102CE16; Mon, 16 Dec 2019 17:09:14 +0000 (UTC) Received: from linux.fritz.box.com (ovpn-117-54.ams2.redhat.com [10.36.117.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E3736FEE8; Mon, 16 Dec 2019 17:09:13 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Subject: [PATCH 09/10] iotests: 207: Remove duplication with VM.blockdev_create() Date: Mon, 16 Dec 2019 18:08:56 +0100 Message-Id: <20191216170857.11880-10-kwolf@redhat.com> In-Reply-To: <20191216170857.11880-1-kwolf@redhat.com> References: <20191216170857.11880-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: cJCzuQnwMKCl_U_4FalFgw-1 X-Mimecast-Spam-Score: 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The blockdev_create() function in this test case adds another filter to the logging, but provides otherwise the same functionality as VM.blockdev_create() from iotests.py. Make it a thin wrapper around the iotests.py function. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/207 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/qemu-iotests/207 b/tests/qemu-iotests/207 index ec8c1d06f0..812ab34e47 100755 --- a/tests/qemu-iotests/207 +++ b/tests/qemu-iotests/207 @@ -35,13 +35,7 @@ def filter_hash(qmsg): return iotests.filter_qmp(qmsg, _filter) def blockdev_create(vm, options): - result = vm.qmp_log('blockdev-create', job_id='job0', options=options, - filters=[iotests.filter_qmp_testfiles, filter_hash]) - - if 'return' in result: - assert result['return'] == {} - vm.run_job('job0') - iotests.log("") + vm.blockdev_create(options, filters=[iotests.filter_qmp_testfiles, filter_hash]) with iotests.FilePath('t.img') as disk_path, \ iotests.VM() as vm: