If removed the previous install by 'rm -rf /usr/include/liburing', the test build will fail: make[1]: Entering directory '/root/linux/liburing/test' CC helpers.o mkdir -p output/bpf CC output/bpf/nops.bpf.o mkdir -p output/bpf CC output/bpf/cp.bpf.o In file included from /root/linux/liburing/test/bpf-progs/nops.bpf.c:2: /root/linux/liburing/test/bpf-progs/../bpf_defs.h:9:10: fatal error: 'liburing/io_uring.h' file not found 9 | #include "liburing/io_uring.h" | ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[1]: *** [Makefile:387: output/bpf/nops.bpf.o] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from /root/linux/liburing/test/bpf-progs/cp.bpf.c:2: /root/linux/liburing/test/bpf-progs/../bpf_defs.h:9:10: fatal error: 'liburing/io_uring.h' file not found 9 | #include "liburing/io_uring.h" | ^~~~~~~~~~~~~~~~~~~~~ 1 error generated. make[1]: *** [Makefile:387: output/bpf/cp.bpf.o] Error 1 make[1]: Leaving directory '/root/linux/liburing/test' make: *** [Makefile:14: all] Error 2 Add the include option in 'CPPFLAGS' for bpf build. Fixes: fd8a6e66c739 ("tests: test io_uring bpf ops") Signed-off-by: Haiyue Wang --- test/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Makefile b/test/Makefile index bcb97da1..05e1f9e9 100644 --- a/test/Makefile +++ b/test/Makefile @@ -385,6 +385,7 @@ CLANG_BPF_SYS_INCLUDES ?= $(shell $(CLANG) -v -E - &1 \ $(BPF_OUTPUT)/%.bpf.o: $(BPF_PROGS_DIR)/%.bpf.c $(wildcard %.h) mkdir -p ${BPF_OUTPUT} $(QUIET_CC)$(CLANG) -g -O2 -target bpf \ + -I../src/include/ \ -I$(BPF_OUTPUT) $(CLANG_BPF_SYS_INCLUDES) \ -Wno-missing-declarations \ -c $(filter %.c,$^) -o $(patsubst %.bpf.o,%.tmp.bpf.o,$@) -mcpu=v4 -- 2.54.0