public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Ammar Faizi <ammarfaizi2@gnuweeb.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ammar Faizi <ammarfaizi2@gnuweeb.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	io-uring Mailing List <io-uring@vger.kernel.org>,
	Romain Pereira <rpereira@anl.gov>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Christian Mazakas <christian.mazakas@gmail.com>
Subject: [PATCH liburing] github: Test build against the installed liburing
Date: Wed,  1 Oct 2025 17:38:03 +0700	[thread overview]
Message-ID: <20251001103803.1423513-1-ammarfaizi2@gnuweeb.org> (raw)

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 <rpereira@anl.gov>
Cc: Pavel Begunkov <asml.silence@gmail.com>
Cc: Christian Mazakas <christian.mazakas@gmail.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
---
 .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


             reply	other threads:[~2025-10-01 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 10:38 Ammar Faizi [this message]
2025-10-01 12:15 ` [PATCH liburing] github: Test build against the installed liburing Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251001103803.1423513-1-ammarfaizi2@gnuweeb.org \
    --to=ammarfaizi2@gnuweeb.org \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=christian.mazakas@gmail.com \
    --cc=io-uring@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpereira@anl.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox