aboutgitcodelistschat:MatrixIRC
path: root/tests/unit/Makefile
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-06-30 11:22:52 +0200
committerAlice Frosi <afrosi@redhat.com>2023-07-03 17:28:33 +0200
commit876a52e95a9d24a4b9fa37325d83bcb7d3c7b160 (patch)
tree69edae1a49a42fb9abdf749797d8286b16c2ca3e /tests/unit/Makefile
parent06791d85cff567ff038ececc19d6e775dab84840 (diff)
downloadseitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.tar
seitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.tar.gz
seitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.tar.bz2
seitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.tar.lz
seitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.tar.xz
seitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.tar.zst
seitan-876a52e95a9d24a4b9fa37325d83bcb7d3c7b160.zip
test: fix filter-build test and bugs
The tests for checking the filter build recompile and are successfull. Changes: - spotted a couple of bugs for adding the arguments in the filter - readded function `filter_flush_args` to flush_args; this is needed to distinguish when the arguments belong to the same block or are different entries to the same syscall - build the filter in a way that CMP_EQ corresponds to BPF_JEQ and we don't need to awkwardly negate the operations (still TODO for AND_EQ)
Diffstat (limited to 'tests/unit/Makefile')
-rw-r--r--tests/unit/Makefile23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/unit/Makefile b/tests/unit/Makefile
index 1a7f70a..76f815e 100644
--- a/tests/unit/Makefile
+++ b/tests/unit/Makefile
@@ -4,29 +4,30 @@
MAIN_DIR := ../../
COMMON_DIR := ../../common
-OP_DIR := ../../
COOKER_DIR := ../../cooker
DBG_DIR := ../../debug
-SRCS_FILTER_BUILD := $(COOKER_DIR)/filter.c $(DBG_DIR)/disasm.c $(COMMON_DIR)/common.c
-HEADERS_FILTER_BUILD := $(COOKER_DIR)/filter.h $(DBG_DIR)/disasm.h $(COMMON_DIR)/common.h
+SRCS_FILTER_BUILD := $(COOKER_DIR)/filter.c $(DBG_DIR)/disasm.c $(COMMON_DIR)/common.c \
+ $(COMMON_DIR)/util.c
+HEADERS_FILTER_BUILD := $(COOKER_DIR)/filter.h $(DBG_DIR)/disasm.h $(COMMON_DIR)/common.h \
+ $(COMMON_DIR)/util.h
SRCS_FILTER := $(COOKER_DIR)/filter.c $(COMMON_DIR)/common.c util.c \
$(DBG_DIR)/disasm.c
-HEADERS_FILTER := $(COOKER_DIR)/filter.h $(COMMON_DIR)/common.h \
+HEADERS_FILTER := $(COOKER_DIR)/filter.h $(COMMON_DIR)/common.h $(COMMON_DIR)/util.h \
$(DBG_DIR)/disasm.h testutil.h
-HEADERS_OP_CALL := testutil.h $(COMMON_DIR)/gluten.h $(OP_DIR)/operations.h \
+HEADERS_OP_CALL := testutil.h $(COMMON_DIR)/gluten.h $(MAIN_DIR)/operations.h \
$(COMMON_DIR)/common.h $(COMMON_DIR)/util.h
-SRCS_OP_CALL := $(COMMON_DIR)/common.c $(OP_DIR)/operations.c util.c $(COMMON_DIR)/util.c
+SRCS_OP_CALL := $(COMMON_DIR)/common.c $(MAIN_DIR)/operations.c util.c $(COMMON_DIR)/util.c
-HEADERS_OP := $(COMMON_DIR)/gluten.h $(OP_DIR)/operations.h \
+HEADERS_OP := $(COMMON_DIR)/gluten.h $(MAIN_DIR)/operations.h \
$(COMMON_DIR)/common.h testutil.h $(COMMON_DIR)/util.h
-SRCS_OP := $(COMMON_DIR)/common.c $(OP_DIR)/operations.c util.c $(COMMON_DIR)/util.c
+SRCS_OP := $(COMMON_DIR)/common.c $(MAIN_DIR)/operations.c util.c $(COMMON_DIR)/util.c
-HEADERS_ERROR := $(COMMON_DIR)/gluten.h $(OP_DIR)/operations.h \
+HEADERS_ERROR := $(COMMON_DIR)/gluten.h $(MAIN_DIR)/operations.h \
$(COMMON_DIR)/common.h testutil.h $(COMMON_DIR)/util.h
-SRCS_ERROR := $(COMMON_DIR)/common.c $(OP_DIR)/operations.c util.c $(COMMON_DIR)/util.c
+SRCS_ERROR := $(COMMON_DIR)/common.c $(MAIN_DIR)/operations.c util.c $(COMMON_DIR)/util.c
TARGET := $(shell $(CC) -dumpmachine)
TARGET_ARCH := $(shell echo $(TARGET) | cut -f1 -d- | tr [A-Z] [a-z])
@@ -38,7 +39,7 @@ AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/PPC64/PPC/')
AUDIT_ARCH := $(shell echo $(AUDIT_ARCH) | sed 's/PPCLE/PPC64LE/')
CFLAGS += -Wall -Wextra -pedantic
-CFLAGS += -I$(MAIN_DIR) -I$(OP_DIR) -I$(DBG_DIR)
+CFLAGS += -I$(MAIN_DIR) -I$(DBG_DIR) -I$(COMMON_DIR) -I$(COOKER_DIR)
CFLAGS += -lcheck
CFLAGS += -DSEITAN_AUDIT_ARCH=AUDIT_ARCH_$(AUDIT_ARCH)