Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/net/if_clone_test.sh
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
do_up_stress "epair" "" "" | do_up_stress "epair" "" "" | ||||
} | } | ||||
epair_up_stress_cleanup() | epair_up_stress_cleanup() | ||||
{ | { | ||||
cleanup_ifaces | cleanup_ifaces | ||||
} | } | ||||
atf_test_case epair_destroy_race cleanup | |||||
epair_destroy_race_head() | |||||
{ | |||||
atf_set "descr" "Race if_detach() and if_vmove()" | |||||
atf_set "require.user" "root" | |||||
} | |||||
epair_destroy_race_body() | |||||
{ | |||||
for i in `seq 1 10` | |||||
do | |||||
epair_a=$(ifconfig epair create) | |||||
echo $epair_a >> devices_to_cleanup | |||||
epair_b=${epair_a%a}b | |||||
jail -c vnet name="epair_destroy" nopersist path=/ \ | |||||
host.hostname="epair_destroy" vnet.interface="$epair_b" \ | |||||
command=sh -c "ifconfig $epair_b 192.0.2.1/24; sleep 0.1"& | |||||
pid=$! | |||||
ifconfig "$epair_a" destroy | |||||
wait $pid | |||||
done | |||||
true | |||||
} | |||||
epair_destroy_race_cleanup() | |||||
{ | |||||
cleanup_ifaces | |||||
} | |||||
atf_test_case epair_ipv6_up_stress cleanup | atf_test_case epair_ipv6_up_stress cleanup | ||||
epair_ipv6_up_stress_head() | epair_ipv6_up_stress_head() | ||||
{ | { | ||||
atf_set "descr" "Simultaneously up and destroy an epair(4) with IPv6" | atf_set "descr" "Simultaneously up and destroy an epair(4) with IPv6" | ||||
atf_set "require.user" "root" | atf_set "require.user" "root" | ||||
} | } | ||||
epair_ipv6_up_stress_body() | epair_ipv6_up_stress_body() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 320 Lines • ▼ Show 20 Lines | vmnet_ipv6_up_stress_cleanup() | ||||
cleanup_ifaces | cleanup_ifaces | ||||
} | } | ||||
atf_init_test_cases() | atf_init_test_cases() | ||||
{ | { | ||||
atf_add_test_case epair_ipv6_up_stress | atf_add_test_case epair_ipv6_up_stress | ||||
atf_add_test_case epair_stress | atf_add_test_case epair_stress | ||||
atf_add_test_case epair_up_stress | atf_add_test_case epair_up_stress | ||||
atf_add_test_case epair_destroy_race | |||||
atf_add_test_case faith_ipv6_up_stress | atf_add_test_case faith_ipv6_up_stress | ||||
atf_add_test_case faith_stress | atf_add_test_case faith_stress | ||||
atf_add_test_case faith_up_stress | atf_add_test_case faith_up_stress | ||||
atf_add_test_case gif_ipv6_up_stress | atf_add_test_case gif_ipv6_up_stress | ||||
atf_add_test_case gif_stress | atf_add_test_case gif_stress | ||||
atf_add_test_case gif_up_stress | atf_add_test_case gif_up_stress | ||||
# Don't test lagg; it has its own test program | # Don't test lagg; it has its own test program | ||||
atf_add_test_case lo_ipv6_up_stress | atf_add_test_case lo_ipv6_up_stress | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |