Skip to content

Commit

Permalink
system-traffic: Skip test cases if firewalld is on.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
YiHungWei authored and joestringer committed Dec 14, 2016
1 parent 9c1ab98 commit ebd39ed
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions tests/system-common-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -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()])

0 comments on commit ebd39ed

Please sign in to comment.