diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2022-02-11 16:55:34 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2022-02-11 20:37:39 +0900 |
commit | 824d26d3959873bd64c11edf5a918617a038d9aa (patch) | |
tree | 3046e506be3bd38c0b8a585f9bbfd2eaf3fa3587 /nixos/tests/bpf.nix | |
parent | 6108c057ddfdf18a11a755f1e187692bde1961e2 (diff) |
bcc: 0.23.0 -> 0.24.0
Also add an extra test in nixos/tests/bpf.nix for BTF usage in bpftrace Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
Diffstat (limited to 'nixos/tests/bpf.nix')
-rw-r--r-- | nixos/tests/bpf.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nixos/tests/bpf.nix b/nixos/tests/bpf.nix index 233c7dab1ee22..e479cd0579215 100644 --- a/nixos/tests/bpf.nix +++ b/nixos/tests/bpf.nix @@ -18,8 +18,12 @@ import ./make-test-python.nix ({ pkgs, ... }: { # simple BEGIN probe (user probe on bpftrace itself) print(machine.succeed("bpftrace -e 'BEGIN { print(\"ok\"); exit(); }'")) # tracepoint - print(machine.succeed("bpftrace -e 'tracepoint:syscalls:sys_enter_* { print(probe); exit(); }'")) + print(machine.succeed("bpftrace -e 'tracepoint:syscalls:sys_enter_* { print(probe); exit() }'")) # kprobe print(machine.succeed("bpftrace -e 'kprobe:schedule { print(probe); exit() }'")) + # BTF + print(machine.succeed("bpftrace -e 'kprobe:schedule { " + " printf(\"tgid: %d\", ((struct task_struct*) curtask)->tgid); exit() " + "}'")) ''; }) |