Skip to contentSkip to conversation

exec_execve: add some simple tests for the EXECVE record

PATCH New Paul Moore 1 participant 1 message Jul 20, 2016

lore
Share & tools
lore

Paul Moore

author
#0 lore raw

PATCH 1/1 exec_execve: add some simple tests for the EXECVE record

Beyond the simple existence of the EXECVE record, we test three basic things:

* large number of arguments spanning multiple records
* single large argument spanning multiple records
* single argument that requires hex encoding

---
 tests/Makefile                     |    1 
 tests/exec_execve/.gitignore       |    1 
 tests/exec_execve/Makefile         |   11 +++
 tests/exec_execve/execve_arg_gen.c |  108 +++++++++++++++++++++++++++++++
 tests/exec_execve/test             |  124 ++++++++++++++++++++++++++++++++++++
 5 files changed, 245 insertions(+)
 create mode 100644 tests/exec_execve/.gitignore
 create mode 100644 tests/exec_execve/Makefile
 create mode 100644 tests/exec_execve/execve_arg_gen.c
 create mode 100755 tests/exec_execve/test
tests/Makefile +1 -0
index decb6b2..48a8307 100644
@@ -5,6 +5,7 @@ DISTRO = $(shell ./os_detect)
 
 SUBDIRS := \
 	exec_name \
+	exec_execve \
 	file_create \
 	file_delete \
 	file_rename \
tests/exec_execve/.gitignore new file +1 -0
new file mode 100644
index 0000000..fb9f5a6
@@ -0,0 +1 @@
+execve_arg_gen
tests/exec_execve/Makefile new file +11 -0
new file mode 100644
index 0000000..97a4ce4
@@ -0,0 +1,11 @@
+TARGETS=$(patsubst %.c,%,$(wildcard *.c))
+
+LDLIBS += -lpthread
+
+all: $(TARGETS)
+
+execve_arg_gen: execve_arg_gen.c
+	$(CC) $(CFLAGS) -o $@ $^
+
+clean:
+	rm -f $(TARGETS)
tests/exec_execve/execve_arg_gen.c new file +108 -0

108 lines not on this page · raw message

tests/exec_execve/test new file +124 -0

124 lines not on this page · raw message