mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
This includes various fixes that I submitted recently such as updating the
pdkill() tests for the actual implemented behaviour
(https://github.com/google/capsicum-test/pull/53) and lots of changes to
avoid calling sleep() and replacing it with reliable synchronization
(pull requests 49,51,52,53,54). This should make the testsuite more reliable
when running on Jenkins. Additionally, process status is now retrieved using
libprocstat instead of running `ps` and parsing the output
(https://github.com/google/capsicum-test/pull/50). This fixes one previously
failing test and speeds up execution.
Overall, this update reduces the total runtime from ~60s to about 4-5 seconds.
(cherry picked from commit 955a3f9ad5)
56 lines
945 B
Makefile
56 lines
945 B
Makefile
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
|
|
TESTSDIR= ${TESTSBASE}/sys/capsicum
|
|
|
|
ATF_TESTS_C+= bindat_connectat
|
|
ATF_TESTS_C+= ioctls_test
|
|
|
|
CFLAGS+= -I${SRCTOP}/tests
|
|
|
|
.if ${MK_GOOGLETEST} != no
|
|
|
|
.PATH: ${SRCTOP}/contrib/capsicum-test
|
|
|
|
GTESTS+= capsicum-test
|
|
GTESTS_WRAPPER_SH.capsicum-test= functional
|
|
|
|
SRCS.capsicum-test+= \
|
|
capsicum-test-main.cc \
|
|
capsicum-test.cc \
|
|
capability-fd.cc \
|
|
fexecve.cc \
|
|
procdesc.cc \
|
|
capmode.cc \
|
|
fcntl.cc \
|
|
ioctl.cc \
|
|
openat.cc \
|
|
sysctl.cc \
|
|
select.cc \
|
|
mqueue.cc \
|
|
socket.cc \
|
|
sctp.cc \
|
|
capability-fd-pair.cc \
|
|
overhead.cc \
|
|
rename.cc
|
|
|
|
LIBADD.capsicum-test+= gtest pthread procstat
|
|
TEST_METADATA.capsicum-test= required_user="unprivileged"
|
|
|
|
.for p in mini-me mini-me.noexec mini-me.setuid
|
|
PROGS+= $p
|
|
NO_SHARED.$p=
|
|
SRCS.$p= mini-me.c
|
|
.endfor
|
|
|
|
BINDIR= ${TESTSDIR}
|
|
|
|
BINMODE.mini-me.noexec= ${NOBINMODE}
|
|
BINMODE.mini-me.setuid= 4555
|
|
|
|
WARNS.capsicum-test= 3
|
|
|
|
.endif # MK_GOOGLETEST
|
|
|
|
.include <bsd.test.mk>
|