* [PATCH bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko
@ 2023-04-03 17:29 Ilya Leoshkevich
2023-04-03 21:24 ` Jiri Olsa
2023-04-04 23:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ilya Leoshkevich @ 2023-04-03 17:29 UTC (permalink / raw)
To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko
Cc: bpf, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Ilya Leoshkevich
bpf_testmod.ko sometimes fails to build from a clean checkout:
BTF [M] linux/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.ko
/bin/sh: 1: linux-build//tools/build/resolve_btfids/resolve_btfids: not found
The reason is that RESOLVE_BTFIDS may not yet be built. Fix by adding a
dependency.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
---
tools/testing/selftests/bpf/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 4a8ef118fd9d..febd1dae6c88 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -201,7 +201,7 @@ $(OUTPUT)/sign-file: ../../../../scripts/sign-file.c
$< -o $@ \
$(shell $(HOSTPKG_CONFIG) --libs libcrypto 2> /dev/null || echo -lcrypto)
-$(OUTPUT)/bpf_testmod.ko: $(VMLINUX_BTF) $(wildcard bpf_testmod/Makefile bpf_testmod/*.[ch])
+$(OUTPUT)/bpf_testmod.ko: $(VMLINUX_BTF) $(RESOLVE_BTFIDS) $(wildcard bpf_testmod/Makefile bpf_testmod/*.[ch])
$(call msg,MOD,,$@)
$(Q)$(RM) bpf_testmod/bpf_testmod.ko # force re-compilation
$(Q)$(MAKE) $(submake_extras) RESOLVE_BTFIDS=$(RESOLVE_BTFIDS) -C bpf_testmod
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko
2023-04-03 17:29 [PATCH bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko Ilya Leoshkevich
@ 2023-04-03 21:24 ` Jiri Olsa
2023-04-04 23:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Olsa @ 2023-04-03 21:24 UTC (permalink / raw)
To: Ilya Leoshkevich
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko, bpf,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev
On Mon, Apr 03, 2023 at 07:29:35PM +0200, Ilya Leoshkevich wrote:
> bpf_testmod.ko sometimes fails to build from a clean checkout:
>
> BTF [M] linux/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.ko
> /bin/sh: 1: linux-build//tools/build/resolve_btfids/resolve_btfids: not found
>
> The reason is that RESOLVE_BTFIDS may not yet be built. Fix by adding a
> dependency.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
jirka
> ---
> tools/testing/selftests/bpf/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
> index 4a8ef118fd9d..febd1dae6c88 100644
> --- a/tools/testing/selftests/bpf/Makefile
> +++ b/tools/testing/selftests/bpf/Makefile
> @@ -201,7 +201,7 @@ $(OUTPUT)/sign-file: ../../../../scripts/sign-file.c
> $< -o $@ \
> $(shell $(HOSTPKG_CONFIG) --libs libcrypto 2> /dev/null || echo -lcrypto)
>
> -$(OUTPUT)/bpf_testmod.ko: $(VMLINUX_BTF) $(wildcard bpf_testmod/Makefile bpf_testmod/*.[ch])
> +$(OUTPUT)/bpf_testmod.ko: $(VMLINUX_BTF) $(RESOLVE_BTFIDS) $(wildcard bpf_testmod/Makefile bpf_testmod/*.[ch])
> $(call msg,MOD,,$@)
> $(Q)$(RM) bpf_testmod/bpf_testmod.ko # force re-compilation
> $(Q)$(MAKE) $(submake_extras) RESOLVE_BTFIDS=$(RESOLVE_BTFIDS) -C bpf_testmod
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko
2023-04-03 17:29 [PATCH bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko Ilya Leoshkevich
2023-04-03 21:24 ` Jiri Olsa
@ 2023-04-04 23:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-04 23:20 UTC (permalink / raw)
To: Ilya Leoshkevich; +Cc: ast, daniel, andrii, bpf, hca, gor, agordeev
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:
On Mon, 3 Apr 2023 19:29:35 +0200 you wrote:
> bpf_testmod.ko sometimes fails to build from a clean checkout:
>
> BTF [M] linux/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.ko
> /bin/sh: 1: linux-build//tools/build/resolve_btfids/resolve_btfids: not found
>
> The reason is that RESOLVE_BTFIDS may not yet be built. Fix by adding a
> dependency.
>
> [...]
Here is the summary with links:
- [bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko
https://git.kernel.org/bpf/bpf-next/c/8fc59c26d212
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:[~2023-04-04 23:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-03 17:29 [PATCH bpf-next] selftests/bpf: Add RESOLVE_BTFIDS dependency to bpf_testmod.ko Ilya Leoshkevich
2023-04-03 21:24 ` Jiri Olsa
2023-04-04 23:20 ` 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;
as well as URLs for NNTP newsgroup(s).