Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/net/if_destroy_vnet.sh
- This file was added.
. $(atf_get_srcdir)/../common/vnet.subr | |||||||||
ngie: Silly question: does the `$FreeBSD$` RCS tag matter after moving to git? | |||||||||
atf_test_case "basic" "cleanup" | |||||||||
basic_head() | |||||||||
{ | |||||||||
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264981 | |||||||||
atf_set descr 'Basic interface destruction after assigned to a VNET' | |||||||||
atf_set require.user root | |||||||||
} | |||||||||
Done Inline Actions
Maybe this instead? ngie: Maybe this instead? | |||||||||
basic_body() | |||||||||
{ | |||||||||
vnet_init | |||||||||
lo_if=$(vnet_mkloopback) | |||||||||
vnet_mkjail jifdestroy ${lo_if} | |||||||||
jexec jifdestroy ifconfig ${lo_if} up | |||||||||
jail -R jifdestroy | |||||||||
# Interface ${lo_if} must be back at the host level after destroying jail | |||||||||
# Pooling for jail shutdown is not sufficient, the vnet interface | |||||||||
# does not appear immediately on the host after jail shutdown. | |||||||||
# So using a racy sleep here. | |||||||||
sleep 1 | |||||||||
Not Done Inline Actionssleep 1 is racy: please confirm that jexec jifdestroy and jail -R succeed. ngie: `sleep 1` is racy: please confirm that `jexec jifdestroy` and `jail -R` succeed. | |||||||||
Not Done Inline Actions
Polling for jail shutdown would probably be wise too... ngie: > `sleep 1` is racy: please confirm that `jexec jifdestroy` and `jail -R` succeed.
Polling for… | |||||||||
atf_check -s exit:0 -o ignore ifconfig ${lo_if} | |||||||||
} | |||||||||
basic_cleanup() | |||||||||
{ | |||||||||
vnet_cleanup | |||||||||
} | |||||||||
atf_init_test_cases() | |||||||||
{ | |||||||||
atf_add_test_case "basic" | |||||||||
} |
Silly question: does the $FreeBSD$ RCS tag matter after moving to git?