2 # SPDX-License-Identifier: GPL-2.0
4 export TESTNAME
=test_libbpf
6 # Determine selftest success via shell exit code
10 echo "selftests: $TESTNAME [PASS]";
12 echo "$TESTNAME: failed at file $LAST_LOADED" 1>&2
13 echo "selftests: $TESTNAME [FAILED]";
20 if [ -n "$VERBOSE" ]; then
23 .
/test_libbpf_open
--quiet $1
27 # Exit script immediately (well catched by trap handler) if any
28 # program/thing exits with a non-zero status.
31 # (Use 'trap -l' to list meaning of numbers)
32 trap exit_handler
0 2 3 6 9
34 libbpf_open_file test_l4lb.o
36 # Load a program with BPF-to-BPF calls
37 libbpf_open_file test_l4lb_noinline.o
39 # Load a program compiled without the "-target bpf" flag
40 libbpf_open_file test_xdp.o