From patchwork Sun Jan 14 17:05:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin-Gabriel Serdean X-Patchwork-Id: 860481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) 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 3zKNCl6xDzz9sR8 for ; Mon, 15 Jan 2018 04:05:39 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 95E26FCD; Sun, 14 Jan 2018 17:05:36 +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 B2A1BFCD for ; Sun, 14 Jan 2018 17:05:35 +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 smtp1.linuxfoundation.org (Postfix) with ESMTPS id 1843E564 for ; Sun, 14 Jan 2018 17:05:35 +0000 (UTC) X-Originating-IP: 86.125.249.173 Received: from localhost.localdomain (unknown [86.125.249.173]) (Authenticated sender: aserdean@ovn.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id EBD2BC5A53; Sun, 14 Jan 2018 18:05:32 +0100 (CET) From: Alin Gabriel Serdean To: dev@openvswitch.org Date: Sun, 14 Jan 2018 19:05:16 +0200 Message-Id: <20180114170516.19632-1-aserdean@ovn.org> X-Mailer: git-send-email 2.10.2.windows.1 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: Alin Gabriel Serdean Subject: [ovs-dev] [PATCH] ovn.at: Fix IPv6 periodic RA test on Windows 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 One issue with this test is that MSYS mangles the shorter form of the IPv6 address. To solve this, we switch to the longer notation of it. Another issue is that `printf` command does not add the leading `0` to the packet. We switch to a more platform independent `awk` substitution. Co-authored-by: Mark Michelson Signed-off-by: Mark Michelson Signed-off-by: Alin Gabriel Serdean Acked-by: Ben Pfaff --- tests/ovn.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 98dcf68..b5540b3 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -9090,7 +9090,7 @@ ovs-vsctl add-br br-phys ovn_attach n1 br-phys 192.168.0.3 ovn-nbctl lr-add ro -ovn-nbctl lrp-add ro ro-sw 00:00:00:00:00:01 aef0::1/64 +ovn-nbctl lrp-add ro ro-sw 00:00:00:00:00:01 aef0:0:0:0:0:0:0:1/64 ovn-nbctl ls-add sw ovn-nbctl lsp-add sw sw-ro @@ -9159,7 +9159,7 @@ construct_expected_ra() { local icmp=8600XXXX${ra} local ip_len=$(expr ${#icmp} / 2) - ip_len=$(printf "%0.4x" ${ip_len}) + ip_len=$(echo "$ip_len" | awk '{printf "%0.4x\n", $0}') local ip=60000000${ip_len}3aff${src_addr}${dst_addr}${icmp} local eth=${dst_mac}${src_mac}86dd${ip}