Skip to content

Commit 3bc35c6

Browse files
4astborkmann
authored andcommitted
selftests/bpf: add bpf_call test
strip always_inline from test_l4lb.c and compile it with -fno-inline to let verifier go through 11 function with various function arguments and return values Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 48cca7e commit 3bc35c6

File tree

3 files changed

+492
-6
lines changed

3 files changed

+492
-6
lines changed

tools/testing/selftests/bpf/Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test
1717

1818
TEST_GEN_FILES = test_pkt_access.o test_xdp.o test_l4lb.o test_tcp_estats.o test_obj_id.o \
1919
test_pkt_md_access.o test_xdp_redirect.o test_xdp_meta.o sockmap_parse_prog.o \
20-
sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o test_tracepoint.o
20+
sockmap_verdict_prog.o dev_cgroup.o sample_ret0.o test_tracepoint.o \
21+
test_l4lb_noinline.o
2122

2223
TEST_PROGS := test_kmod.sh test_xdp_redirect.sh test_xdp_meta.sh \
2324
test_offload.py
@@ -49,8 +50,12 @@ else
4950
CPU ?= generic
5051
endif
5152

53+
CLANG_FLAGS = -I. -I./include/uapi -I../../../include/uapi \
54+
-Wno-compare-distinct-pointer-types
55+
56+
$(OUTPUT)/test_l4lb_noinline.o: CLANG_FLAGS += -fno-inline
57+
5258
%.o: %.c
53-
$(CLANG) -I. -I./include/uapi -I../../../include/uapi \
54-
-Wno-compare-distinct-pointer-types \
59+
$(CLANG) $(CLANG_FLAGS) \
5560
-O2 -target bpf -emit-llvm -c $< -o - | \
5661
$(LLC) -march=bpf -mcpu=$(CPU) -filetype=obj -o $@

0 commit comments

Comments
 (0)