diff options
author | Alexei Starovoitov <ast@kernel.org> | 2021-05-13 17:36:09 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-05-19 00:33:40 +0200 |
commit | 2341d6bb133d44caeba9fbdc851f8624739a84a2 (patch) | |
tree | 868e22ff2f4065407650ebf4881fb100ce234ea4 /tools/testing/selftests/bpf/prog_tests | |
parent | c571bd752e91602f092823b2f1ee685a74d2726c (diff) | |
download | linux-2341d6bb133d44caeba9fbdc851f8624739a84a2.tar.bz2 |
selftests/bpf: Test for btf_load command.
Improve selftest to check that btf_load is working from bpf program.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210514003623.28033-8-alexei.starovoitov@gmail.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/syscall.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/syscall.c b/tools/testing/selftests/bpf/prog_tests/syscall.c index 1badd37148a1..81e997a69f7a 100644 --- a/tools/testing/selftests/bpf/prog_tests/syscall.c +++ b/tools/testing/selftests/bpf/prog_tests/syscall.c @@ -9,6 +9,7 @@ struct args { int max_entries; int map_fd; int prog_fd; + int btf_fd; }; void test_syscall(void) @@ -49,4 +50,6 @@ cleanup: close(ctx.prog_fd); if (ctx.map_fd > 0) close(ctx.map_fd); + if (ctx.btf_fd > 0) + close(ctx.btf_fd); } |