diff options
author | Yi-Hung Wei <yihung.wei@gmail.com> | 2016-12-08 18:34:07 -0800 |
---|---|---|
committer | Joe Stringer <joe@ovn.org> | 2016-12-14 15:11:48 -0800 |
commit | ebd39edacb0b3b2227e33db32a5afcbc3ba37fc0 (patch) | |
tree | f33a6fac2fcf955be0345d27560a2fa00a4363c1 /tests | |
parent | 9c1ab985eddee4088518c7feb037333631b5811d (diff) | |
download | openvswitch-ebd39edacb0b3b2227e33db32a5afcbc3ba37fc0.tar.gz |
system-traffic: Skip test cases if firewalld is on.
On RHEL 7.3, test cases that use vxlan, gre, and geneve tunnels fail because
traffic is blocked by default firewall configuration. This commit detects the
status of firewalld, and skips the tests if firewalld is on.
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Joe Stringer <joe@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system-common-macros.at | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at index 765ea8505..d41de2366 100644 --- a/tests/system-common-macros.at +++ b/tests/system-common-macros.at @@ -223,16 +223,26 @@ m4_define([NETNS_DAEMONIZE], ] ) +# OVS_CHECK_FIREWALL() +# +# Check if firewalld is active, skip the test if it is on. +# The following command currently only supports RHEL and CentOS. +m4_define([OVS_CHECK_FIREWALL], + [AT_SKIP_IF([systemctl status firewalld 2>&1 | grep running > /dev/null])]) + # 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])]) + [AT_SKIP_IF([! ip link add foo type vxlan help 2>&1 | grep dstport >/dev/null]) + OVS_CHECK_FIREWALL()]) # OVS_CHECK_GRE() m4_define([OVS_CHECK_GRE], - [AT_SKIP_IF([! ip link add foo type gretap help 2>&1 | grep gre >/dev/null])]) + [AT_SKIP_IF([! ip link add foo type gretap help 2>&1 | grep gre >/dev/null]) + OVS_CHECK_FIREWALL()]) # OVS_CHECK_GENEVE() m4_define([OVS_CHECK_GENEVE], - [AT_SKIP_IF([! ip link add foo type geneve help 2>&1 | grep geneve >/dev/null])]) + [AT_SKIP_IF([! ip link add foo type geneve help 2>&1 | grep geneve >/dev/null]) + OVS_CHECK_FIREWALL()]) |