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"
+}
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to