]> git.proxmox.com Git - ovs.git/commitdiff
ofproto-dpif.at: Make sFlow sampling tests invariant to IP version.
authorIlya Maximets <i.maximets@samsung.com>
Thu, 20 Dec 2018 17:23:12 +0000 (20:23 +0300)
committerBen Pfaff <blp@ovn.org>
Thu, 20 Dec 2018 18:19:43 +0000 (10:19 -0800)
sflow.log reports the first ip address of the 'loopback' interface.
It could be different on different systems. For example, on FreeBSD
IPv6 [::1] address goes first despite of IPv4 127.0.0.1 on Linux.

Let's just replace it to IPv4 always to make tests work.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
tests/ofproto-dpif.at

index c49a3bb4b20521a77eabce43ae594c9cd4a3b569..ded2ef0132e3ce0790e3996c4c4ca8735cd9a5ea 100644 (file)
@@ -6071,7 +6071,7 @@ m4_define([CHECK_SFLOW_SAMPLING_PACKET],
   OVS_APP_EXIT_AND_WAIT([test-sflow])
 
   AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'HEADER|ERROR' | sed 's/ /\
-        /g']], [0], [dnl
+        /g' | sed 's/\(.*\)ds=\[::1\]\(.*\)/\1ds=127.0.0.1\2/g' ]], [0], [dnl
 HEADER
         dgramSeqNo=1
         ds=127.0.0.1>2:1000
@@ -6175,7 +6175,7 @@ HEADER
 ])
 
   AT_CHECK_UNQUOTED([[sort sflow.log | $EGREP 'ETHCOUNTERS|IFCOUNTERS|ERROR|PORTNAME|OPENFLOWPORT' | head -24 | sed 's/ /\
-        /g']], [0], [dnl
+        /g' | sed 's/\(.*\)ds=\[::1\]\(.*\)/\1ds=127.0.0.1\2/g' ]], [0], [dnl
 ETHCOUNTERS
         dot3StatsAlignmentErrors=4294967295
         dot3StatsFCSErrors=4294967295