]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: re-enable bpf-framework option for build and unit test jobs
authorLuca Boccassi <luca.boccassi@gmail.com>
Fri, 17 Oct 2025 13:00:23 +0000 (14:00 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 27 Feb 2026 21:57:05 +0000 (21:57 +0000)
Use the same trickery we do in the package build and search for
the actual bpftool binary. For the CI job any one we find is
good enough.
When we switch all jobs to 26.04 we can drop all of this.

This reverts commit cc814110af7a453db898ea2990a0281616d5ceff.

(cherry picked from commit 3b11139c0db9dd0a37b0493a8d2ad5f531a92344)
(cherry picked from commit 30c2834e11cbb9ae425d31f16776a42668c5f25c)

.github/workflows/build-test.sh
.github/workflows/unit-tests.sh

index 1e8daeac2c5ec4341a62a1f3b2c9a4e3c1d252a1..f7517c3e48099eae4007fd5c4cef0566c08ac7d8 100755 (executable)
@@ -47,6 +47,7 @@ PACKAGES=(
     libxkbcommon-dev
     libxtables-dev
     libzstd-dev
+    linux-tools-generic
     mold
     mount
     net-tools
@@ -144,6 +145,12 @@ sudo apt-get -y install "${PACKAGES[@]}"
 pip3 install --user -r .github/workflows/requirements.txt --require-hashes --break-system-packages
 export PATH="$HOME/.local/bin:$PATH"
 
+# TODO: drop after we switch to ubuntu 26.04
+bpftool_dir=$(dirname "$(find /usr/lib/linux-tools/ /usr/lib/linux-tools-* -name 'bpftool' -perm /u=x 2>/dev/null | sort -r | head -n1)")
+if [ -n "$bpftool_dir" ]; then
+    export PATH="$bpftool_dir:$PATH"
+fi
+
 if [[ -n "$CUSTOM_PYTHON" ]]; then
     # If CUSTOM_PYTHON is set we need to pull jinja2 from pip, as a local interpreter is used
     pip3 install --user --break-system-packages jinja2
@@ -169,7 +176,6 @@ for args in "${ARGS[@]}"; do
          meson setup \
                -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true --werror \
                -Dnobody-group=nogroup -Dcryptolib="${CRYPTOLIB:?}" -Ddebug=false \
-               -Dbpf-framework=disabled \
                $args build; then
 
         cat build/meson-logs/meson-log.txt
index b7bafa0249416e56e7c50b1c97cdce75e2a55d4f..aebe94ebbcf9efadebd196e5a09cfd3d9bbb5fec 100755 (executable)
@@ -18,6 +18,7 @@ ADDITIONAL_DEPS=(
     libtss2-dev
     libxkbcommon-dev
     libzstd-dev
+    linux-tools-generic
     python3-libevdev
     python3-pip
     python3-pyelftools
@@ -74,6 +75,12 @@ for phase in "${PHASES[@]}"; do
             capsh --drop=all -- -c "stat $PWD/meson.build"
             ;;
         RUN|RUN_GCC|RUN_CLANG|RUN_CLANG_RELEASE)
+            # TODO: drop after we switch to ubuntu 26.04
+            bpftool_dir=$(dirname "$(find /usr/lib/linux-tools/ /usr/lib/linux-tools-* -name 'bpftool' -perm /u=x 2>/dev/null | sort -r | head -n1)")
+            if [ -n "$bpftool_dir" ]; then
+                export PATH="$bpftool_dir:$PATH"
+            fi
+
             if [[ "$phase" =~ ^RUN_CLANG ]]; then
                 export CC=clang
                 export CXX=clang++
@@ -92,12 +99,18 @@ for phase in "${PHASES[@]}"; do
                 fi
             fi
             MESON_ARGS+=(--fatal-meson-warnings)
-            run_meson -Dnobody-group=nogroup --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true -Dbpf-framework=disabled "${MESON_ARGS[@]}" build
+            run_meson -Dnobody-group=nogroup --werror -Dtests=unsafe -Dslow-tests=true -Dfuzz-tests=true "${MESON_ARGS[@]}" build
             ninja -C build -v
             # Ensure setting a timezone (like the reproducible build tests do) does not break time/date unit tests
             TZ=GMT+12 meson test -C build --print-errorlogs
             ;;
         RUN_ASAN_UBSAN|RUN_GCC_ASAN_UBSAN|RUN_CLANG_ASAN_UBSAN|RUN_CLANG_ASAN_UBSAN_NO_DEPS)
+            # TODO: drop after we switch to ubuntu 26.04
+            bpftool_dir=$(dirname "$(find /usr/lib/linux-tools/ /usr/lib/linux-tools-* -name 'bpftool' -perm /u=x 2>/dev/null | sort -r | head -n1)")
+            if [ -n "$bpftool_dir" ]; then
+                export PATH="$bpftool_dir:$PATH"
+            fi
+
             MESON_ARGS=(--optimization=1)
 
             if [[ "$phase" =~ ^RUN_CLANG_ASAN_UBSAN ]]; then
@@ -115,7 +128,7 @@ for phase in "${PHASES[@]}"; do
                 fi
             fi
             MESON_ARGS+=(--fatal-meson-warnings)
-            run_meson -Dnobody-group=nogroup --werror -Dtests=unsafe -Db_sanitize=address,undefined -Dbpf-framework=disabled "${MESON_ARGS[@]}" build
+            run_meson -Dnobody-group=nogroup --werror -Dtests=unsafe -Db_sanitize=address,undefined "${MESON_ARGS[@]}" build
             ninja -C build -v
 
             export ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1