mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 04:02:10 +00:00
tests/bpf: add module BTF test
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
This commit is contained in:
parent
c1fd7598cf
commit
fd5d7b2586
|
@ -25,5 +25,9 @@ import ./make-test-python.nix ({ pkgs, ... }: {
|
|||
print(machine.succeed("bpftrace -e 'kprobe:schedule { "
|
||||
" printf(\"tgid: %d\", ((struct task_struct*) curtask)->tgid); exit() "
|
||||
"}'"))
|
||||
# module BTF (bpftrace >= 0.17)
|
||||
print(machine.succeed("bpftrace -e 'kfunc:nft_trans_alloc_gfp { "
|
||||
" printf(\"portid: %d\\n\",args->ctx->portid); "
|
||||
"} BEGIN { exit() }'"))
|
||||
'';
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue