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: 727882 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)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vN7C25RLjz9rxm for ; Wed, 15 Feb 2017 03:28:30 +1100 (AEDT) Received: from localhost ([::1]:35742 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdfxs-0007VU-9c for incoming@patchwork.ozlabs.org; Tue, 14 Feb 2017 11:28:28 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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()