Linux io-uring development
 help / color / mirror / Atom feed
* [PATCH liburing v1 1/2] tests: fix bpf ops build error
@ 2026-04-26 11:27 Haiyue Wang
  2026-04-26 11:27 ` [PATCH liburing v1 2/2] .gitignore: add new test build output Haiyue Wang
  2026-04-26 17:31 ` [PATCH liburing v1 1/2] tests: fix bpf ops build error Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Haiyue Wang @ 2026-04-26 11:27 UTC (permalink / raw)
  To: io-uring; +Cc: Haiyue Wang

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 <haiyuewa@163.com>
---
 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 - </dev/null 2>&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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH liburing v1 2/2] .gitignore: add new test build output
  2026-04-26 11:27 [PATCH liburing v1 1/2] tests: fix bpf ops build error Haiyue Wang
@ 2026-04-26 11:27 ` Haiyue Wang
  2026-04-26 17:31 ` [PATCH liburing v1 1/2] tests: fix bpf ops build error Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Haiyue Wang @ 2026-04-26 11:27 UTC (permalink / raw)
  To: io-uring; +Cc: Haiyue Wang

These two files are new added build output:
  test/bpf_cp.tt
  test/bpf_nops.tt

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index c6936314..e901d9b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,6 +31,7 @@
 /examples/zcrx
 
 /test/*.t
+/test/*.tt
 /test/*.dmesg
 /test/output/
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH liburing v1 1/2] tests: fix bpf ops build error
  2026-04-26 11:27 [PATCH liburing v1 1/2] tests: fix bpf ops build error Haiyue Wang
  2026-04-26 11:27 ` [PATCH liburing v1 2/2] .gitignore: add new test build output Haiyue Wang
@ 2026-04-26 17:31 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2026-04-26 17:31 UTC (permalink / raw)
  To: io-uring, Haiyue Wang


On Sun, 26 Apr 2026 19:27:30 +0800, Haiyue Wang wrote:
> 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
> 
> [...]

Applied, thanks!

[1/2] tests: fix bpf ops build error
      commit: 49f1a2ab7833a3563329fd9a86f58f84875d57e4
[2/2] .gitignore: add new test build output
      commit: 4330d09391470154ba4e453d01b1cf2f1f5ef32d

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-26 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-26 11:27 [PATCH liburing v1 1/2] tests: fix bpf ops build error Haiyue Wang
2026-04-26 11:27 ` [PATCH liburing v1 2/2] .gitignore: add new test build output Haiyue Wang
2026-04-26 17:31 ` [PATCH liburing v1 1/2] tests: fix bpf ops build error Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox