Changeset View
Changeset View
Standalone View
Standalone View
head/tests/sys/audit/administrative.c
Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | |||||
ATF_TC_BODY(nfs_getfh_success, tc) | ATF_TC_BODY(nfs_getfh_success, tc) | ||||
{ | { | ||||
fhandle_t fhp; | fhandle_t fhp; | ||||
pid = getpid(); | pid = getpid(); | ||||
snprintf(adregex, sizeof(adregex), "nfs_getfh.*%d.*ret.*success", pid); | snprintf(adregex, sizeof(adregex), "nfs_getfh.*%d.*ret.*success", pid); | ||||
/* File needs to exist to call getfh(2) */ | /* File needs to exist to call getfh(2) */ | ||||
ATF_REQUIRE(filedesc = open(path, O_CREAT, mode) != -1); | ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1); | ||||
FILE *pipefd = setup(fds, auclass); | FILE *pipefd = setup(fds, auclass); | ||||
ATF_REQUIRE_EQ(0, getfh(path, &fhp)); | ATF_REQUIRE_EQ(0, getfh(path, &fhp)); | ||||
check_audit(fds, adregex, pipefd); | check_audit(fds, adregex, pipefd); | ||||
close(filedesc); | close(filedesc); | ||||
} | } | ||||
ATF_TC_CLEANUP(nfs_getfh_success, tc) | ATF_TC_CLEANUP(nfs_getfh_success, tc) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 350 Lines • Show Last 20 Lines |