Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Dec 2018 09:59:32 +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: r341360 - head/tests/sys/netpfil/pf
Message-ID:  <201812010959.wB19xWZF032367@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Sat Dec  1 09:59:32 2018
New Revision: 341360
URL: https://svnweb.freebsd.org/changeset/base/341360

Log:
  pf tests: Test name handling
  
  Provoke a situation where two interfaces have the same name, and verify
  pf's reaction to this.

Added:
  head/tests/sys/netpfil/pf/names.sh   (contents, props changed)
Modified:
  head/tests/sys/netpfil/pf/Makefile

Modified: head/tests/sys/netpfil/pf/Makefile
==============================================================================
--- head/tests/sys/netpfil/pf/Makefile	Sat Dec  1 09:58:21 2018	(r341359)
+++ head/tests/sys/netpfil/pf/Makefile	Sat Dec  1 09:59:32 2018	(r341360)
@@ -9,6 +9,7 @@ ATF_TESTS_SH+=	anchor \
 		pass_block \
 		forward \
 		fragmentation \
+		names \
 		set_tos \
 		route_to \
 		synproxy \

Added: head/tests/sys/netpfil/pf/names.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tests/sys/netpfil/pf/names.sh	Sat Dec  1 09:59:32 2018	(r341360)
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+. $(atf_get_srcdir)/utils.subr
+
+atf_test_case "names" "cleanup"
+names_head()
+{
+	atf_set descr 'Test overlapping names'
+	atf_set require.user root
+}
+
+names_body()
+{
+	pft_init
+
+	epair=$(pft_mkepair)
+
+	pft_mkjail alcatraz ${epair}b
+	ifconfig ${epair}a name foo
+	jexec alcatraz ifconfig ${epair}b name foo
+
+	jail -r alcatraz
+	ifconfig foo destroy
+}
+
+names_cleanup()
+{
+	pft_cleanup
+}
+
+atf_init_test_cases()
+{
+	atf_add_test_case "names"
+}



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