Conversation
|
Hi @matttbe , sorry for the last update here. If you still think this is needed, would you mind rebasing so it just integration tests (which were not enabled at the time you created this PR). |
In a recent series [1], I suggested to use KHDR_INCLUDES variable to avoid having to duplicate UAPI header files. The BPF CI builds the kernel in a separated directory -- KBUILD_OUTPUT variable is set and exported -- and the BPF selftests are executed directly, from the selftests/bpf directory, not from its parent. In thi s case, it is required to override KHDR_INCLUDES to look at the build directory, and not the kernel source, in 'usr/include'. Note that tools/testing/selftests/Makefile supports KBUILD_OUTPUT, but this Makefile is not used by the BPF CI: it directly uses the one from the bpf directory: tools/testing/selftests/bpf/Makefile. That's fine, KHDR_INCLUDES can be overridden, that should then fix the build issue seen in [1]. Also, this KHDR_INCLUDES variable is not used by the BPF selftests before my series [1]. It is then fine to merge this modification before applying my modifications. Link: https://lore.kernel.org/bpf/20240816-ups-bpf-next-selftests-use-khdr-v1-0-1e19f3d5b17a@kernel.org/ [1] Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
a74ab20 to
781957b
Compare
|
Hi @chantra, thank you for your reply.
These two patches have indeed been rejected, but I think this modification is still needed: Alexei didn't want to modify the existing selftests, but, from what I understood, he was open to add A bit of context: for the moment, if a recent UAPI header files is needed for a new BPF selftest, the header file needs to be duplicated in Note that I sent the kernel patches I mentioned in the PR description because some new tests depended on a new UAPI header file. Because I could not duplicate this header file, and because the BPF CI didn't set |
In a recent series [1], I suggested to use
KHDR_INCLUDESvariable to avoid having to duplicate UAPI header files.The BPF CI builds the kernel in a separated directory --
KBUILD_OUTPUTvariable is set and exported -- and the BPF selftests are executed directly, from the selftests/bpf directory, not from its parent with theTARGETSparameter. In this case, it is required to overrideKHDR_INCLUDESto look at the build directory, and not the kernel source, inusr/include.Note that
tools/testing/selftests/MakefilesupportsKBUILD_OUTPUT, but this Makefile is not used by the BPF CI: it directly uses the one from the bpf directory:tools/testing/selftests/bpf/Makefile. That's fine,KHDR_INCLUDEScan be overridden, that should then fix the build issue seen in [1].Also, this
KHDR_INCLUDESvariable is not used by the BPF selftests before my series [1]. It is then fine to merge this modification before applying my modifications.Link: https://lore.kernel.org/bpf/20240816-ups-bpf-next-selftests-use-khdr-v1-0-1e19f3d5b17a@kernel.org/ [1]
Note that I validated this modification only manually, I didn't try to deploy the CI infrastructure on my side. When applying the same commands as the ones from this script, I can reproduce the issue reported by the CI. Not after having set
KHDR_INCLUDES.