Skip to content

eBPF-based security platform

ci: give the ci-checks tests the checkpatch.pl and spatch they skip without

Daniel Borkmann5809db141485
diff --git a/.github/scripts/tests.sh b/.github/scripts/tests.sh
index ea279b6e..bd7eaee1 100755
--- a/.github/scripts/tests.sh
+++ b/.github/scripts/tests.sh
@@ -296,6 +296,11 @@ setup() {
sudo BPF_VMLINUX_BTF="$PWD/$kernel/vmlinux.btf" \
.github/scripts/vm-toolchain.sh "$@"
+ # t0003 runs the kernel's checkpatch.pl, which check-style.sh fetches
+ # into build/checkpatch/ on its first run; without it t0003 skips.
+ sh .github/scripts/check-style.sh --types >/dev/null ||
+ echo '::warning::no checkpatch.pl fetched; t0003 skips'
+
if [ "${VM:-1}" != 0 ]; then
# /dev/kvm belongs to root on the runner.
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' |
diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml
index 0dc213bf..0f821d9e 100644
--- a/.github/workflows/sanitizers.yml
+++ b/.github/workflows/sanitizers.yml
@@ -75,6 +75,7 @@ jobs:
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
+ coccinelle \
cryptsetup-bin \
e2fsprogs \
curl \
@@ -90,6 +91,8 @@ jobs:
sh .github/scripts/install-clang.sh libclang-rt-23-dev
git config --global --add safe.directory /host
+ sh .github/scripts/check-style.sh --types >/dev/null ||
+ echo 'no checkpatch.pl fetched; t0003 skips' >&2
sh .github/scripts/sanitizer-openssl-deps.sh
diff --git a/Documentation/contribute/testing/testing.rst b/Documentation/contribute/testing/testing.rst
index 5aac8cba..e9a23e0c 100644
--- a/Documentation/contribute/testing/testing.rst
+++ b/Documentation/contribute/testing/testing.rst
@@ -25,8 +25,12 @@ Before you begin
tests, ``libtpms-dev`` for the TPM simulator helper and ``rpmbuild``
for the rpm packaging test.
- For the ``ci-checks`` tests: ``git``, ``jq``, ``pkg-config``,
- ``readelf`` and ``spatch`` from Coccinelle. A test whose tool is
- missing skips. The runner of the ``CI suite`` workflow has them all.
+ ``readelf``, ``spatch`` from Coccinelle and the kernel's
+ ``checkpatch.pl``, which ``check-style.sh`` fetches into
+ ``build/checkpatch/`` on its first run. A test whose tool is missing
+ skips, and so does t0007's check of the operator binaries until they
+ are built without a sanitizer. The ``CI suite`` workflow and the
+ sanitizer jobs give the tests every tool.
- For the tests that boot a VM: a readable and writable ``/dev/kvm``,
a locked-memory limit (``ulimit -l``) of ``unlimited``, which the
shirudo binaries the runner calls require, an x86-64 or arm64 host,