]> 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>
Thu, 10 Feb 2022 20:21:59 +0000 (14:21 -0600)
commitd352fa2627096c0cdb1238e06c047f91a3ef0527
tree17e8a1b336b2367605d4f97d15b1c4373c2d0361
parent7393eedb039acb7890da9743a8e8322827820b2c
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.

(cherry picked from commit e5b431fc0c20771a2a18cb5169d75cf337d0f1dd)
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