Thread (14 messages) flat view 14 messages, 5 authors, 2019-09-25

Re: Linux 5.4 - bpf test build fails

From: Cristian Marussi <cristian.marussi@arm.com>
Date: 2019-09-24 15:53:01
Also in: bpf, linux-kselftest

Hi Shuah

On 24/09/2019 16:26, Shuah Khan wrote:
Hi Alexei and Daniel,

bpf test doesn't build on Linux 5.4 mainline. Do you know what's
happening here.


make -C tools/testing/selftests/bpf/
side question, since I'm writing arm64/ tests.

my "build-testcases" following the KSFT docs are:

make kselftest
make TARGETS=arm64 kselftest
make -C tools/testing/selftests/ 
make -C tools/testing/selftests/ INSTALL_PATH=<install-path> install
make TARGETS=arm64 -C tools/testing/selftests/ 
make TARGETS=arm64 -C tools/testing/selftests/ INSTALL_PATH=<install-path> install
./kselftest_install.sh <install-path>

(and related clean targets...)

but definitely NOT

make -C tools/testing/selftests/arm64

(for simplicity....due to the subdirs structure under tools/testing/selftests/arm64/)

am I wrong ?

Thanks

Cristian
-c progs/test_core_reloc_ptr_as_arr.c -o - || echo "clang failed") | \
llc -march=bpf -mcpu=generic  -filetype=obj -o 
/mnt/data/lkml/linux_5.4/tools/testing/selftests/bpf/test_core_reloc_ptr_as_arr.o
progs/test_core_reloc_ptr_as_arr.c:25:6: error: use of unknown builtin
       '__builtin_preserve_access_index' [-Wimplicit-function-declaration]
         if (BPF_CORE_READ(&out->a, &in[2].a))
             ^
./bpf_helpers.h:533:10: note: expanded from macro 'BPF_CORE_READ'
                        __builtin_preserve_access_index(src))
                        ^
progs/test_core_reloc_ptr_as_arr.c:25:6: warning: incompatible integer to
       pointer conversion passing 'int' to parameter of type 'const void *'
       [-Wint-conversion]
         if (BPF_CORE_READ(&out->a, &in[2].a))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./bpf_helpers.h:533:10: note: expanded from macro 'BPF_CORE_READ'
                        __builtin_preserve_access_index(src))
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
llc: error: llc: <stdin>:1:1: error: expected top-level entity
clang failed

Also

make TARGETS=bpf kselftest fails as well. Dependency between
tools/lib/bpf and the test. How can we avoid this type of
dependency or resolve it in a way it doesn't result in build
failures?

thanks,
-- Shuah
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help