tcp*.bt scripts tried to include glibc headers, which didn't work on
nixos because bpftrace tried to call clang-major with some options to
get the paths, but we never told it where to find it.
Give bpftrace the path directly instead of giving it a path to clang.
runqlat.bt doesn't work with glibc headers and requires kernel headers
which are no longer extracted, just provide its value.
Note the default clang output also had some clang-internal headers, but
these seem to be included anyway through libclang API without having to
give them here, so we only pass the glibc ones.
While here:
- also backport another bpftrace patch that made the tcp*.bt tools to
actually not require these includes
- and add tests that we can include these.
Co-authored-by: Arian van Putten <arian.vanputten@gmail.com>
commit fd5d7b2586 ("tests/bpf: add module BTF test") added a new test
for module BTF, but that test does not work on aarch64. (merged in
https://github.com/NixOS/nixpkgs/pull/214001 )
This is not a regression (kfuncs didn't work on bpftrace 0.16,
even if you do not use features requiring BTF like argument name
or type), so just disable the test on aarch64 until it is fixed.
bpftrace 0.17 added module BTF support, check this works.
On bpftrace 0.16, this failed with the following error:
> ERROR: kfunc:nft_trans_alloc_gfp: no BTF data for the function