From 751cbf21e738eb4bbc593da1d461862abfafa6be Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Wed, 21 Dec 2022 12:08:44 +0100 Subject: Add unit tests for the BPF filter generation The test-filter verifies that the create_bfp_program builds the filter correctly. The test suite includes the tests for checking a filter with: * a single instruction * a single instruction with arguments * 2 instructions * multiple instructions * multiple instructions with arguments * multiple instructions with multiple instance of the same instruction Signed-off-by: Alice Frosi --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 8dd5d85..a611583 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,8 @@ CFLAGS += -DBUILD_TRANSFORM_OUT=\"t.out\" CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH) CFLAGS += -Wall -Wextra -pedantic +export CFLAGS + all: t.out seitan-loader seitan t.out: qemu_filter build @@ -35,6 +37,9 @@ filter.h: qemu_filter numbers.h: ./nr_syscalls.sh +test-unit: + $(MAKE) -C tests/unit + transform.h: qemu_filter ./transform.sh qemu_filter -- cgit v1.2.3