svn commit: r344962 - stable/12/tests/sys/netpfil/pf

Kristof Provost kp at FreeBSD.org
Sat Mar 9 10:24:40 UTC 2019


Author: kp
Date: Sat Mar  9 10:24:39 2019
New Revision: 344962
URL: https://svnweb.freebsd.org/changeset/base/344962

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

Added:
  stable/12/tests/sys/netpfil/pf/names.sh
     - copied unchanged from r341360, head/tests/sys/netpfil/pf/names.sh
Modified:
  stable/12/tests/sys/netpfil/pf/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/tests/sys/netpfil/pf/Makefile
==============================================================================
--- stable/12/tests/sys/netpfil/pf/Makefile	Sat Mar  9 03:24:39 2019	(r344961)
+++ stable/12/tests/sys/netpfil/pf/Makefile	Sat Mar  9 10:24:39 2019	(r344962)
@@ -9,6 +9,7 @@ ATF_TESTS_SH+=	anchor \
 		pass_block \
 		forward \
 		fragmentation \
+		names \
 		nat \
 		set_tos \
 		rdr \

Copied: stable/12/tests/sys/netpfil/pf/names.sh (from r341360, head/tests/sys/netpfil/pf/names.sh)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/12/tests/sys/netpfil/pf/names.sh	Sat Mar  9 10:24:39 2019	(r344962, copy of r341360, head/tests/sys/netpfil/pf/names.sh)
@@ -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"
+}


More information about the svn-src-all mailing list