Skip to content
Open

B4/xsk #9842

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
127458b
selftests/bpf: Integrate test_xsk.c to test_progs framework
bastien-curutchet Feb 18, 2025
2eba586
selftests/bpf: test_xsk: Split xskxceiver
bastien-curutchet Mar 18, 2025
7a1c01b
selftests/bpf: test_xsk: Initialize bitmap before use
bastien-curutchet Sep 24, 2025
7816468
selftests/bpf: test_xsk: Fix __testapp_validate_traffic()'s return value
bastien-curutchet Sep 23, 2025
b3d1a3e
selftests/bpf: test_xsk: fix memory leak in testapp_stats_rx_dropped()
bastien-curutchet Sep 24, 2025
fd1cc6d
selftests/bpf: test_xsk: fix memory leak in testapp_xdp_shared_umem()
bastien-curutchet Sep 24, 2025
7971e56
selftests/bpf: test_xsk: Wrap test clean-up in functions
bastien-curutchet Mar 19, 2025
3ecadf9
selftests/bpf: test_xsk: Release resources when swap fails
bastien-curutchet Mar 19, 2025
2a2c771
selftests/bpf: test_xsk: Add return value to init_iface()
bastien-curutchet Mar 18, 2025
63a35cb
selftests/bpf: test_xsk: Don't exit immediately when xsk_attach fails
bastien-curutchet Mar 18, 2025
7fae39f
selftests/bpf: test_xsk: Don't exit immediately when gettimeofday fails
bastien-curutchet Mar 18, 2025
88997e3
selftests/bpf: test_xsk: Don't exit immediately when workers fail
bastien-curutchet Mar 19, 2025
a80be63
selftests/bpf: test_xsk: Don't exit immediately if validate_traffic f…
bastien-curutchet Mar 5, 2025
949bc3d
selftests/bpf: test_xsk: Don't exit immediately on allocation failures
bastien-curutchet Sep 2, 2025
da5229c
selftests/bpf: test_xsk: Isolate flaky tests
bastien-curutchet Mar 4, 2025
ce5c6b8
selftests/bpf: test_xsk: Integrate test_xsk.c to test_progs framework
bastien-curutchet Feb 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,8 @@ TRUNNER_TEST_OBJS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.test.o, \
$$(notdir $$(wildcard $(TRUNNER_TESTS_DIR)/*.c)))
TRUNNER_EXTRA_OBJS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.o, \
$$(filter %.c,$(TRUNNER_EXTRA_SOURCES)))
TRUNNER_LIB_OBJS := $$(patsubst %.c,$$(TRUNNER_OUTPUT)/%.o, \
$$(filter %.c,$(TRUNNER_LIB_SOURCES)))
TRUNNER_EXTRA_HDRS := $$(filter %.h,$(TRUNNER_EXTRA_SOURCES))
TRUNNER_TESTS_HDR := $(TRUNNER_TESTS_DIR)/tests.h
TRUNNER_BPF_SRCS := $$(notdir $$(wildcard $(TRUNNER_BPF_PROGS_DIR)/*.c))
Expand Down Expand Up @@ -686,6 +688,10 @@ $(TRUNNER_EXTRA_OBJS): $(TRUNNER_OUTPUT)/%.o: \
$$(call msg,EXT-OBJ,$(TRUNNER_BINARY),$$@)
$(Q)$$(CC) $$(CFLAGS) -c $$< $$(LDLIBS) -o $$@

$(TRUNNER_LIB_OBJS): $(TRUNNER_OUTPUT)/%.o:$(TOOLSDIR)/lib/%.c
$$(call msg,LIB-OBJ,$(TRUNNER_BINARY),$$@)
$(Q)$$(CC) $$(CFLAGS) -c $$< $$(LDLIBS) -o $$@

# non-flavored in-srctree builds receive special treatment, in particular, we
# do not need to copy extra resources (see e.g. test_btf_dump_case())
$(TRUNNER_BINARY)-extras: $(TRUNNER_EXTRA_FILES) | $(TRUNNER_OUTPUT)
Expand All @@ -699,6 +705,7 @@ $(OUTPUT)/$(TRUNNER_BINARY): | $(TRUNNER_BPF_OBJS)

$(OUTPUT)/$(TRUNNER_BINARY): $(TRUNNER_TEST_OBJS) \
$(TRUNNER_EXTRA_OBJS) $$(BPFOBJ) \
$(TRUNNER_LIB_OBJS) \
$(RESOLVE_BTFIDS) \
$(TRUNNER_BPFTOOL) \
$(OUTPUT)/veristat \
Expand Down Expand Up @@ -745,6 +752,7 @@ TRUNNER_EXTRA_SOURCES := test_progs.c \
$(VERIFY_SIG_HDR) \
flow_dissector_load.h \
ip_check_defrag_frags.h
TRUNNER_LIB_SOURCES := find_bit.c
TRUNNER_EXTRA_FILES := $(OUTPUT)/urandom_read \
$(OUTPUT)/liburandom_read.so \
$(OUTPUT)/xdp_synproxy \
Expand Down Expand Up @@ -782,6 +790,7 @@ endif
TRUNNER_TESTS_DIR := map_tests
TRUNNER_BPF_PROGS_DIR := progs
TRUNNER_EXTRA_SOURCES := test_maps.c
TRUNNER_LIB_SOURCES :=
TRUNNER_EXTRA_FILES :=
TRUNNER_BPF_BUILD_RULE := $$(error no BPF objects should be built)
TRUNNER_BPF_CFLAGS :=
Expand All @@ -803,7 +812,7 @@ $(OUTPUT)/test_verifier: test_verifier.c verifier/tests.h $(BPFOBJ) | $(OUTPUT)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@

# Include find_bit.c to compile xskxceiver.
EXTRA_SRC := $(TOOLSDIR)/lib/find_bit.c
EXTRA_SRC := $(TOOLSDIR)/lib/find_bit.c prog_tests/test_xsk.c prog_tests/test_xsk.h
$(OUTPUT)/xskxceiver: $(EXTRA_SRC) xskxceiver.c xskxceiver.h $(OUTPUT)/network_helpers.o $(OUTPUT)/xsk.o $(OUTPUT)/xsk_xdp_progs.skel.h $(BPFOBJ) | $(OUTPUT)
$(call msg,BINARY,,$@)
$(Q)$(CC) $(CFLAGS) $(filter %.a %.o %.c,$^) $(LDLIBS) -o $@
Expand Down
Loading
Loading