Skip to content

Commit 237a0d4

Browse files
anakryikokernel-patches-bot
authored andcommitted
Merge 183 tests from test_btf into test_progs framework to be exercised
regularly. All the test_btf tests that were moved are modeled as proper sub-tests in test_progs framework for ease of debugging and reporting. No functional or behavioral changes were intended, I tried to preserve original behavior as much as possible. E.g., `test_progs -v` will activate "always_log" flag to emit BTF validation log. The only difference is in reducing the max_entries limit for pretty-printing tests from (128 * 1024) to just 128 to reduce tests running time without reducing the coverage. Example test run: $ sudo ./test_progs -n 8 ... #8 btf:OK Summary: 1/183 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Andrii Nakryiko <[email protected]> --- v2->v3: - made pprint use smaller max_entries (as suggested by Alexei) and then everything just worked within test_progs; I didn't bother to check why it was failing with bigger max_entries; v1->v2: - pretty-print BTF tests were renamed test_btf -> test_btf_pprint, which allowed GIT to detect that majority of test_btf code was moved into prog_tests/btf.c; so diff is much-much smaller; tools/testing/selftests/bpf/.gitignore | 1 - tools/testing/selftests/bpf/Makefile | 2 +- .../bpf/{test_btf.c => prog_tests/btf.c} | 410 ++++-------------- 3 files changed, 78 insertions(+), 335 deletions(-) rename tools/testing/selftests/bpf/{test_btf.c => prog_tests/btf.c} (96%)
1 parent 751494a commit 237a0d4

File tree

3 files changed

+78
-335
lines changed

3 files changed

+78
-335
lines changed

tools/testing/selftests/bpf/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ test_sock
1515
test_sock_addr
1616
test_sock_fields
1717
urandom_read
18-
test_btf
1918
test_sockmap
2019
test_lirc_mode2_user
2120
get_cgroup_id_user

tools/testing/selftests/bpf/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LDLIBS += -lcap -lelf -lz -lrt -lpthread
3333
# Order correspond to 'make run_tests' order
3434
TEST_GEN_PROGS = test_verifier test_tag test_maps test_lru_map test_lpm_map test_progs \
3535
test_verifier_log test_dev_cgroup test_tcpbpf_user \
36-
test_sock test_btf test_sockmap get_cgroup_id_user test_socket_cookie \
36+
test_sock test_sockmap get_cgroup_id_user test_socket_cookie \
3737
test_cgroup_storage \
3838
test_netcnt test_tcpnotify_user test_sock_fields test_sysctl \
3939
test_progs-no_alu32 \

0 commit comments

Comments
 (0)