• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozillazg / ptcpdump / 45728050773
72%

Build:
DEFAULT BRANCH: master
Ran 26 Nov 2026 12:36AM UTC
Jobs 1
Files 78
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Nov 2026 12:20AM UTC coverage: 72.162% (+0.3%) from 71.821%
45728050773

push

github

web-flow
fix(btf): support BTF header with layout fields (#430)

* fix(btf): support BTF header with layout fields

Kernel 7.1 extends struct btf_header with layout_off/layout_len when the
kernel is built with pahole >= 1.31 (scripts/Makefile.btf enables
`--btf_features=layout` from that version on), which makes hdr_len 32
instead of 24. The pinned cilium/ebpf fork (based on v0.18.0) rejects the
extra non-zero header bytes, so ptcpdump fails to load the kernel BTF on
such kernels:

    load btf failed: bad magic number '[159 235 1 0]' in record at byte 0x0

Update the fork to its dev branch based on v0.22.0, which contains
cilium/ebpf#2042 (btf: parse BTF layout fields in header) and still keeps
the ptcpdump specific LoadAndAssign options.

The CI kernel matrix can't catch this regression: the BTF header format
only depends on the pahole version used to build the kernel, and the LVH
images (including 7.2 and bpf-next) are built with pahole 1.30, so their
BTF still has the 24-byte header. Add regression tests which don't depend
on the kernel image:

- a unit test which parses BTF blobs with a 24-byte and a 32-byte header
- an e2e test which appends the layout fields to the running kernel's BTF
  and verifies ptcpdump can capture with `--kernel-btf`

* ci: derive e2e run conditions from matrix capabilities

The e2e step conditions repeated the same kernel/backend checks ~15 times
(e.g. `!startsWith(matrix.kernel, '4.')`), so a new kernel (6.18, 7.2, ...)
could be silently skipped while editing one of them. Derive the conditions
once in a job-level env instead.

While at it:
- run the rotate test on all rolling kernels (bpf and bpf-next) instead of
  only bpf-next
- run the BTF layout header test on 4.x too, using the BTF file the
  workflow already copies into the VM (the test script falls back to
  /var/lib/ptcpdump/btf/vmlinux)

Verified that the new conditions resolve exactly like the old ones for
every (kernel, backend) combination, except the two intended c... (continued)

4443 of 6157 relevant lines covered (72.16%)

0.72 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
78.08
-4.62% internal/metadata/container/containerd/containerd.go
2
71.43
-5.71% internal/log/log.go
Jobs
ID Job ID Ran Files Coverage
1 45728050773.1 26 Nov 2026 12:36AM UTC 78
72.16
GitHub Action Run
Source Files on build 45728050773
  • Tree
  • List 78
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #45728050773
  • 66c8ddaa on github
  • Prev Build on master (#45029618167)
  • Next Build on master (#46001632644)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc