tests: Verify that pfunct prints btf_decl_tags read from BTF
When using BTF as a source, pfunct should now be able to print
btf_decl_tags for programs like below:
#define __tag(x) __attribute__((btf_decl_tag(#x)))
__tag(a) __tag(b) void foo(void) {}
This situation arises after recent kernel changes, where tags 'kfunc'
and 'bpf_fastcall' are added to some functions. To avoid dependency on
a recent kernel version test this by compiling a small C program using
clang with --target=bpf, which would instruct clang to generate .BTF
section.
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Tested-by: Alan Maguire <alan.maguire@oracle.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Yonghong Song <yonghong.song@linux.dev>
Cc: kernel-team@fb.com
Link: https://lore.kernel.org/r/20241211021227.2341735-2-eddyz87@gmail.com
[ Add a message at the start of the test, like the other tests, instead of just printing "Ok", as suggested by Alan ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed