You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lib/tests/update-llvm.sh: update minimum clang version of building bpf selftest
> BTW, I failed to compile the latest selftests/bpf with
> the following errors:
>
> progs/verifier_and.c:58:16: error: invalid operand for instruction
> asm volatile (" \
>
These tests were moved to use inline assembly recently (2 month ago).
Discussion at the time was whether to use \n\ or \ terminators at the
end of each line. People opted for \ as easier to read.
Replacing \ with \n\ and compiling this test using clang 14 shows
more informative error message:
$ make -j14 `pwd`/verifier_and.bpf.o
CLNG-BPF [test_maps] verifier_and.bpf.o
progs/verifier_and.c:68:1: error: invalid operand for instruction
w1 %%= 2; \n\
^
<inline asm>:11:5: note: instantiated into assembly here
w1 %= 2;
My guess is that clang 14 does not know how to handle operations on
32-bit sub-registers w[0-9].
But using clang 14 I get some errors not related to inline assembly as well.
Also, I recall that there were runtime issues with clang 14 and
tests using enum64.
All-in-all, you need newer version of clang for tests nowadays,
sorry for inconvenience.
Link: https://lore.kernel.org/netdev/[email protected]/
Signed-off-by: Yujie Liu <[email protected]>
Signed-off-by: Philip Li <[email protected]>
0 commit comments