On Tue, Mar 17, 2026 at 11:06:25AM +0800, Leon Hwang wrote:
SNIP
> > diff --git a/tools/testing/selftests/bpf/progs/tracing_multi_check.c
> > b/tools/testing/selftests/bpf/progs/tracing_multi_check.c
> > index 0e3248312dd5..e6047d5a078a 100644
> > --- a/tools/testing/selftests/bpf/progs/tracing_multi_check.c
> > +++ b/tools/testing/selftests/bpf/progs/tracing_multi_check.c
> > @@ -7,6 +7,7 @@
> > char _license[] SEC("license") = "GPL";
> >
> > int pid = 0;
> > +bool test_cookies = false;
> >
> > extern const void bpf_fentry_test1 __ksym;
> > extern const void bpf_fentry_test2 __ksym;
> > @@ -28,7 +29,7 @@ extern const void bpf_testmod_fentry_test11 __ksym;
> > void tracing_multi_arg_check(__u64 *ctx, __u64 *test_result, bool
> > is_return)
> > {
> > void *ip = (void *) bpf_get_func_ip(ctx);
> > - __u64 value = 0, ret = 0;
> > + __u64 value = 0, ret = 0, cookie = 0;
> > long err = 0;
> >
> > if (bpf_get_current_pid_tgid() >> 32 != pid)
> > @@ -36,6 +37,8 @@ void tracing_multi_arg_check(__u64 *ctx, __u64
> > *test_result, bool is_return)
> >
> > if (is_return)
> > err |= bpf_get_func_ret(ctx, &ret);
> > + if (test_cookies)
> > + cookie = test_cookies ? bpf_get_attach_cookie(ctx) : 0;
> ^ dup test_cookies check ? Can drop this one.
heh nice, yea, thanks
jirka