Date: Tue, 11 Dec 2018 21:45:57 +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: r341834 - head/tests/sys/netpfil/pf/ioctl Message-ID: <201812112145.wBBLjvcE038919@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Tue Dec 11 21:45:56 2018 New Revision: 341834 URL: https://svnweb.freebsd.org/changeset/base/341834 Log: pf tests: ioctl tests require root rights Explicitly mark these tests as requiring root rights. We need to be able to open /dev/pf. Reported by: Marie Helene Kvello-Aune <marieheleneka@gmail.com> MFC after: 2 weeks Modified: head/tests/sys/netpfil/pf/ioctl/validation.c Modified: head/tests/sys/netpfil/pf/ioctl/validation.c ============================================================================== --- head/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 11 21:44:39 2018 (r341833) +++ head/tests/sys/netpfil/pf/ioctl/validation.c Tue Dec 11 21:45:56 2018 (r341834) @@ -61,7 +61,12 @@ common_init_tbl(struct pfr_table *tbl) tbl->pfrt_fback = 0; } -ATF_TC_WITHOUT_HEAD(addtables); +ATF_TC(addtables); +ATF_TC_HEAD(addtables, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(addtables, tc) { struct pfioc_table io; @@ -105,7 +110,12 @@ ATF_TC_BODY(addtables, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(deltables); +ATF_TC(deltables); +ATF_TC_HEAD(deltables, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(deltables, tc) { struct pfioc_table io; @@ -140,7 +150,12 @@ ATF_TC_BODY(deltables, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(gettables); +ATF_TC(gettables); +ATF_TC_HEAD(gettables, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(gettables, tc) { struct pfioc_table io; @@ -170,7 +185,12 @@ ATF_TC_BODY(gettables, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(gettstats); +ATF_TC(gettstats); +ATF_TC_HEAD(gettstats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(gettstats, tc) { struct pfioc_table io; @@ -200,7 +220,12 @@ ATF_TC_BODY(gettstats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(clrtstats); +ATF_TC(clrtstats); +ATF_TC_HEAD(clrtstats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(clrtstats, tc) { struct pfioc_table io; @@ -232,7 +257,12 @@ ATF_TC_BODY(clrtstats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(settflags); +ATF_TC(settflags); +ATF_TC_HEAD(settflags, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(settflags, tc) { struct pfioc_table io; @@ -264,7 +294,12 @@ ATF_TC_BODY(settflags, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(addaddrs); +ATF_TC(addaddrs); +ATF_TC_HEAD(addaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(addaddrs, tc) { struct pfioc_table io; @@ -291,7 +326,12 @@ ATF_TC_BODY(addaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(deladdrs); +ATF_TC(deladdrs); +ATF_TC_HEAD(deladdrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(deladdrs, tc) { struct pfioc_table io; @@ -318,7 +358,12 @@ ATF_TC_BODY(deladdrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(setaddrs); +ATF_TC(setaddrs); +ATF_TC_HEAD(setaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(setaddrs, tc) { struct pfioc_table io; @@ -345,7 +390,12 @@ ATF_TC_BODY(setaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(getaddrs); +ATF_TC(getaddrs); +ATF_TC_HEAD(getaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(getaddrs, tc) { struct pfioc_table io; @@ -374,7 +424,12 @@ ATF_TC_BODY(getaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(getastats); +ATF_TC(getastats); +ATF_TC_HEAD(getastats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(getastats, tc) { struct pfioc_table io; @@ -403,7 +458,12 @@ ATF_TC_BODY(getastats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(clrastats); +ATF_TC(clrastats); +ATF_TC_HEAD(clrastats, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(clrastats, tc) { struct pfioc_table io; @@ -432,7 +492,12 @@ ATF_TC_BODY(clrastats, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(tstaddrs); +ATF_TC(tstaddrs); +ATF_TC_HEAD(tstaddrs, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(tstaddrs, tc) { struct pfioc_table io; @@ -461,7 +526,12 @@ ATF_TC_BODY(tstaddrs, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(inadefine); +ATF_TC(inadefine); +ATF_TC_HEAD(inadefine, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(inadefine, tc) { struct pfioc_table io; @@ -490,7 +560,12 @@ ATF_TC_BODY(inadefine, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(igetifaces); +ATF_TC(igetifaces); +ATF_TC_HEAD(igetifaces, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(igetifaces, tc) { struct pfioc_iface io; @@ -516,7 +591,12 @@ ATF_TC_BODY(igetifaces, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(cxbegin); +ATF_TC(cxbegin); +ATF_TC_HEAD(cxbegin, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(cxbegin, tc) { struct pfioc_trans io; @@ -547,7 +627,12 @@ ATF_TC_BODY(cxbegin, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(cxrollback); +ATF_TC(cxrollback); +ATF_TC_HEAD(cxrollback, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(cxrollback, tc) { struct pfioc_trans io; @@ -578,7 +663,12 @@ ATF_TC_BODY(cxrollback, tc) COMMON_CLEANUP(); } -ATF_TC_WITHOUT_HEAD(commit); +ATF_TC(commit); +ATF_TC_HEAD(commit, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} + ATF_TC_BODY(commit, tc) { struct pfioc_trans io;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812112145.wBBLjvcE038919>