]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tests: add a basic test for argc == 0
authorKyle Evans <kevans@FreeBSD.org>
Wed, 26 Jan 2022 01:22:03 +0000 (19:22 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Wed, 26 Jan 2022 19:40:27 +0000 (13:40 -0600)
commite5b431fc0c20771a2a18cb5169d75cf337d0f1dd
treea689e0006bc0d3783e2381a5b36afd4592fb8015
parent773fa8cd136a5775241c3e3a70f1997633ebeedf
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
tests/sys/kern/execve/Makefile
tests/sys/kern/execve/execve_argc_helper.c [new file with mode: 0644]
tests/sys/kern/execve/execve_helper.c
tests/sys/kern/execve/execve_test.sh