All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Hwang <leon.hwang@linux.dev>
To: sashiko-reviews@lists.linux.dev
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next 09/13] selftests/bpf: Add tracing_multi bpf prog attach failure tests
Date: Wed, 12 Aug 2026 12:06:13 +0800	[thread overview]
Message-ID: <a40b43fc-66aa-4b1f-86e6-602a5f465a14@linux.dev> (raw)
In-Reply-To: <20260809151715.790681F000E9@smtp.kernel.org>

On 9/8/26 23:17, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Build failure due to undefined symbol `libbpf_find_prog_btf_id`.
> --
> 
> --- Patch [9]: [PATCH bpf-next 09/13] selftests/bpf: Add tracing_multi bpf prog attach failure tests ---
> commit c3b104cf9a90f8ddf11f23d2944ad76004fb3150
> Author: Leon Hwang <leon.hwang@linux.dev>
> 
> selftests/bpf: Add tracing_multi bpf prog attach failure tests
> 
> This patch adds tests for tracing_multi BPF program attach failures,
> covering both libbpf and kernel failure modes.
> 
>> diff --git a/tools/testing/selftests/bpf/prog_tests/tracing_multi.c b/tools/testing/selftests/bpf/prog_tests/tracing_multi.c
>> index 5ecb751af9be7..5cf11707eaf89 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/tracing_multi.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/tracing_multi.c
> [ ... ]
>> +	/* fail#4 (kernel) duplicate target through different fds */
>> +	token_fd = bpf_object__token_fd(skel->obj);
>> +	token_fd = token_fd < 0 ? 0 : token_fd;
>> +	target_id = libbpf_find_prog_btf_id("target_1", fds[0], token_fd);
> 
> [Severity: Low]
> Does this code compile successfully? libbpf_find_prog_btf_id is an
> internal static function in libbpf, so calling it directly from selftests
> seems like it would cause an implicit function declaration and undefined
> reference linker error during the build.
> 

Good catch.

libbpf_find_prog_btf_id() is exposed in the patch #11.

Will move the expose in this patch.

Thanks,
Leon

>> +	if (!ASSERT_GT(target_id, 0, "target_1_btf_id"))
>> +		goto cleanup;
>> +
>> +	dup_fd = dup(fds[0]);
>> +	if (!ASSERT_GE(dup_fd, 0, "dup_target_fd"))
>> +		goto cleanup;
> 


  reply	other threads:[~2026-08-12  4:06 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-09 15:00 [PATCH bpf-next 00/13] bpf: Add tracing_multi link support for bpf progs Leon Hwang
2026-08-09 15:00 ` [PATCH bpf-next 01/13] bpf: Initialize ftrace_managed in bpf_trampoline_get Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 02/13] bpf: Factor out update_fentry_multi helper Leon Hwang
2026-08-09 15:14   ` sashiko-bot
2026-08-12  4:02     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 03/13] bpf: Drop unnecessary ftrace_location() in update_fentry_multi() Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 04/13] bpf: Add tracing_multi link support for bpf progs Leon Hwang
2026-08-09 15:33   ` sashiko-bot
2026-08-12  4:03     ` Leon Hwang
2026-08-10 13:13   ` Jiri Olsa
2026-08-11  6:12     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 05/13] libbpf: " Leon Hwang
2026-08-09 15:21   ` sashiko-bot
2026-08-12  4:03     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 06/13] bpf: Add tracing_multi link fdinfo " Leon Hwang
2026-08-09 16:20   ` bot+bpf-ci
2026-08-12  4:04     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 07/13] bpf: Add tracing_multi link info " Leon Hwang
2026-08-09 15:17   ` sashiko-bot
2026-08-12  4:05     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 08/13] selftests/bpf: Add tracing_multi bpf prog attach test Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 09/13] selftests/bpf: Add tracing_multi bpf prog attach failure tests Leon Hwang
2026-08-09 15:17   ` sashiko-bot
2026-08-12  4:06     ` Leon Hwang [this message]
2026-08-09 15:01 ` [PATCH bpf-next 10/13] selftests/bpf: Add tracing_multi bpf prog cookie test Leon Hwang
2026-08-09 16:20   ` bot+bpf-ci
2026-08-12  4:06     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 11/13] selftests/bpf: Add tracing_multi bpf prog rollback test Leon Hwang
2026-08-09 15:21   ` sashiko-bot
2026-08-12  4:07     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 12/13] selftests/bpf: Add tracing_multi bpf prog link info test Leon Hwang
2026-08-09 15:29   ` sashiko-bot
2026-08-12  4:08     ` Leon Hwang
2026-08-09 15:01 ` [PATCH bpf-next 13/13] selftests/bpf: Test tailcall with fentry.multi Leon Hwang

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=a40b43fc-66aa-4b1f-86e6-602a5f465a14@linux.dev \
    --to=leon.hwang@linux.dev \
    --cc=bpf@vger.kernel.org \
    --cc=sashiko-reviews@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.