Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/net/if_bridge_test.sh
# $FreeBSD$ | # $FreeBSD$ | ||||
Lint: Invalid Executable: Executable files should either be binary or contain a shebang. | |||||
# | # | ||||
# SPDX-License-Identifier: BSD-2-Clause-FreeBSD | # SPDX-License-Identifier: BSD-2-Clause-FreeBSD | ||||
# | # | ||||
# Copyright (c) 2020 The FreeBSD Foundation | # Copyright (c) 2020 The FreeBSD Foundation | ||||
# | # | ||||
# This software was developed by Kristof Provost under sponsorship | # This software was developed by Kristof Provost under sponsorship | ||||
# from the FreeBSD Foundation. | # from the FreeBSD Foundation. | ||||
▲ Show 20 Lines • Show All 258 Lines • ▼ Show 20 Lines | inherit_mac_body() | ||||
jexec one ifconfig ${bridge} addm ${epair}a | jexec one ifconfig ${bridge} addm ${epair}a | ||||
} | } | ||||
inherit_mac_cleanup() | inherit_mac_cleanup() | ||||
{ | { | ||||
vnet_cleanup | vnet_cleanup | ||||
} | } | ||||
atf_test_case "delete_with_members" "cleanup" | |||||
delete_with_members_head() | |||||
{ | |||||
atf_set descr 'Delete a bridge which still has member interfaces' | |||||
atf_set require.user root | |||||
} | |||||
delete_with_members_body() | |||||
{ | |||||
vnet_init | |||||
bridge=$(vnet_mkbridge) | |||||
epair=$(vnet_mkepair) | |||||
ifconfig ${bridge} 192.0.2.1/24 up | |||||
ifconfig ${epair}a up | |||||
ifconfig ${bridge} addm ${epair}a | |||||
ifconfig ${bridge} destroy | |||||
} | |||||
delete_with_members_cleanup() | |||||
{ | |||||
vnet_cleanup | |||||
} | |||||
atf_init_test_cases() | atf_init_test_cases() | ||||
{ | { | ||||
atf_add_test_case "bridge_transmit_ipv4_unicast" | atf_add_test_case "bridge_transmit_ipv4_unicast" | ||||
atf_add_test_case "stp" | atf_add_test_case "stp" | ||||
atf_add_test_case "static" | atf_add_test_case "static" | ||||
atf_add_test_case "span" | atf_add_test_case "span" | ||||
atf_add_test_case "inherit_mac" | atf_add_test_case "inherit_mac" | ||||
atf_add_test_case "delete_with_members" | |||||
} | } |
Executable files should either be binary or contain a shebang.