Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/net/if_bridge_test.sh
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | stp_body() | ||||
a_discard=$(jexec a ifconfig ${bridge_a} | grep discarding) | a_discard=$(jexec a ifconfig ${bridge_a} | grep discarding) | ||||
b_discard=$(jexec b ifconfig ${bridge_b} | grep discarding) | b_discard=$(jexec b ifconfig ${bridge_b} | grep discarding) | ||||
if [ -z "${a_discard}" ] && [ -z "${b_discard}" ] | if [ -z "${a_discard}" ] && [ -z "${b_discard}" ] | ||||
then | then | ||||
atf_fail "STP failed to detect bridging loop" | atf_fail "STP failed to detect bridging loop" | ||||
fi | fi | ||||
# We must also have at least some forwarding interfaces | |||||
a_forwarding=$(jexec a ifconfig ${bridge_a} | grep forwarding) | |||||
b_forwarding=$(jexec b ifconfig ${bridge_b} | grep forwarding) | |||||
if [ -z "${a_forwarding}" ] && [ -z "${b_forwarding}" ] | |||||
then | |||||
atf_fail "STP failed to detect bridging loop" | |||||
fi | |||||
} | } | ||||
stp_cleanup() | stp_cleanup() | ||||
{ | { | ||||
vnet_cleanup | vnet_cleanup | ||||
} | } | ||||
atf_test_case "stp_vlan" "cleanup" | atf_test_case "stp_vlan" "cleanup" | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | stp_vlan_body() | ||||
# Give STP time to do its thing | # Give STP time to do its thing | ||||
sleep 5 | sleep 5 | ||||
a_discard=$(jexec a ifconfig ${bridge_a} | grep discarding) | a_discard=$(jexec a ifconfig ${bridge_a} | grep discarding) | ||||
b_discard=$(jexec b ifconfig ${bridge_b} | grep discarding) | b_discard=$(jexec b ifconfig ${bridge_b} | grep discarding) | ||||
if [ -z "${a_discard}" ] && [ -z "${b_discard}" ] | if [ -z "${a_discard}" ] && [ -z "${b_discard}" ] | ||||
then | |||||
atf_fail "STP failed to detect bridging loop" | |||||
fi | |||||
# We must also have at least some forwarding interfaces | |||||
a_forwarding=$(jexec a ifconfig ${bridge_a} | grep forwarding) | |||||
b_forwarding=$(jexec b ifconfig ${bridge_b} | grep forwarding) | |||||
if [ -z "${a_forwarding}" ] && [ -z "${b_forwarding}" ] | |||||
then | then | ||||
atf_fail "STP failed to detect bridging loop" | atf_fail "STP failed to detect bridging loop" | ||||
fi | fi | ||||
} | } | ||||
stp_vlan_cleanup() | stp_vlan_cleanup() | ||||
{ | { | ||||
vnet_cleanup | vnet_cleanup | ||||
▲ Show 20 Lines • Show All 214 Lines • Show Last 20 Lines |