From 8fc77732cbae451ea7b7fde88bef5f322167cd43 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Tue, 14 Feb 2023 09:12:19 +0100 Subject: Add test actions Unit test for the action return, block and continue. The unit test installs a seccomp filter into the target for filter the getpid syscalls. Based on the action, the test checks the result of the syscall in the target to validate the correctness of the actions. Signed-off-by: Alice Frosi --- tests/unit/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/unit/Makefile') diff --git a/tests/unit/Makefile b/tests/unit/Makefile index 5e7116b..a61f34c 100644 --- a/tests/unit/Makefile +++ b/tests/unit/Makefile @@ -5,6 +5,12 @@ test-filter: test-filter.c $(CC) $(CFLAGS) -o test-filter ../../filter.c ../../disasm.c test-filter.c ./test-filter -test-actions: test_action_call.c ../../actions.c ../../actions.h +test-action-call: test_action_call.c ../../actions.c ../../actions.h $(CC) $(CFLAGS) -o test-action-call ../../actions.c test_action_call.c ./test-action-call + +test-actions: test_actions.c ../../actions.c ../../actions.h ../../common.h + $(CC) $(CFLAGS) -o test-actions \ + ../../common.c ../../actions.c \ + test_actions.c + ./test-actions -- cgit v1.2.3