From: Jiri Olsa <olsajiri@gmail.com>
To: bot+bpf-ci@kernel.org
Cc: mhiramat@kernel.org, rostedt@goodmis.org, jpoimboe@kernel.org,
peterz@infradead.org, bpf@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, x86@kernel.org, yhs@fb.com,
songliubraving@fb.com, andrii@kernel.org, ast@kernel.org,
daniel@iogearbox.net, martin.lau@kernel.org, eddyz87@gmail.com,
yonghong.song@linux.dev, clm@meta.com, ihor.solodrai@linux.dev
Subject: Re: [PATCHv2 4/4] selftests/bpf: Add stacktrace ips test for raw_tp
Date: Tue, 4 Nov 2025 09:35:41 +0100 [thread overview]
Message-ID: <aQm63ZvtqzEWvRfE@krava> (raw)
In-Reply-To: <0fc522195058f867d14c8a652b6b698d03751d0d179fcffdf20a44bf4293039a@mail.kernel.org>
On Mon, Nov 03, 2025 at 11:47:36PM +0000, bot+bpf-ci@kernel.org wrote:
> > diff --git a/tools/testing/selftests/bpf/prog_tests/stacktrace_ips.c b/tools/testing/selftests/bpf/prog_tests/stacktrace_ips.c
> > index 6fca459ba..282a068d2 100644
> > --- a/tools/testing/selftests/bpf/prog_tests/stacktrace_ips.c
> > +++ b/tools/testing/selftests/bpf/prog_tests/stacktrace_ips.c
> > @@ -84,12 +84,58 @@ static void test_stacktrace_ips_kprobe_multi(bool retprobe)
> > stacktrace_ips__destroy(skel);
> > }
> >
> > +static void test_stacktrace_ips_raw_tp(void)
> > +{
>
> [ ... ]
>
> > + /* get bpf program address */
> > + info.jited_ksyms = ptr_to_u64(&bpf_prog_ksym);
> > + info.nr_jited_ksyms = 1;
> > + err = bpf_prog_get_info_by_fd(bpf_program__fd(skel->progs.rawtp_test),
> > + &info, &info_len);
> > + if (ASSERT_OK(err, "bpf_prog_get_info_by_fd"))
> > + goto cleanup;
> ^^^^^^^^^^^^^^
>
> Is the error check inverted in test_stacktrace_ips_raw_tp()?
ugh, it is.. will fix it in next version
thanks,
jirka
>
> The ASSERT_OK macro returns true when err == 0 (success), so the code
> jumps to cleanup on success and continues on failure. Comparing with
> test_stacktrace_ips_kprobe_multi() at line 70, the pattern should be:
>
> if (!ASSERT_OK_PTR(...))
> goto cleanup;
>
> With the current code, bpf_prog_get_info_by_fd() success skips the test
> (trigger_module_test_read and check_stacktrace_ips), while failure
> continues with invalid bpf_prog_ksym data.
>
> > +
> > + trigger_module_test_read(1);
> > +
> > + load_kallsyms();
> > +
> > + check_stacktrace_ips(bpf_map__fd(skel->maps.stackmap), skel->bss->stack_key, 2,
> > + bpf_prog_ksym,
> > + ksym_get_addr("bpf_trace_run2"));
> > +
> > +cleanup:
> > + stacktrace_ips__destroy(skel);
> > +}
> > +
>
> [ ... ]
>
>
> ---
> AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
> See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md
>
> CI run summary: https://github.com/kernel-patches/bpf/actions/runs/19051288274
prev parent reply other threads:[~2025-11-04 8:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 22:09 [PATCHv2 0/4] x86/fgraph,bpf: Fix ORC stack unwind from return probe Jiri Olsa
2025-11-03 22:09 ` [PATCHv2 1/4] Revert "perf/x86: Always store regs->ip in perf_callchain_kernel()" Jiri Olsa
2025-11-06 12:27 ` Peter Zijlstra
2025-11-03 22:09 ` [PATCHv2 2/4] x86/fgraph,bpf: Fix stack ORC unwind from kprobe_multi return probe Jiri Olsa
2025-11-03 23:47 ` bot+bpf-ci
2025-11-04 9:27 ` Jiri Olsa
2025-11-06 12:29 ` Peter Zijlstra
2025-11-07 22:22 ` Alexei Starovoitov
2025-11-03 22:09 ` [PATCHv2 3/4] selftests/bpf: Add stacktrace ips test for kprobe_multi/kretprobe_multi Jiri Olsa
2025-11-03 22:09 ` [PATCHv2 4/4] selftests/bpf: Add stacktrace ips test for raw_tp Jiri Olsa
2025-11-03 23:47 ` bot+bpf-ci
2025-11-04 8:35 ` Jiri Olsa [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aQm63ZvtqzEWvRfE@krava \
--to=olsajiri@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=jpoimboe@kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=martin.lau@kernel.org \
--cc=mhiramat@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=songliubraving@fb.com \
--cc=x86@kernel.org \
--cc=yhs@fb.com \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox