From patchwork Tue Feb 14 16:21:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 9572217 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E9BF60573 for ; Tue, 14 Feb 2017 16:27:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88344281E1 for ; Tue, 14 Feb 2017 16:27:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D0F228425; Tue, 14 Feb 2017 16:27:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E58E8281E1 for ; Tue, 14 Feb 2017 16:27:54 +0000 (UTC) Received: from localhost ([::1]:35740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdfxJ-0006vB-VQ for patchwork-qemu-devel@patchwork.kernel.org; Tue, 14 Feb 2017 11:27:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdfr2-00016R-Mv for qemu-devel@nongnu.org; Tue, 14 Feb 2017 11:21:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdfr1-0004Ko-PJ for qemu-devel@nongnu.org; Tue, 14 Feb 2017 11:21:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37166) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cdfqy-0004Jd-Pe; Tue, 14 Feb 2017 11:21:20 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 029843B3C7; Tue, 14 Feb 2017 16:21:21 +0000 (UTC) Received: from localhost (ovpn-116-19.phx2.redhat.com [10.3.116.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C8FE22DB57; Tue, 14 Feb 2017 16:21:20 +0000 (UTC) From: Jeff Cody To: qemu-devel@nongnu.org Date: Tue, 14 Feb 2017 11:21:17 -0500 Message-Id: <7b453d448bc0c0d0e78dd8dd4359590e1cbbe3b8.1487088544.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 14 Feb 2017 16:21:21 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] qemu-iotests: add ability to exclude certain protocols from tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Add the ability for shell script tests to exclude specific protocols. This is useful to allow all protocols except ones known to not support a feature used in the test (e.g. .bdrv_create). Signed-off-by: Jeff Cody --- tests/qemu-iotests/common.rc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index a3d904f..6c0fd4c 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -379,6 +379,18 @@ _supported_proto() _notrun "not suitable for this image protocol: $IMGPROTO" } +# tests whether $IMGPROTO is specified as an unsupported image protocol for a test +# +_unsupported_proto() +{ + for f; do + if [ "$f" = "$IMGPROTO" ]; then + _notrun "not suitable for this image protocol: $IMGPROTO" + return + fi + done +} + # tests whether the host OS is one of the supported OSes for a test # _supported_os()