From patchwork Fri Apr 21 01:32:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi YAMAMOTO X-Patchwork-Id: 753054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w8JCw58lbz9s03 for ; Fri, 21 Apr 2017 11:33:32 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 1B9BFBAF; Fri, 21 Apr 2017 01:33:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id B3BFA6C for ; Fri, 21 Apr 2017 01:33:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8FC94199 for ; Fri, 21 Apr 2017 01:33:25 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by relay8-d.mail.gandi.net (Postfix) with ESMTPS id 560BD406C5; Fri, 21 Apr 2017 03:33:24 +0200 (CEST) Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id 3E60941C07E; Fri, 21 Apr 2017 03:33:24 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay5-d.mail.gandi.net ([IPv6:::ffff:217.70.183.197]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id fiU5vXasForO; Fri, 21 Apr 2017 03:33:22 +0200 (CEST) X-Originating-IP: 153.224.139.207 Received: from giraffe.local.net (p2318207-ipngn17801marunouchi.tokyo.ocn.ne.jp [153.224.139.207]) (Authenticated sender: yamamoto@ovn.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 43BF241C080; Fri, 21 Apr 2017 03:33:20 +0200 (CEST) From: YAMAMOTO Takashi To: dev@openvswitch.org Date: Fri, 21 Apr 2017 10:32:57 +0900 Message-Id: <1492738377-12802-1-git-send-email-yamamoto@ovn.org> X-Mailer: git-send-email 2.5.4 (Apple Git-61) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: YAMAMOTO Takashi Subject: [ovs-dev] [PATCH] ovn.at: Fix "ovn -- 1 LR with distributed router gateway port" test X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org NetBSD implementation of wc command outputs extra whitespaces like the following. Tweak the test to success on such environments. % echo hoge|wc -l|hexdump -C 00000000 20 20 20 20 20 20 20 31 0a | 1.| 00000009 % The failing test was introduced by commit 41a15b71ed1ef35aa612a1128082219fbfc3f327 (ovn: Introduce distributed gateway port and "chassisredirect" port binding) Signed-off-by: YAMAMOTO Takashi Acked-by: Mickey Spiegel --- tests/ovn.at | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index af77c19..1bffc4c 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -6567,20 +6567,14 @@ as hv3 ovs-ofctl dump-flows br-int echo "--------------------------" # Check that redirect mapping is programmed only on hv2 -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=33 | grep =0x3,metadata=0x1 | wc -l], [0], [0 -]) -AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=33 | grep =0x3,metadata=0x1 | grep load:0x2- | wc -l], [0], [1 -]) +AT_CHECK([test `as hv1 ovs-ofctl dump-flows br-int table=33 | grep =0x3,metadata=0x1 | wc -l` -eq 0]) +AT_CHECK([test `as hv2 ovs-ofctl dump-flows br-int table=33 | grep =0x3,metadata=0x1 | grep load:0x2- | wc -l` -eq 1]) # Check that hv1 sends chassisredirect port traffic to hv2 -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=32 | grep =0x3,metadata=0x1 | grep output | wc -l], [0], [1 -]) -AT_CHECK([as hv2 ovs-ofctl dump-flows br-int table=32 | grep =0x3,metadata=0x1 | wc -l], [0], [0 -]) +AT_CHECK([test `as hv1 ovs-ofctl dump-flows br-int table=32 | grep =0x3,metadata=0x1 | grep output | wc -l` -eq 1]) +AT_CHECK([test `as hv2 ovs-ofctl dump-flows br-int table=32 | grep =0x3,metadata=0x1 | wc -l` -eq 0]) # Check that arp reply on distributed gateway port is only programmed on hv2 -AT_CHECK([as hv1 ovs-ofctl dump-flows br-int | grep arp | grep =0x2,metadata=0x1 | wc -l], [0], [0 -]) -AT_CHECK([as hv2 ovs-ofctl dump-flows br-int | grep arp | grep =0x2,metadata=0x1 | wc -l], [0], [1 -]) +AT_CHECK([test `as hv1 ovs-ofctl dump-flows br-int | grep arp | grep =0x2,metadata=0x1 | wc -l` -eq 0]) +AT_CHECK([test `as hv2 ovs-ofctl dump-flows br-int | grep arp | grep =0x2,metadata=0x1 | wc -l` -eq 1]) ip_to_hex() {