summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <memxor@gmail.com>2026-08-12 21:38:41 +0200
committerEduard Zingerman <eddyz87@gmail.com>2026-08-12 18:28:49 -0700
commitd7842e98ca172b30e15fb498a63af103ecedefab (patch)
treefde292e808d70c97e7da18f4e61b8e5acc669ca1 /tools/testing/selftests/bpf/progs
parent5e31d32843d3ad4b349ea99e534662713687e810 (diff)
downloadlinux-next-d7842e98ca172b30e15fb498a63af103ecedefab.tar.gz
linux-next-d7842e98ca172b30e15fb498a63af103ecedefab.zip
selftests/bpf: Test resolve_btfids arena argument suffixes
Add a suffix-only kfunc declaration with arena annotations on all five arguments. Verify that resolve_btfids emits address_space(1) type tags for every position without KF_ARENA_ARG flags in the BTF ID sets. Represent expected arena arguments as a per-parameter bitmap so the test covers suffixes beyond the two positions expressible by flags. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> Link: https://patch.msgid.link/20260812193842.2879226-3-memxor@gmail.com Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Diffstat (limited to 'tools/testing/selftests/bpf/progs')
-rw-r--r--tools/testing/selftests/bpf/progs/btf_data.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/btf_data.c b/tools/testing/selftests/bpf/progs/btf_data.c
index ec34f7a6e038..8082c13490ab 100644
--- a/tools/testing/selftests/bpf/progs/btf_data.c
+++ b/tools/testing/selftests/bpf/progs/btf_data.c
@@ -68,3 +68,23 @@ int kfunc_d(struct root_struct *a, struct root_struct *b)
{
return 0;
}
+
+int kfunc_e(struct root_struct *a__arena,
+ struct root_struct *b__arena__nullable,
+ struct root_struct *c__arena,
+ struct root_struct *d__arena__nullable,
+ struct root_struct *e__arena)
+{
+ return 0;
+}
+
+int kfunc_f(struct root_struct *a, struct root_struct *b__arena, int flags)
+{
+ return 0;
+}
+
+struct root_struct *kfunc_g(struct root_struct *a__arena,
+ struct root_struct *b__arena__nullable)
+{
+ return a__arena;
+}