FreeBSD Bugzilla – Attachment 203226 Details for
Bug 236857
Fix sysctl check for some sys/audit/process-control tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch using ATF_REQUIRE_SYSCTL_INT
tests_sys_audit_process-control.diff (text/plain), 1.70 KB, created by
Olivier Cochard
on 2019-03-28 23:07:49 UTC
(
hide
)
Description:
patch using ATF_REQUIRE_SYSCTL_INT
Filename:
MIME Type:
Creator:
Olivier Cochard
Created:
2019-03-28 23:07:49 UTC
Size:
1.70 KB
patch
obsolete
>Index: tests/sys/audit/Makefile >=================================================================== >--- tests/sys/audit/Makefile (revision 345541) >+++ tests/sys/audit/Makefile (working copy) >@@ -55,4 +55,6 @@ > > LDFLAGS+= -lbsm -lutil > >+CFLAGS.process-control.c+= -I${SRCTOP}/tests >+ > .include <bsd.test.mk> >Index: tests/sys/audit/process-control.c >=================================================================== >--- tests/sys/audit/process-control.c (revision 345541) >+++ tests/sys/audit/process-control.c (working copy) >@@ -48,6 +48,8 @@ > > #include "utils.h" > >+#include "freebsd_test_suite/macros.h" >+ > static pid_t pid; > static int filedesc, status; > static struct pollfd fds[1]; >@@ -1512,14 +1514,9 @@ > > ATF_TC_BODY(cap_enter_success, tc) > { >- int capinfo; >- size_t len = sizeof(capinfo); > const char *capname = "kern.features.security_capability_mode"; >- ATF_REQUIRE_EQ(0, sysctlbyname(capname, &capinfo, &len, NULL, 0)); > >- /* Without CAPABILITY_MODE enabled, cap_enter() returns ENOSYS */ >- if (!capinfo) >- atf_tc_skip("Capsicum is not enabled in the system"); >+ ATF_REQUIRE_SYSCTL_INT(capname, 1); > > FILE *pipefd = setup(fds, auclass); > ATF_REQUIRE((pid = fork()) != -1); >@@ -1550,14 +1547,10 @@ > > ATF_TC_BODY(cap_getmode_success, tc) > { >- int capinfo, modep; >- size_t len = sizeof(capinfo); >+ int modep; > const char *capname = "kern.features.security_capability_mode"; >- ATF_REQUIRE_EQ(0, sysctlbyname(capname, &capinfo, &len, NULL, 0)); > >- /* Without CAPABILITY_MODE enabled, cap_getmode() returns ENOSYS */ >- if (!capinfo) >- atf_tc_skip("Capsicum is not enabled in the system"); >+ ATF_REQUIRE_SYSCTL_INT(capname, 1); > > pid = getpid(); > snprintf(pcregex, sizeof(pcregex), "cap_getmode.*%d.*success", pid);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236857
:
203217
|
203222
|
203223
|
203226
|
203241