Subject: [PATCH liburing] github: Test build against the installed liburing

From: Ammar Faizi <[email-masked]>
Date: Wed, 1 Oct 2025 17:38:03 +0700

When adding a new header file, the author might forget to add it to the
installation path in the Makefile.

For example, commit 7e565c0116ba ("tests: test the query interface"),
introduced an include to the query.h file via liburing.h, but the
query.h file was not added to the installation entry, which resulted
in the following error:

  In file included from a.c:1:
  /usr/include/liburing.h:19:10: fatal error: liburing/io_uring/query.h: No such file or directory
     19 | #include "liburing/io_uring/query.h"
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.

This kind of breakage is only caught by the liburing that's installed
in the system. Make sure the GitHub CI covers it so we can catch the
breakage earlier before a new release is tagged and distributed.

Thanks to Romain Pereira for reporting the issue on GitHub!

Link: https://github.com/axboe/liburing/issues/1470
Cc: Romain Pereira <[email-masked]>
Cc: Pavel Begunkov <[email-masked]>
Cc: Christian Mazakas <[email-masked]>
Signed-off-by: Ammar Faizi <[email-masked]>
---
 .github/workflows/ci.yml       | 18 ++++++++++++++++++
 .github/workflows/test_build.c |  9 +++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 .github/workflows/test_build.c

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3c9a10d4e147..1056bdf41985 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -196,6 +196,17 @@ jobs:
         run: |
           sudo make install;
 
+      - name: Test build against the installed liburing
+        run: |
+          export TEST_FILE=".github/workflows/test_build.c";
+          if [ "$SANITIZE" -eq "1" ]; then
+            export SANITIZE_FLAGS="-fsanitize=address,undefined";
+          else
+            export SANITIZE_FLAGS="";
+          fi;
+          ${{matrix.build_args.cc}} -x c -o a.out $TEST_FILE -luring $SANITIZE_FLAGS;
+          ${{matrix.build_args.cxx}} -x c++ -o a.out $TEST_FILE -luring $SANITIZE_FLAGS;
+
 
   alpine-musl-build:
     needs: get_commit_list
@@ -239,6 +250,13 @@ jobs:
         run: |
           make install;
 
+      - name: Test build against the installed liburing
+        shell: alpine.sh {0}
+        run: |
+          export TEST_FILE=".github/workflows/test_build.c";
+          gcc -x c -o a.out $TEST_FILE -luring;
+          g++ -x c++ -o a.out $TEST_FILE -luring;
+
 
   codespell:
     needs: get_commit_list
diff --git a/.github/workflows/test_build.c b/.github/workflows/test_build.c
new file mode 100644
index 000000000000..a94fcdceef22
--- /dev/null
+++ b/.github/workflows/test_build.c
@@ -0,0 +1,9 @@
+#include <liburing.h>
+
+int main(void)
+{
+	struct io_uring ring;
+	io_uring_queue_init(8, &ring, 0);
+	io_uring_queue_exit(&ring);
+	return 0;
+}
-- 
Ammar Faizi

---

From: Jens Axboe <[email-masked]>
Date: Wed, 01 Oct 2025 06:15:47 -0600

On Wed, 01 Oct 2025 17:38:03 +0700, Ammar Faizi wrote:
> [...]

Applied, thanks!

[1/1] github: Test build against the installed liburing
      commit: f22f2fb4341afbe755870b0e7dd1b680dbb5bb8f

Best regards,
-- 
Jens Axboe