Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2019 15:49:30 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344797 - head/tests/sys/net
Message-ID:  <201903051549.x25FnUrt055143@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Tue Mar  5 15:49:30 2019
New Revision: 344797
URL: https://svnweb.freebsd.org/changeset/base/344797

Log:
  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

Added:
  head/tests/sys/net/if_tun_test.sh   (contents, props changed)
Modified:
  head/tests/sys/net/Makefile

Modified: head/tests/sys/net/Makefile
==============================================================================
--- head/tests/sys/net/Makefile	Tue Mar  5 15:23:28 2019	(r344796)
+++ head/tests/sys/net/Makefile	Tue Mar  5 15:49:30 2019	(r344797)
@@ -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

Added: head/tests/sys/net/if_tun_test.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tests/sys/net/if_tun_test.sh	Tue Mar  5 15:49:30 2019	(r344797)
@@ -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"
+}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903051549.x25FnUrt055143>