When our bpf_selftests are re-built, this error occurs:
make[1]: *** No rule to make target 'atomics.lskel.h',
needed by '.../atomics.test.o'. Stop.
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory 'tools/testing/selftests/bpf'
make: *** [Makefile:259: install] Error 2
make: Leaving directory 'tools/testing/selftests'
In this case, I had to remove the cache directory .virtme and recompile it
again. This was very time-consuming.
A workaround patch for this is found in [1]. I don't know why this patch
has not been upstreamed, but it's in BPF CI environment. I think it's
necessary to synchronize this modification to MPTCP CI environment as well.
[1]
https://lore.kernel.org/bpf/Q3BN2kW9Kgy6LkrDOwnyY4Pv7_YF8fInLCd2_QA3LimKYM3wD64kRdnwp7blwG2dI_s7UGnfUae-4_dOmuTrxpYCi32G_KTzB3PfmxIerH8=@pm.me/T/
Signed-off-by: Geliang Tang <geliang@kernel.org>
---
tools/testing/selftests/bpf/Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile
index 9ec53c858d8d..64388a2fe5a0 100644
--- a/tools/testing/selftests/bpf/Makefile
+++ b/tools/testing/selftests/bpf/Makefile
@@ -652,6 +652,12 @@ $(TRUNNER_BPF_SKELS_LINKED): $(TRUNNER_OUTPUT)/%: $$$$(%-deps) $(BPFTOOL) | $(TR
$(notdir %.skel.h): $(TRUNNER_OUTPUT)/%.skel.h
@true
+$(notdir %.lskel.h): $(TRUNNER_OUTPUT)/%.lskel.h
+ @true
+
+$(notdir %.subskel.h): $(TRUNNER_OUTPUT)/%.subskel.h
+ @true
+
endif
# ensure we set up tests.h header generation rule just once
--
2.45.2
Hi Geliang, On 04/11/2024 09:28, Geliang Tang wrote: > When our bpf_selftests are re-built, this error occurs: > > make[1]: *** No rule to make target 'atomics.lskel.h', > needed by '.../atomics.test.o'. Stop. > make[1]: *** Waiting for unfinished jobs.... > make[1]: Leaving directory 'tools/testing/selftests/bpf' > make: *** [Makefile:259: install] Error 2 > make: Leaving directory 'tools/testing/selftests' Ah yes, I already noticed that when checking some stuffs, but I didn't investigate. Thank you for having looked at this! > In this case, I had to remove the cache directory .virtme and recompile it > again. This was very time-consuming. You don't need to remove the whole ".virtme" directory, you can remove ".virtme/build*" instead, so you still have CCache (from ".virtme/ccache*"). > A workaround patch for this is found in [1]. I don't know why this patch > has not been upstreamed, but it's in BPF CI environment. I think it's > necessary to synchronize this modification to MPTCP CI environment as well. It looks like another version has been applied in bpf-next, even if it is a fix: https://lore.kernel.org/bpf/20240916195919.1872371-2-ihor.solodrai@pm.me/ Do you mind checking it please? If it works, I can backport it to our tree, and ask BPF maintainers if they can add these two patches in 'bpf' (fix) instead, because this issue is present in v6.12, but only fixed in next (v6.13). Cheers, Matt -- Sponsored by the NGI0 Core fund.
On 04/11/2024 12:58, Matthieu Baerts wrote: > Hi Geliang, > > On 04/11/2024 09:28, Geliang Tang wrote: >> When our bpf_selftests are re-built, this error occurs: >> >> make[1]: *** No rule to make target 'atomics.lskel.h', >> needed by '.../atomics.test.o'. Stop. >> make[1]: *** Waiting for unfinished jobs.... >> make[1]: Leaving directory 'tools/testing/selftests/bpf' >> make: *** [Makefile:259: install] Error 2 >> make: Leaving directory 'tools/testing/selftests' > > Ah yes, I already noticed that when checking some stuffs, but I didn't > investigate. Thank you for having looked at this! > >> In this case, I had to remove the cache directory .virtme and recompile it >> again. This was very time-consuming. > > You don't need to remove the whole ".virtme" directory, you can remove > ".virtme/build*" instead, so you still have CCache (from ".virtme/ccache*"). > >> A workaround patch for this is found in [1]. I don't know why this patch >> has not been upstreamed, but it's in BPF CI environment. I think it's >> necessary to synchronize this modification to MPTCP CI environment as well. > > It looks like another version has been applied in bpf-next, even if it > is a fix: > > https://lore.kernel.org/bpf/20240916195919.1872371-2-ihor.solodrai@pm.me/ > > Do you mind checking it please? Just in case, their bpf-next/master branch has been rewritten in between. The last ref I have is: fd4a0e67838c ("selftests/bpf: Set vpath in Makefile to search for skels") > If it works, I can backport it to our tree, and ask BPF maintainers if > they can add these two patches in 'bpf' (fix) instead, because this > issue is present in v6.12, but only fixed in next (v6.13). > > Cheers, > Matt Cheers, Matt -- Sponsored by the NGI0 Core fund.
Hi Matt, On Mon, 2024-11-04 at 13:07 +0100, Matthieu Baerts wrote: > On 04/11/2024 12:58, Matthieu Baerts wrote: > > Hi Geliang, > > > > On 04/11/2024 09:28, Geliang Tang wrote: > > > When our bpf_selftests are re-built, this error occurs: > > > > > > make[1]: *** No rule to make target 'atomics.lskel.h', > > > needed by '.../atomics.test.o'. Stop. > > > make[1]: *** Waiting for unfinished jobs.... > > > make[1]: Leaving directory 'tools/testing/selftests/bpf' > > > make: *** [Makefile:259: install] Error 2 > > > make: Leaving directory 'tools/testing/selftests' > > > > Ah yes, I already noticed that when checking some stuffs, but I > > didn't > > investigate. Thank you for having looked at this! > > > > > In this case, I had to remove the cache directory .virtme and > > > recompile it > > > again. This was very time-consuming. > > > > You don't need to remove the whole ".virtme" directory, you can > > remove > > ".virtme/build*" instead, so you still have CCache (from > > ".virtme/ccache*"). > > > > > A workaround patch for this is found in [1]. I don't know why > > > this patch > > > has not been upstreamed, but it's in BPF CI environment. I think > > > it's > > > necessary to synchronize this modification to MPTCP CI > > > environment as well. > > > > It looks like another version has been applied in bpf-next, even if > > it > > is a fix: > > > > > > https://lore.kernel.org/bpf/20240916195919.1872371-2-ihor.solodrai@pm.me/ > > > > Do you mind checking it please? > > Just in case, their bpf-next/master branch has been rewritten in > between. The last ref I have is: > > fd4a0e67838c ("selftests/bpf: Set vpath in Makefile to search for > skels") > > > If it works, I can backport it to our tree, and ask BPF maintainers It works. And "selftests/bpf: Set vpath in Makefile to search for skels" is in our tree now. So no need to apply this squash-to patch anymore. I changed this squash-to patch as "Rejected" in patchwork. Thanks, -Geliang > > if > > they can add these two patches in 'bpf' (fix) instead, because this > > issue is present in v6.12, but only fixed in next (v6.13). > > > > Cheers, > > Matt > > Cheers, > Matt
© 2016 - 2024 Red Hat, Inc.