ci: add scheduled eBPF kernel-compatibility lane - #2677
Open
Eren Arı (ErenAri) wants to merge 1 commit into
Open
ci: add scheduled eBPF kernel-compatibility lane#2677Eren Arı (ErenAri) wants to merge 1 commit into
Eren Arı (ErenAri) wants to merge 1 commit into
Conversation
Eren Arı (ErenAri)
requested review from
Mathew Merrick (matmerr) and
Quang Nguyen (nddq)
August 22, 2026 16:30
Eren Arı (ErenAri)
force-pushed
the
bpfcompat-kernel-compatibility
branch
2 times, most recently
from
August 22, 2026 19:35
3613d3d to
e0cbb61
Compare
Retina's eBPF tests (make test-ebpf, build tag ebpf) currently run only on the GitHub runner's kernel. This adds an advisory scheduled lane that runs those same tests on a spread of other kernels by booting each one in a disposable QEMU/KVM VM via bpfcompat. The lane adds no new test logic. It builds the existing per-plugin test binaries with 'go test -c -tags=ebpf' and runs each as root inside each guest, so a verdict comes from Retina's own loader (cilium/ebpf) and Retina's own assertions. Scope is dns and tcpretrans, whose eBPF tests are self-contained. packetparser is excluded because it compiles its BPF program at run time (loader.CompileEbpf), which would need clang and the source tree in each guest. Scheduled and advisory: never runs on pull requests, cannot block a merge, and uploads evidence on every run including failures. Signed-off-by: ErenAri <erenari27@gmail.com>
Eren Arı (ErenAri)
force-pushed
the
bpfcompat-kernel-compatibility
branch
from
August 22, 2026 19:49
e0cbb61 to
88366e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
What this does
Retina's eBPF tests (
make test-ebpf, build tagebpf) currently run only on the GitHub runner's kernel. This adds an advisory scheduled lane that runs those same tests on a spread of other kernels, by booting each one in a disposable QEMU/KVM VM on the hosted runner's/dev/kvm.It adds no new test logic. It builds the existing per-plugin test binaries with
go test -c -tags=ebpfand runs each as root inside each guest, so a verdict comes from Retina's own loader (github.com/cilium/ebpf) and Retina's own assertions — not a third-party loader's opinion of the object files. The per-kernel verdict is the test binary's exit code.Two files, +200 lines. The lane generates the eBPF objects it needs at run time and commits nothing.
Results
Full run on my fork: https://github.com/ErenAri/retina/actions/runs/32594848147
dnstcpretransalmalinux-8-4.18is markedrequired: false, so that failure is reported without failing the lane.The reason is in the uploaded evidence for that run (kernel
4.18.0-553.150.1.el8_10.x86_64) — four tests fail at load:I have no idea whether EL8 is in scope for Retina. If it isn't, drop that row from the matrix and the lane is all-green. I would rather show it than quietly leave the kernel out.
Scope and honest caveats
packetparseris excluded. It compiles its BPF program at run time vialoader.CompileEbpf, so it would need clang and the source tree inside each guest rather than an embedded object. Addable later as a heavier build-in-guest lane.dropreasonis excluded from this first pass. ItsresolvePayloadpicks different program sets per kernel (fexit ≥5.5 amd64 / ≥6.0 arm64, kprobe fallback below, plus a Mariner subset). I did not want the lane to duplicate that logic and drift from it. Running its tests is the natural next step if this shape is useful.dropreason's objects in a bare guest also needsnf_conntrackpresent, since the fexit programs target__nf_conntrack_confirmin that module. Worth knowing if those tests ever run outside a real node.infra_error. A kernel failure is a finding and is allowed to stand, but "the VM never ran the tests" is not a pass and should not be able to look like one.One thing you may find interesting
getEbpfPayload()has a Mariner / Azure Linux path (IsAzureLinux(), core-kernel-funcs-only subset) that as far as I can tell nothing currently exercises in CI. I added Azure Linux 2.0 and 3.0 kernel profiles to bpfcompat this week, so that path is testable — but Microsoft publishes no public Azure Linux cloud image, so I cannot run it. If someone can point me at an image or a VHD export, I am happy to extend the lane to cover the Mariner branch.About the tool
bpfcompat is Apache-2.0. The action is pinned by commit SHA (
v0.3.6). A comparable lane runs infalcosecurity/libs(#3024, #3061) if it helps to see it in another project first.The lane is scheduled-only and the validation step is
continue-on-error, so it never runs on pull requests and cannot block a merge. Evidence uploads on every run, including failures. Happy to change the kernel list, the schedule, or the scope — or to close this if it is not useful.Independent test of a public project; not affiliated with or endorsed by Microsoft.
Related Issue
Follow-up to #2460, where I asked whether a per-kernel compatibility matrix would be useful.
Checklist
git commit -S -s ...). The commit is signed-off (DCO), but not GPG-signed — I do not have a signing key registered. Happy to re-sign and force-push if that is required to merge.-tags=ebpftests on more kernels.Testing Completed
Four full rehearsals on my fork. The final one (linked above) is green with evidence uploaded:
dnspasses on all 5 kernels.tcpretranspasses on 4 and fails onalmalinux-8-4.18(non-required), with the CO-RE relocation error quoted above readable in the uploadedcommand.stdout.Additional Notes
The artifact upload is an explicit allowlist rather than
.bpfcompat/runs/**, because the per-run directory also holds the generated guest SSH private key, the cloud-init seed and the disk overlay. I verified the uploaded artifact contains only the named log files and no key material.