lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251001103803.1423513-1-ammarfaizi2@gnuweeb.org>
Date: Wed,  1 Oct 2025 17:38:03 +0700
From: Ammar Faizi <ammarfaizi2@...weeb.org>
To: Jens Axboe <axboe@...nel.dk>
Cc: Ammar Faizi <ammarfaizi2@...weeb.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	io-uring Mailing List <io-uring@...r.kernel.org>,
	Romain Pereira <rpereira@....gov>,
	Pavel Begunkov <asml.silence@...il.com>,
	Christian Mazakas <christian.mazakas@...il.com>
Subject: [PATCH liburing] github: Test build against the installed liburing

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ