public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <olsajiri@gmail.com>
To: Sun Jian <sun.jian.kdev@gmail.com>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Shuah Khan <shuah@kernel.org>,
	Eduard Zingerman <eddyz87@gmail.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	bpf@vger.kernel.org, linux-kselftest@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] selftests/bpf: bpf_cookie: skip kprobe_multi tests without bpf_testmod
Date: Mon, 2 Mar 2026 11:02:36 +0100	[thread overview]
Message-ID: <aaVgPM5quBz-H3Yb@krava> (raw)
In-Reply-To: <20260228074555.122950-2-sun.jian.kdev@gmail.com>

On Sat, Feb 28, 2026 at 03:45:54PM +0800, Sun Jian wrote:
> The kprobe_multi subtests rely on bpf_testmod fentry ksyms.
> 
> When bpf_testmod isn't available, libbpf fails to resolve
> bpf_testmod_fentry_test* and skeleton load fails with -ESRCH, causing
> false failures.
> 
> Skip these subtests when env.has_testmod is false.
> 
> Signed-off-by: Sun Jian <sun.jian.kdev@gmail.com>

please include bpf-next in the subject, other than that:

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> 
> ---
> Changes in v2:
> 
> No functional change.
> 
> Drop the unrelated perf_event_open() argument change from this patch
> (moved to patch 2/2).
> 
> v1: <https://lore.kernel.org/lkml/20260227164037.84110-1-sun.jian.kdev@gmail.com/>
> ---
>  tools/testing/selftests/bpf/prog_tests/bpf_cookie.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c b/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
> index 75f4dff7d042..b7643a5bf7ad 100644
> --- a/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
> +++ b/tools/testing/selftests/bpf/prog_tests/bpf_cookie.c
> @@ -105,6 +105,11 @@ static void kprobe_multi_link_api_subtest(void)
>  	unsigned long long addrs[8];
>  	__u64 cookies[8];
>  
> +	if (!env.has_testmod) {
> +		test__skip();
> +		return;
> +	}
> +
>  	if (!ASSERT_OK(load_kallsyms(), "load_kallsyms"))
>  		goto cleanup;
>  
> @@ -192,6 +197,11 @@ static void kprobe_multi_attach_api_subtest(void)
>  	};
>  	__u64 cookies[8];
>  
> +	if (!env.has_testmod) {
> +		test__skip();
> +		return;
> +	}
> +
>  	skel = kprobe_multi__open_and_load();
>  	if (!ASSERT_OK_PTR(skel, "fentry_raw_skel_load"))
>  		goto cleanup;
> -- 
> 2.43.0
> 
> 

  reply	other threads:[~2026-03-02 10:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-28  7:45 [PATCH v2 0/2] selftests/bpf: fix bpf_cookie failures Sun Jian
2026-02-28  7:45 ` [PATCH v2 1/2] selftests/bpf: bpf_cookie: skip kprobe_multi tests without bpf_testmod Sun Jian
2026-03-02 10:02   ` Jiri Olsa [this message]
2026-02-28  7:45 ` [PATCH v2 2/2] selftests/bpf: bpf_cookie: make perf_event subtest trigger reliably Sun Jian
2026-03-02 10:02   ` Jiri Olsa
2026-03-03  2:15     ` sun jian
2026-03-03 21:32       ` Jiri Olsa
2026-03-05 23:10 ` [PATCH v2 0/2] selftests/bpf: fix bpf_cookie failures patchwork-bot+netdevbpf

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=aaVgPM5quBz-H3Yb@krava \
    --to=olsajiri@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=sun.jian.kdev@gmail.com \
    /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