On 6/30/20 8:07 AM, Andrii Nakryiko wrote:
Add simple selftest validating byte swap built-ins and compile-time macros.

Signed-off-by: Andrii Nakryiko <andr...@fb.com>
---
  .../testing/selftests/bpf/prog_tests/endian.c | 53 +++++++++++++++++++
  .../testing/selftests/bpf/progs/test_endian.c | 37 +++++++++++++
  2 files changed, 90 insertions(+)
  create mode 100644 tools/testing/selftests/bpf/prog_tests/endian.c
  create mode 100644 tools/testing/selftests/bpf/progs/test_endian.c

This fails the build for me with:

[...]
  GEN-SKEL [test_progs] tailcall3.skel.h
  GEN-SKEL [test_progs] test_endian.skel.h
libbpf: invalid relo for 'const16' in special section 0xfff2; forgot to 
initialize global var?..
Error: failed to open BPF object file: 0
Makefile:372: recipe for target 
'/root/bpf-next/tools/testing/selftests/bpf/test_endian.skel.h' failed
make: *** [/root/bpf-next/tools/testing/selftests/bpf/test_endian.skel.h] Error 
255
make: *** Deleting file 
'/root/bpf-next/tools/testing/selftests/bpf/test_endian.skel.h'

Reply via email to