aboutgitcodelistschat:MatrixIRC
path: root/tests/unit/Makefile
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2022-12-21 12:08:44 +0100
committerAlice Frosi <afrosi@redhat.com>2022-12-21 15:00:14 +0100
commit751cbf21e738eb4bbc593da1d461862abfafa6be (patch)
tree0a23fd4677e9d6afade48f23198ae18896dea82b /tests/unit/Makefile
parentca4c9f229aa46d7983302323d7468cabde55995c (diff)
downloadseitan-751cbf21e738eb4bbc593da1d461862abfafa6be.tar
seitan-751cbf21e738eb4bbc593da1d461862abfafa6be.tar.gz
seitan-751cbf21e738eb4bbc593da1d461862abfafa6be.tar.bz2
seitan-751cbf21e738eb4bbc593da1d461862abfafa6be.tar.lz
seitan-751cbf21e738eb4bbc593da1d461862abfafa6be.tar.xz
seitan-751cbf21e738eb4bbc593da1d461862abfafa6be.tar.zst
seitan-751cbf21e738eb4bbc593da1d461862abfafa6be.zip
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 <afrosi@redhat.com>
Diffstat (limited to 'tests/unit/Makefile')
-rw-r--r--tests/unit/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/Makefile b/tests/unit/Makefile
new file mode 100644
index 0000000..3270052
--- /dev/null
+++ b/tests/unit/Makefile
@@ -0,0 +1,5 @@
+CFLAGS += -lcheck
+
+test: test-filter.c
+ $(CC) $(CFLAGS) -o test-filter ../../filter.c ../../disasm.c test-filter.c
+ ./test-filter