From patchwork Wed Nov 11 01:24:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Pfaff X-Patchwork-Id: 1397894 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ovn.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CW6VM6DBCz9s1l for ; Wed, 11 Nov 2020 12:25:15 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 6F098874E9; Wed, 11 Nov 2020 01:25:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AspgG0vRI8aQ; Wed, 11 Nov 2020 01:25:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id C79D5874EC; Wed, 11 Nov 2020 01:25:13 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A6E72C1AD8; Wed, 11 Nov 2020 01:25:13 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 995D8C016F for ; Wed, 11 Nov 2020 01:25:11 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8889D86BB3 for ; Wed, 11 Nov 2020 01:25:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fls1qWDmuXnc for ; Wed, 11 Nov 2020 01:25:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by fraxinus.osuosl.org (Postfix) with ESMTPS id CFCF186BA5 for ; Wed, 11 Nov 2020 01:25:08 +0000 (UTC) X-Originating-IP: 75.54.222.30 Received: from sigfpe.attlocal.net (75-54-222-30.lightspeed.rdcyca.sbcglobal.net [75.54.222.30]) (Authenticated sender: blp@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 7D4C840005; Wed, 11 Nov 2020 01:25:06 +0000 (UTC) From: Ben Pfaff To: dev@openvswitch.org Date: Tue, 10 Nov 2020 17:24:50 -0800 Message-Id: <20201111012454.2574461-4-blp@ovn.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201111012454.2574461-1-blp@ovn.org> References: <20201111012454.2574461-1-blp@ovn.org> MIME-Version: 1.0 Cc: Ben Pfaff Subject: [ovs-dev] [PATCH ovn v4.1 3/7] tests: Use portable "test a = b", not "test a == b". X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" "==" is a GNU extension to "test". A pox upon it. Signed-off-by: Ben Pfaff --- tests/ovn.at | 26 +++++++++++++------------- tests/system-ovn.at | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 75c8725911ff..2648cdd6cd07 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -5410,7 +5410,7 @@ test_dhcp() { reply_dst_ip=${offer_ip} fi - if test "$dhcp_type" == "04"; then + if test "$dhcp_type" = "04"; then ciaddr=$offer_ip fi @@ -12857,11 +12857,11 @@ for i in 1 2 3; do -- lsp-set-addresses lp$i$j$k \ "f0:00:00:00:0$i:$j$k 192.168.$i$j.$k" # logical ports lp[12]?1 belongs to port group pg1 - if test $i != 3 && test $k == 1; then + if test $i != 3 && test $k = 1; then pg1_ports="$pg1_ports `get_lsp_uuid $i$j$k`" fi # logical ports lp[23]?2 belongs to port group pg2 - if test $i != 1 && test $k == 2; then + if test $i != 1 && test $k = 2; then pg2_ports="$pg2_ports `get_lsp_uuid $i$j$k`" fi done @@ -13012,8 +13012,8 @@ for is in 1 2 3; do if test $d != $s; then unicast=$d; else unicast=; fi # packets matches ACL should be dropped - if test $id != 3 && test $kd == 1; then - if test $is != 1 && test $ks == 2; then + if test $id != 3 && test $kd = 1; then + if test $is != 1 && test $ks = 2; then unicast= fi fi @@ -13081,11 +13081,11 @@ for i in 1 2 3; do -- lsp-set-addresses lp$i$j$k \ "f0:00:00:00:0$i:$j$k 192.168.$i$j.$k" # logical ports lp[12]?1 belongs to port group pg1 - if test $i != 3 && test $k == 1; then + if test $i != 3 && test $k = 1; then pg1_ports="$pg1_ports `get_lsp_uuid $i$j$k`" fi # logical ports lp[23]?2 belongs to port group pg2 - if test $i != 1 && test $k == 2; then + if test $i != 1 && test $k = 2; then pg2_ports="$pg2_ports `get_lsp_uuid $i$j$k`" fi done @@ -13254,8 +13254,8 @@ for is in 1 2 3; do if test $d != $s; then unicast=$d; else unicast=; fi # packets matches ACL1 but not ACL2 should be dropped - if test $id != 3 && test $kd == 1; then - if test $is == 1 || test $ks != 2; then + if test $id != 3 && test $kd = 1; then + if test $is = 1 || test $ks != 2; then unicast= fi fi @@ -14482,7 +14482,7 @@ hv3_uuid=$(ovn-sbctl list chassis hv3 | grep uuid | awk '{print $3}') chassis=`ovn-sbctl --bare --columns chassis find port_binding \ logical_port=ls1-lp_ext1` -AT_CHECK([test x$chassis == x], [0], []) +AT_CHECK([test x$chassis = x], [0], []) # Associate hagrp1 ha-chassis-group to ls1-lp_ext1 ovn-nbctl --wait=hv set Logical_Switch_Port ls1-lp_ext1 \ @@ -22187,8 +22187,8 @@ echo hv3_ts=$hv3_ts hv_cfg_ts=$(ovn-nbctl get nb_global . hv_cfg_timestamp) check test "$hv3_ts" = "$hvt4" -AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=sb sync | grep ms | wc -l) == x2]) -AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=hv sync | grep ms | wc -l) == x3]) +AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=sb sync | grep ms | wc -l) = x2]) +AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=hv sync | grep ms | wc -l) = x3]) for i in $(seq 2 $n); do OVN_CLEANUP_SBOX([hv$i]) @@ -22815,7 +22815,7 @@ sleep 2 # Check if the encap_rec changed (it should not have) encap_rec_mvtep1=$(ovn-sbctl --data=bare --no-heading --column encaps list chassis hv1) -AT_CHECK([test "$encap_rec_mvtep" == "$encap_rec_mvtep1"], [0], []) +AT_CHECK([test "$encap_rec_mvtep" = "$encap_rec_mvtep1"], [0], []) OVN_CLEANUP([hv1]) AT_CLEANUP diff --git a/tests/system-ovn.at b/tests/system-ovn.at index 8bb8c439f4d6..ee9ce332c4a7 100644 --- a/tests/system-ovn.at +++ b/tests/system-ovn.at @@ -5555,7 +5555,7 @@ AT_CHECK([ovs-vsctl set interface ovs-public external-ids:ovn-egress-iface=true] OVS_WAIT_UNTIL([tc qdisc show | grep -q 'htb 1: dev ovs-public']) AT_CHECK([ovn-nbctl remove Logical_Switch_Port public options qos_burst=1000]) -OVS_WAIT_UNTIL([test "$(tc qdisc show | grep 'htb 1: dev ovs-public')" == ""]) +OVS_WAIT_UNTIL([test "$(tc qdisc show | grep 'htb 1: dev ovs-public')" = ""]) kill $(pidof ovn-controller)