Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Mar 2019 10:24:39 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r344962 - stable/12/tests/sys/netpfil/pf
Message-ID:  <201903091024.x29AOd0t048583@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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"
+}



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