diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index b9484e0a5c55..3d0f861f0a16 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -9,6 +9,7 @@ ATF_TESTS_SH+= anchor \ pass_block \ forward \ fragmentation \ + names \ set_tos \ route_to \ synproxy \ diff --git a/tests/sys/netpfil/pf/names.sh b/tests/sys/netpfil/pf/names.sh new file mode 100755 index 000000000000..f73a149f8e90 --- /dev/null +++ b/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" +}