opnsense-src/tests/sys/kern/execve/Makefile
Kyle Evans e5b431fc0c tests: add a basic test for argc == 0
The kernel should reject such exec()s now, early on. Instead of adding
the needed boilerplate to write a test in C, just add an -n argument for
"(n)ull argv" to the execve helper and exec this other helper that just
exits silently with argv count.

Reviewed by:	emaste, kib, markj (all previous version)
Differential Revision:	https://reviews.freebsd.org/D34045
2022-01-26 13:40:27 -06:00

40 lines
598 B
Makefile

# $FreeBSD$
TESTSDIR= ${TESTSBASE}/sys/kern/execve
BINDIR= ${TESTSDIR}
MAN=
ATF_TESTS_SH+= execve_test
PROGS+= good_aout
PROGS+= execve_helper
PROGS+= execve_argc_helper
LDFLAGS.goodaout+= -static
CLEANFILES+= empty
CLEANFILES+= sparse_aout
CLEANFILES+= trunc_aout
SCRIPTS+= bad_interp_len
SCRIPTS+= dev_null_script
SCRIPTS+= empty
SCRIPTS+= good_script
SCRIPTS+= non_exist_shell
SCRIPTS+= script_arg
SCRIPTS+= script_arg_nospace
SCRIPTS+= sparse_aout
SCRIPTS+= trunc_aout
empty:
@touch $@
sparse_aout:
@truncate -s 20480 $@
trunc_aout:
@truncate -s 16 $@
.include <bsd.test.mk>