[PATCH bpf-next v2 03/10] selftests/bpf: Disable feature-llvm for vmtest

Eduard Zingerman eddyz87 at gmail.com
Wed Sep 4 16:08:08 PDT 2024


On Wed, 2024-09-04 at 12:37 -0700, Eduard Zingerman wrote:
> On Wed, 2024-09-04 at 14:19 +0000, Pu Lehui wrote:
> > From: Pu Lehui <pulehui at huawei.com>
> > 
> > After commit b991fc520700 ("selftests/bpf: utility function to get
> > program disassembly after jit"), Makefile will link libLLVM* related
> > libraries to the user binary execution file when detecting that
> > feature-llvm is enabled, which will cause the local vmtest to appear as
> > follows mistake:
> > 
> >   ./test_progs: error while loading shared libraries: libLLVM-17.so.1:
> >     cannot open shared object file: No such file or directory
> > 
> > Considering that the get_jited_program_text() function is a useful tool
> > for user debugging and will not be relied upon by the entire bpf
> > selftests, let's turn it off in local vmtest.
> > 
> > Signed-off-by: Pu Lehui <pulehui at huawei.com>
> > ---
> 
> I actually don't agree.
> The __jited tag is supposed to be used by selftests
> (granted, used by a single selftest for now).
> Maybe add an option to forgo LLVM linkage when test_progs are compiled?
> Regarding base image lacking libLLVM -- I need to fix this.
> 

Please consider using my commit [1] instead of this patch, it forces
static linking form LLVM libraries, thus avoiding issues with rootfs.
(This was suggested by Andrii off list).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ez/bpf-next.git/commit/?h=selftest-llvm-static-linking&id=263bacf2f20fbc17204fd912609e26bdf6ac5a13




More information about the linux-riscv mailing list