system-traffic: Skip all vxlan tests if unsupported.
authorJoe Stringer <joe@ovn.org>
Wed, 23 Dec 2015 00:47:26 +0000 (16:47 -0800)
committerJoe Stringer <joe@ovn.org>
Wed, 23 Dec 2015 20:28:54 +0000 (12:28 -0800)
The vxlan tests require a new enough 'ip' tool to configure native VXLAN
tunnels on the host kernel (as well as a new enough kernel). If this
isn't available, simply skip the test. This commit makes the cases where
this is checked consistent.

Signed-off-by: Joe Stringer <joe@ovn.org>
Acked-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
tests/system-common-macros.at
tests/system-traffic.at

index 4d88b74..fcd7792 100644 (file)
@@ -149,3 +149,9 @@ m4_define([NETNS_DAEMONIZE],
      echo "kill \`cat $3\`" >> cleanup
    ]
 )
+
+# OVS_CHECK_VXLAN()
+#
+# Do basic check for vxlan functionality, skip the test if it's not there.
+m4_define([OVS_CHECK_VXLAN],
+    [AT_SKIP_IF([! ip link add foo type vxlan help 2>&1 | grep dstport >/dev/null])])
index 5501642..74ca0a0 100644 (file)
@@ -107,7 +107,7 @@ OVS_TRAFFIC_VSWITCHD_STOP
 AT_CLEANUP
 
 AT_SETUP([datapath - ping over vxlan tunnel])
-AT_SKIP_IF([! ip link add foo type vxlan help 2>&1 | grep dstport >/dev/null])
+OVS_CHECK_VXLAN()
 
 OVS_TRAFFIC_VSWITCHD_START()
 ADD_BR([br-underlay])
@@ -1307,7 +1307,7 @@ OVS_TRAFFIC_VSWITCHD_STOP
 AT_CLEANUP
 
 AT_SETUP([conntrack - Fragmentation over vxlan])
-AT_SKIP_IF([! ip link help 2>&1 | grep vxlan >/dev/null])
+OVS_CHECK_VXLAN()
 CHECK_CONNTRACK()
 
 OVS_TRAFFIC_VSWITCHD_START()