Skip to contentSkip to conversation

selftests/exec: Test for empty string on NULL argv

PATCH Applied Kees Cook 1 participant 1 message Feb 1, 2022

Subsystems (2)
lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 selftests/exec: Test for empty string on NULL argv

Test for the NULL argv argument producing a single empty string on exec.

Cc Eric Biederman <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Yang Yingliang <[email protected]>
Cc Andrew Morton <[email protected]>

---
This is testing for this patch:
https://lore.kernel.org/linux-hardening/[email protected]/

---
 tools/testing/selftests/exec/Makefile    |  1 +
 tools/testing/selftests/exec/null-argv.c | 78 ++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 tools/testing/selftests/exec/null-argv.c
tools/testing/selftests/exec/Makefile +1 -0
index dd61118df66e..4832cd8f4f9c 100644
@@ -10,6 +10,7 @@ TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir pipe
 TEST_FILES := Makefile
 
 TEST_GEN_PROGS += recursion-depth
+TEST_GEN_PROGS += null-argv
 
 EXTRA_CLEAN := $(OUTPUT)/subdir.moved $(OUTPUT)/execveat.moved $(OUTPUT)/xxxxx*	\
 	       $(OUTPUT)/S_I*.test
tools/testing/selftests/exec/null-argv.c new file +78 -0

78 lines not on this page · raw message

Signature · 1 line
2.30.2