summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorMenglong Dong <menglong8.dong@gmail.com>2026-01-24 14:20:08 +0800
committerAlexei Starovoitov <ast@kernel.org>2026-01-24 18:49:37 -0800
commitcb4bfacfb0110aa1b10ab60c64a3df0e176998c5 (patch)
tree1054e8754219f3a4f0fbb4169ca9ef9c4056426c /tools/testing
parent8909b3fb23e245f8ade903dfcfcc43522cf28a56 (diff)
selftests/bpf: test fsession mixed with fentry and fexit
Test the fsession when it is used together with fentry, fexit. Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn> Link: https://lore.kernel.org/r/20260124062008.8657-14-dongml2@chinatelecom.cn Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/bpf/progs/fsession_test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/fsession_test.c b/tools/testing/selftests/bpf/progs/fsession_test.c
index 211332bdcccb..86e8a2fe467e 100644
--- a/tools/testing/selftests/bpf/progs/fsession_test.c
+++ b/tools/testing/selftests/bpf/progs/fsession_test.c
@@ -161,3 +161,19 @@ int BPF_PROG(test9, int a, int ret)
test9_exit_result = a == 1 && ret == 2 && *cookie == 0x123456ULL;
return 0;
}
+
+__u64 test10_result = 0;
+SEC("fexit/bpf_fentry_test1")
+int BPF_PROG(test10, int a, int ret)
+{
+ test10_result = a == 1 && ret == 2;
+ return 0;
+}
+
+__u64 test11_result = 0;
+SEC("fentry/bpf_fentry_test1")
+int BPF_PROG(test11, int a)
+{
+ test11_result = a == 1;
+ return 0;
+}