svn commit: r345287 - stable/12/tests/sys/net
Kristof Provost
kp at FreeBSD.org
Tue Mar 19 00:29:19 UTC 2019
Author: kp
Date: Tue Mar 19 00:29:18 2019
New Revision: 345287
URL: https://svnweb.freebsd.org/changeset/base/345287
Log:
MFC r344797:
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
Added:
stable/12/tests/sys/net/if_tun_test.sh
- copied unchanged from r344797, head/tests/sys/net/if_tun_test.sh
Modified:
stable/12/tests/sys/net/Makefile
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/tests/sys/net/Makefile
==============================================================================
--- stable/12/tests/sys/net/Makefile Tue Mar 19 00:27:48 2019 (r345286)
+++ stable/12/tests/sys/net/Makefile Tue Mar 19 00:29:18 2019 (r345287)
@@ -7,6 +7,7 @@ BINDIR= ${TESTSDIR}
ATF_TESTS_SH+= if_lagg_test
ATF_TESTS_SH+= if_clone_test
+ATF_TESTS_SH+= if_tun_test
# The tests are written to be run in parallel, but doing so leads to random
# panics. I think it's because the kernel's list of interfaces isn't properly
Copied: stable/12/tests/sys/net/if_tun_test.sh (from r344797, head/tests/sys/net/if_tun_test.sh)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/12/tests/sys/net/if_tun_test.sh Tue Mar 19 00:29:18 2019 (r345287, copy of r344797, head/tests/sys/net/if_tun_test.sh)
@@ -0,0 +1,30 @@
+# $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"
+}
More information about the svn-src-stable
mailing list