[ovs-dev] [PATCH] ovn.at: Fix IPv6 periodic RA test on Windows

Alin Gabriel Serdean aserdean at ovn.org
Sun Jan 14 17:05:16 UTC 2018


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 <mmichels at redhat.com>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Alin Gabriel Serdean <aserdean at ovn.org>
---
 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}
-- 
2.10.2.windows.1



More information about the dev mailing list