freebsd-src/tests/sys/net/if_tun_test.sh
Kristof Provost 3846e5755f tun tests: Test renaming and destroying a tun interface in a vnet jail
There was a problem destroying renamed tun interfaces in vnet jails. This was
fixed in r344794. Test the previously failing scenario.

PR:		235704
MFC after:	2 weeks
2019-03-05 15:49:30 +00:00

31 lines
430 B
Bash
Executable file

# $FreeBSD$
. $(atf_get_srcdir)/../common/vnet.subr
atf_test_case "235704" "cleanup"
235704_head()
{
atf_set descr "Test PR #235704"
atf_set require.user root
}
235704_body()
{
vnet_init
vnet_mkjail one
tun=$(jexec one ifconfig tun create)
jexec one ifconfig ${tun} name foo
atf_check -s exit:0 jexec one ifconfig foo destroy
}
235704_cleanup()
{
vnet_cleanup
}
atf_init_test_cases()
{
atf_add_test_case "235704"
}