From patchwork Mon Oct 19 04:28:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Yamamoto X-Patchwork-Id: 532123 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (unknown [IPv6:2600:3c00::f03c:91ff:fe6e:bdf7]) by ozlabs.org (Postfix) with ESMTP id 87A351401E7 for ; Mon, 19 Oct 2015 15:30:04 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id B544F1090B; Sun, 18 Oct 2015 21:29:47 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v1.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id 77FD210904 for ; Sun, 18 Oct 2015 21:29:46 -0700 (PDT) Received: from bar4.cudamail.com (bar2 [192.168.15.2]) by mx3v1.cudamail.com (Postfix) with ESMTP id 06CD4618724 for ; Sun, 18 Oct 2015 22:29:46 -0600 (MDT) X-ASG-Debug-ID: 1445228985-03dc210f92b5b80001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar4.cudamail.com with ESMTP id FRyRb2kFqmrXX9jp (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 18 Oct 2015 22:29:45 -0600 (MDT) X-Barracuda-Envelope-From: yamamoto@midokura.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO mail-pa0-f52.google.com) (209.85.220.52) by mx3-pf1.cudamail.com with ESMTPS (RC4-SHA encrypted); 19 Oct 2015 04:29:39 -0000 Received-SPF: neutral (mx3-pf1.cudamail.com: 209.85.220.52 is neither permitted nor denied by SPF record at spf.mandrillapp.com) X-Barracuda-RBL-Trusted-Forwarder: 209.85.220.52 Received: by pabrc13 with SMTP id rc13so178295867pab.0 for ; Sun, 18 Oct 2015 21:29:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xFz5PZ0BJ6wQ8yFJPVX59830teIOq3liJaeZfvskXpw=; b=nJFfIsdARDUaySor5y6LHLS8xie7pWvk9jOK3LbGpTSB/jdHR54xbuRRCk+308Hi2p +TGsUwgVF9dNPatn7HjJ+xMU0qOwXcS2+Ftoq/qoqLLzpiQTffZa1lBlbbfg1fY72R2t AJGemPV5WIILLz5aArl+bm67pwPTzbniCFsjzaWdNlb/cLV3sGmkl4rFp0WrG1rERovk vUTknao5ijdEVIuS6i3Qs14W6XVKy56+xZ4J3Yt3BpGn2Dm/IsC8wGwSGy9y5czpDYea PfG0iK31yXHBNM7cha3llKuz3+4+ditPMqXoc91pxdbhz7+KuojFjnB98j2jyV51asLS BHTw== X-Gm-Message-State: ALoCoQmXMDksETPJeoj0FTVIgm11ssbCaGILE6ftsthiUC1KZYoiMPVAmNU9YA/EuBlPnx5+icra X-Received: by 10.66.145.97 with SMTP id st1mr31787740pab.145.1445228978563; Sun, 18 Oct 2015 21:29:38 -0700 (PDT) Received: from giraffe.local.net (p2916125-ipngn18101marunouchi.tokyo.ocn.ne.jp. [153.226.221.125]) by smtp.gmail.com with ESMTPSA id we9sm33794799pab.3.2015.10.18.21.29.37 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Oct 2015 21:29:38 -0700 (PDT) X-CudaMail-Envelope-Sender: yamamoto@midokura.com X-Barracuda-Apparent-Source-IP: 153.226.221.125 From: YAMAMOTO Takashi To: dev@openvswitch.org X-CudaMail-MID: CM-V1-1017022432 X-CudaMail-DTE: 101815 X-CudaMail-Originating-IP: 209.85.220.52 Date: Mon, 19 Oct 2015 13:28:58 +0900 X-ASG-Orig-Subj: [##CM-V1-1017022432##][PATCH 07/21] completion.at: Improve portability Message-Id: <1445228952-22445-7-git-send-email-yamamoto@midokura.com> X-Mailer: git-send-email 2.3.8 (Apple Git-58) In-Reply-To: <1445228952-22445-1-git-send-email-yamamoto@midokura.com> References: <1445228952-22445-1-git-send-email-yamamoto@midokura.com> X-GBUdb-Analysis: 0, 209.85.220.52, Ugly c=0.360316 p=-0.575758 Source Normal X-MessageSniffer-Rules: 0-0-0-5910-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1445228985 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.60 X-Barracuda-Spam-Status: No, SCORE=0.60 using per-user scores of TAG_LEVEL=3.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=BSF_SC5_MJ1963, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.23618 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS 0.50 BSF_SC5_MJ1963 Custom Rule MJ1963 Cc: YAMAMOTO Takashi Subject: [ovs-dev] [PATCH 07/21] completion.at: Improve portability X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" NetBSD's /bin/sh complains on the syntax of bash array. While the use of eval might seem overkill, it's tricky to avoid the error because the generated code will be a part of the surrounding subshell and the syntax check is done a bit earlier than the execution of these conditionals. Signed-off-by: YAMAMOTO Takashi Acked-by: Ben Pfaff --- tests/completion.at | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/completion.at b/tests/completion.at index 0aca7aa..79093f9 100644 --- a/tests/completion.at +++ b/tests/completion.at @@ -341,7 +341,8 @@ echo "$@" | tr ' ' '\n' | sed -e '/^$/d' | sed -e 's/$/ /g' | sort -u ]) AT_SETUP([vsctl-bashcomp - basic verification]) -AT_SKIP_IF([test -z ${BASH_VERSION+x} || test ${BASH_VERSINFO[[0]]} -lt 4]) +AT_SKIP_IF([test -z ${BASH_VERSION+x}]) +AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4']) OVS_VSWITCHD_START # complete ovs-vsctl --db=* [TAB] @@ -422,7 +423,8 @@ AT_CLEANUP AT_SETUP([vsctl-bashcomp - argument completion]) -AT_SKIP_IF([test -z ${BASH_VERSION+x} || test ${BASH_VERSINFO[[0]]} -lt 4]) +AT_SKIP_IF([test -z ${BASH_VERSION+x}]) +AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4']) OVS_VSWITCHD_START( [add-br br1 -- \ set bridge br1 datapath-type=dummy -- \ @@ -748,7 +750,8 @@ AT_CLEANUP AT_SETUP([vsctl-bashcomp - negative test]) -AT_SKIP_IF([test -z ${BASH_VERSION+x} || test ${BASH_VERSINFO[[0]]} -lt 4]) +AT_SKIP_IF([test -z ${BASH_VERSION+x}]) +AT_SKIP_IF([eval 'test ${BASH_VERSINFO[[0]]} -lt 4']) OVS_VSWITCHD_START # complete non-matching command. @@ -786,4 +789,4 @@ OVS_VSWITCHD_STOP AT_CHECK_UNQUOTED([ovs-vsctl-bashcomp.bash test ""], [1], []) -AT_CLEANUP \ No newline at end of file +AT_CLEANUP