* [PATCH] docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures
@ 2026-07-06 15:28 Ricardo B. Marlière
2026-07-06 18:38 ` Emil Tsalapatis
2026-07-06 22:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo B. Marlière @ 2026-07-06 15:28 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Eduard Zingerman, Kumar Kartikeya Dwivedi, Martin KaFai Lau,
Song Liu, Yonghong Song, Jiri Olsa, Emil Tsalapatis,
Jonathan Corbet, Shuah Khan
Cc: bpf, linux-doc, linux-kernel, Ricardo B. Marlière
When the kernel config does not fully match the BPF selftest config
fragment, some tests may fail to compile. BPF_STRICT_BUILD (defaulting to
1) makes any such failure fatal. Mention the option so that developers are
aware they can set it to 0 to skip broken tests and keep the build going,
which is particularly useful during bringup or when testing on constrained
(e.g. distribution) configurations.
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
Documentation/bpf/bpf_devel_QA.rst | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/bpf/bpf_devel_QA.rst b/Documentation/bpf/bpf_devel_QA.rst
index 45bc5c5cd793..edf8107a7beb 100644
--- a/Documentation/bpf/bpf_devel_QA.rst
+++ b/Documentation/bpf/bpf_devel_QA.rst
@@ -479,7 +479,10 @@ for details.
To maximize the number of tests passing, the .config of the kernel
under test should match the config file fragment in
-tools/testing/selftests/bpf as closely as possible.
+tools/testing/selftests/bpf as closely as possible. If not possible,
+however, you can set ``BPF_STRICT_BUILD=0`` when invoking ``make``
+to tolerate individual compilation failures and continue building
+the remaining tests rather than treating each failure as fatal.
Finally to ensure support for latest BPF Type Format features -
discussed in Documentation/bpf/btf.rst - pahole version 1.16
---
base-commit: 8cdeaa50eae8dad34885515f62559ee83e7e8dda
change-id: 20260706-b4-bpf_strict_build_docs-a8aa7fa46e2f
Best regards,
--
Ricardo B. Marlière <rbm@suse.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures
2026-07-06 15:28 [PATCH] docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures Ricardo B. Marlière
@ 2026-07-06 18:38 ` Emil Tsalapatis
2026-07-06 22:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Emil Tsalapatis @ 2026-07-06 18:38 UTC (permalink / raw)
To: Ricardo B. Marlière, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Eduard Zingerman, Kumar Kartikeya Dwivedi,
Martin KaFai Lau, Song Liu, Yonghong Song, Jiri Olsa,
Emil Tsalapatis, Jonathan Corbet, Shuah Khan
Cc: bpf, linux-doc, linux-kernel
On Mon Jul 6, 2026 at 11:28 AM EDT, Ricardo B. Marlière wrote:
> When the kernel config does not fully match the BPF selftest config
> fragment, some tests may fail to compile. BPF_STRICT_BUILD (defaulting to
> 1) makes any such failure fatal. Mention the option so that developers are
> aware they can set it to 0 to skip broken tests and keep the build going,
> which is particularly useful during bringup or when testing on constrained
> (e.g. distribution) configurations.
>
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> Documentation/bpf/bpf_devel_QA.rst | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/bpf/bpf_devel_QA.rst b/Documentation/bpf/bpf_devel_QA.rst
> index 45bc5c5cd793..edf8107a7beb 100644
> --- a/Documentation/bpf/bpf_devel_QA.rst
> +++ b/Documentation/bpf/bpf_devel_QA.rst
> @@ -479,7 +479,10 @@ for details.
>
> To maximize the number of tests passing, the .config of the kernel
> under test should match the config file fragment in
> -tools/testing/selftests/bpf as closely as possible.
> +tools/testing/selftests/bpf as closely as possible. If not possible,
> +however, you can set ``BPF_STRICT_BUILD=0`` when invoking ``make``
> +to tolerate individual compilation failures and continue building
> +the remaining tests rather than treating each failure as fatal.
>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
Nit: You could add the caveat that anything in TRUNNER_EXTRA_SOURCES is
not covered, but it's pretty minor.
> Finally to ensure support for latest BPF Type Format features -
> discussed in Documentation/bpf/btf.rst - pahole version 1.16
>
> ---
> base-commit: 8cdeaa50eae8dad34885515f62559ee83e7e8dda
> change-id: 20260706-b4-bpf_strict_build_docs-a8aa7fa46e2f
>
> Best regards,
> --
> Ricardo B. Marlière <rbm@suse.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures
2026-07-06 15:28 [PATCH] docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures Ricardo B. Marlière
2026-07-06 18:38 ` Emil Tsalapatis
@ 2026-07-06 22:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-07-06 22:30 UTC (permalink / raw)
To: =?utf-8?b?UmljYXJkbyBCLiBNYXJsacOocmUgPHJibUBzdXNlLmNvbT4=?=
Cc: ast, daniel, andrii, eddyz87, memxor, martin.lau, song,
yonghong.song, jolsa, emil, corbet, skhan, bpf, linux-doc,
linux-kernel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Kumar Kartikeya Dwivedi <memxor@gmail.com>:
On Mon, 06 Jul 2026 12:28:43 -0300 you wrote:
> When the kernel config does not fully match the BPF selftest config
> fragment, some tests may fail to compile. BPF_STRICT_BUILD (defaulting to
> 1) makes any such failure fatal. Mention the option so that developers are
> aware they can set it to 0 to skip broken tests and keep the build going,
> which is particularly useful during bringup or when testing on constrained
> (e.g. distribution) configurations.
>
> [...]
Here is the summary with links:
- docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures
https://git.kernel.org/bpf/bpf-next/c/575d4e50192d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-06 22:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 15:28 [PATCH] docs/bpf: Document BPF_STRICT_BUILD=0 to tolerate test build failures Ricardo B. Marlière
2026-07-06 18:38 ` Emil Tsalapatis
2026-07-06 22:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox