Skip to content

Commit

Permalink
programs/kernel-selftests/parse: redesign to align with tap style
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
rli9 committed Oct 26, 2024
1 parent c5d2700 commit eb5e2fc
Show file tree
Hide file tree
Showing 153 changed files with 1,082 additions and 5,947 deletions.
1,501 changes: 299 additions & 1,202 deletions programs/kernel-selftests/parse

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions spec/stats/kernel-selftests/android-01

This file was deleted.

1 change: 0 additions & 1 deletion spec/stats/kernel-selftests/android-01.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions spec/stats/kernel-selftests/android-02

This file was deleted.

3 changes: 0 additions & 3 deletions spec/stats/kernel-selftests/android-02.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions spec/stats/kernel-selftests/bpf-02

This file was deleted.

6 changes: 0 additions & 6 deletions spec/stats/kernel-selftests/bpf-02.yaml

This file was deleted.

125 changes: 0 additions & 125 deletions spec/stats/kernel-selftests/bpf-03
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ ok 5 selftests: bpf: test_lpm_map
not ok 7 selftests: bpf: test_align # exit=1
# selftests: bpf: test_verifier_log
# Test log_level 0...
# Test log_size < 128...
# Test log_buff = NULL...
# Test oversized buffer...
# Test exact buffer...
# Test undersized buffers...
# test_verifier_log: OK
ok 8 selftests: bpf: test_verifier_log
Expand Down Expand Up @@ -77,22 +73,6 @@ ok 14 selftests: bpf: get_cgroup_id_user
# selftests: bpf: test_socket_cookie
# PASSED
ok 15 selftests: bpf: test_socket_cookie
# selftests: bpf: test_cgroup_storage
# test_cgroup_storage:PASS
ok 16 selftests: bpf: test_cgroup_storage
# selftests: bpf: test_netcnt
# test_netcnt:PASS
ok 17 selftests: bpf: test_netcnt
# selftests: bpf: test_tcpnotify_user
# PASSED!
ok 18 selftests: bpf: test_tcpnotify_user
# selftests: bpf: test_sock_fields
# srv_sa6.sin6_port:44775 cli_sa6.sin6_port:51983
#
# listen_sk: state:10 bound_dev_if:0 family:10 type:1 protocol:6 mark:0 priority:0 src_ip4:600007f(127.0.0.6) src_ip6:0:0:0:1000000(::1) src_port:44775 dst_ip4:0(0.0.0.0) dst_ip6:0:0:0:0(::) dst_port:0
#
# PASS
ok 19 selftests: bpf: test_sock_fields
# selftests: bpf: test_sysctl
# libbpf: load bpf program failed: Permission denied
# libbpf: -- BEGIN DUMP LOG ---
Expand All @@ -108,7 +88,6 @@ not ok 20 selftests: bpf: test_sysctl # exit=255
# selftests: bpf: test_hashmap
# test_hashmap_empty: OK
ok 21 selftests: bpf: test_hashmap
test_progs-no_alu32
# selftests: bpf: test_progs-no_alu32
# Switching to flavor 'no_alu32' subdirectory...
# #1 attach_probe:OK
Expand All @@ -119,9 +98,6 @@ test_progs-no_alu32
# #45/45 sockmap IPv4/TCP LOOPBACK test_syncookie:OK
# #45 select_reuseport:OK
# test_test_lsm:PASS:skel_load 0 nsec
# test_test_lsm:PASS:attach 0 nsec
# test_test_lsm:PASS:exec_cmd 0 nsec
# test_test_lsm:FAIL:bprm_count bprm_count = 0
# test_test_lsm:FAIL:stack_mprotect want err=EPERM, got 22
# #70 test_lsm:FAIL
# Summary: 77/472 PASSED, 4 SKIPPED, 5 FAILED
Expand Down Expand Up @@ -180,29 +156,12 @@ ok 29 selftests: bpf: test_offload.py
# libbpf: load bpf program failed: Permission denied
# libbpf: -- BEGIN DUMP LOG ---
# Test case: sendmsg6: deny call .. [PASS]
# Test case: recvmsg4: return code ok .. [PASS]
# Test case: recvmsg6: return code !ok .. [PASS]
# Test case: recvmsg4: rewrite IP & port (asm) .. [PASS]
# Summary: 35 PASSED, 0 FAILED
ok 30 selftests: bpf: test_sock_addr.sh
# selftests: bpf: test_tunnel.sh
# Testing GRE tunnel...
# Skipped 109 bytes, use 'verb' option for the full verbose log.
# [...]
# tal_size: 6820
# [1] PTR (anon) type_id=2
# [4] INT unsigned int size=4 bits_offset=0 nr_bits=32 encoding=(none)
# [65] DATASEC license size=0 vlen=1 size == 0
#
# PING ::11(::11) 56 data bytes
# --- ::11 ping statistics ---
# 5 packets transmitted, 3 received, 40% packet loss, time 4131ms
# rtt min/avg/max/mdev = 0.052/0.073/0.084/0.016 ms
# PING 10.1.1.100 (10.1.1.100) 56(84) bytes of data.
# [64] VAR _license type_id=63 linkage=1
# [65] DATASEC license size=0 vlen=1 size == 0
#
# PING 10.1.1.100 (10.1.1.100) 56(84) bytes of data.
# --- 10.1.1.200 ping statistics ---
# 3 packets transmitted, 3 received, 0% packet loss, time 2065ms
# rtt min/avg/max/mdev = 0.096/0.120/0.152/0.026 ms
Expand All @@ -222,88 +181,4 @@ ok 32 selftests: bpf: test_lirc_mode2.sh
# [23] DATASEC license size=0 vlen=1 size == 0
# [PASS]
ok 33 selftests: bpf: test_skb_cgroup_id.sh
# selftests: bpf: test_flow_dissector.sh
# Testing global flow dissector...
# Error: failed prog attach to map
# inner.source6: ::1
# pkts: tx=10 rx=10
# selftests: test_flow_dissector [PASS]
ok 34 selftests: bpf: test_flow_dissector.sh
# selftests: bpf: test_xdp_vlan_mode_generic.sh
# --- 100.64.41.2 ping statistics ---
# 2 packets transmitted, 2 received, 0% packet loss, time 202ms
# rtt min/avg/max/mdev = 0.050/0.064/0.078/0.014 ms
# selftests: xdp_vlan_mode_generic [PASS]
ok 35 selftests: bpf: test_xdp_vlan_mode_generic.sh
# selftests: bpf: test_xdp_vlan_mode_native.sh
# Cannot get device udp-fragmentation-offload settings: Operation not supported
# [21] VAR _license type_id=20 linkage=1
# [22] DATASEC license size=0 vlen=1 size == 0
# selftests: xdp_vlan_mode_native [PASS]
ok 36 selftests: bpf: test_xdp_vlan_mode_native.sh
# selftests: bpf: test_lwt_ip_encap.sh
# starting egress IPv4 encap test
# [11] INT long long unsigned int size=8 bits_offset=0 nr_bits=64 encoding=(none)
# [12] UNION (anon) size=8 vlen=1
# sk type_id=13 bits_offset=0
# ping: sendmsg: No route to host
# PASS
# starting ingress IPv4 encap test vrf red
# sk type_id=13 bits_offset=0
# [13] PTR (anon) type_id=24
# PASS
# passed tests: 8
# failed tests: 0
ok 37 selftests: bpf: test_lwt_ip_encap.sh
# selftests: bpf: test_tcp_check_syncookie.sh
# net.ipv4.tcp_syncookies = 2
# net.ipv4.tcp_window_scaling = 0
# Wait for IP 127.0.0.1 to become available . OK
# Wait for IP ::1 to become available . OK
# ok
# Testing XDP...
# BTF debug data section '.BTF' rejected: Invalid argument (22)!
# - Length: 3290
# [26] DATASEC license size=0 vlen=1 size == 0
#
# ok
ok 38 selftests: bpf: test_tcp_check_syncookie.sh
# selftests: bpf: test_tc_edt.sh
#
# gso_segs type_id=3 bits_offset=1312
# (anon) type_id=12 bits_offset=1344
# [22] DATASEC license size=0 vlen=1 size == 0
#
# elapsed: 20 sec; bps difference: -0.06%
# PASS
ok 39 selftests: bpf: test_tc_edt.sh
# selftests: bpf: test_xdping.sh
# Test client args '-I veth1 -S'; server args ''
# Running server on veth0; press Ctrl+C to exit...
# OK. All tests passed
ok 40 selftests: bpf: test_xdping.sh
# selftests: bpf: test_bpftool_build.sh
# Trying to build bpftool
# ... through kbuild
#
# skip: make tools/bpf (no .config found)
#
# $PWD: /usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-bpf-lsm-2-2ef96a5bb12be62ef75b5828c0aab838ebb29cb8
# command: make -s -C tools/bpf/bpftool OUTPUT=/tmp/tmp.unc5H2e1n4/ >/dev/null
# jit_disasm.c: In function ‘disasm_print_insn’:
# BUILD_BUG_ON(ARRAY_SIZE(func_id_str) != __BPF_FUNC_MAX_ID);
# ^~~~~~~~~~~~
# binary: /tmp/tmp.u8tqAULt0j/bpftool
#
ok 41 selftests: bpf: test_bpftool_build.sh
# selftests: bpf: test_bpftool.sh
# test_feature_dev_json (test_bpftool.TestBpftool) ... ok
# test_feature_kernel (test_bpftool.TestBpftool) ... ok
# test_feature_macros (test_bpftool.TestBpftool) ... ok
#
# ----------------------------------------------------------------------
# Ran 5 tests in 1.293s
#
# OK
ok 42 selftests: bpf: test_bpftool.sh
make: Leaving directory '/usr/src/perf_selftests-x86_64-rhel-7.6-kselftests-bpf-lsm-2-2ef96a5bb12be62ef75b5828c0aab838ebb29cb8/tools/testing/selftests/bpf'
46 changes: 22 additions & 24 deletions spec/stats/kernel-selftests/bpf-03.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,46 @@
bpf.make.pass: 1
bpf.test_verifier.0/u.invalid_and_of_negative_number.pass: 1
bpf.test_verifier.65/u.bounds_check_after_truncation_of_boundary-crossing_range_1.pass: 1
bpf.test_verifier.837/p.bpf_map_lookup_elem_xskmap_&key_;_xs->queue_id.skip: 1
bpf.test_verifier.u_invalid_and_of_negative_number.pass: 1
bpf.test_verifier.u_bounds_check_after_truncation_of_boundary-crossing_range_1.pass: 1
bpf.test_verifier.p_bpf_map_lookup_elem_xskmap_&key_;_xs->queue_id.skip: 1
bpf.test_verifier.pass: 1
bpf.test_tag.pass: 1
bpf.test_maps.test_array_map_batch_ops.pass: 1
bpf.test_maps.test_sk_storage_map.pass: 1
bpf.test_maps.pass: 1
bpf.test_lru_map.test_lru_sanity0_map_type_9_map_flags_0x0.pass: 1
bpf.test_lru_map.pass: 1
bpf.test_lpm_map.test_lpm.pass: 1
bpf.test_lpm_map.pass: 1
bpf.test_align.Test_0_mov.pass: 1
bpf.test_align.fail: 1
bpf.test_verifier_log.test_verifier_log.pass: 1
bpf.test_verifier_log.pass: 1
bpf.test_dev_cgroup.test_dev_cgroup.pass: 1
bpf.test_dev_cgroup.pass: 1
bpf.test_tcpbpf_user.pass: 1
bpf.test_sock.bind4_load_with_invalid_access_src_ip6.pass: 1
bpf.test_sock.bind6_allow_all.pass: 1
bpf.test_sock.pass: 1
bpf.test_btf.BTF_raw_test[1]_struct_test_#1.pass: 1
bpf.test_btf.BTF_raw_test[7]_global_data_test_#4_unsupported_linkage.pass: 1
bpf.test_btf.BTF_GET_INFO_test[2]_==_raw_btf_size-3_38...39...40.pass: 1
bpf.test_btf.BTF_prog_info_raw_test[6]_line_info_No_subprog._insn_off_>=_prog->len.pass: 1
bpf.test_btf.BTF_dedup_test[9]_dedup_datasec_and_vars_pass-through.pass: 1
bpf.test_btf.pass: 1
bpf.test_sockmap.[TEST_0]_1_1_1_sendmsg_pass.pass: 1
bpf.test_sockmap.[TEST_823]_16_1_100_sendpage_cork_1600_start_1601_end_1600_pop_1599_1609.pass: 1
bpf.test_sockmap.pass: 1
bpf.get_cgroup_id_user.setup_cgroup_environment.pass: 1
bpf.get_cgroup_id_user../get_cgroup_id_user.pass: 1
bpf.get_cgroup_id_user.pass: 1
bpf.test_socket_cookie.pass: 1
bpf.test_cgroup_storage.pass: 1
bpf.test_netcnt.pass: 1
bpf.test_tcpnotify_user.pass: 1
bpf.test_sock_fields.pass: 1
bpf.test_sysctl.C_prog_read_tcp_mem.fail: 1
bpf.test_sysctl.fail: 1
bpf.test_hashmap.test_hashmap_empty.pass: 1
bpf.test_hashmap.pass: 1
bpf.test_progs-no_alu32.attach_probe.pass: 1
bpf.test_progs-no_alu32.pin_raw_tp.fail: 1
bpf.test_progs-no_alu32.TCP_LOOPBACK_test_syncookie.pass: 1
bpf.test_progs-no_alu32.sockmap_IPv4/TCP_LOOPBACK_test_syncookie.pass: 1
bpf.test_progs-no_alu32.select_reuseport.pass: 1
bpf.test_progs-no_alu32.test_lsm.fail: 1
bpf.test_progs-no_alu32.fail: 1
Expand All @@ -43,26 +54,13 @@ bpf.test_xdp_meta.sh.test_xdp_meta.pass: 1
bpf.test_xdp_meta.sh.pass: 1
bpf.test_xdp_veth.sh.xdp_veth.pass: 1
bpf.test_xdp_veth.sh.pass: 1
bpf.test_offload.py.netdevsim_module_could_not_be_loaded.skip: 1
bpf.test_offload.py.pass: 1
bpf.test_sock_addr.sh.Wait_for_testing_IPv4/IPv6_to_become_available.pass: 1
bpf.test_sock_addr.sh.sendmsg6_deny_call.pass: 1
bpf.test_sock_addr.sh.recvmsg4_return_code_ok.pass: 1
bpf.test_sock_addr.sh.recvmsg6_return_code_!ok.pass: 1
bpf.test_sock_addr.sh.recvmsg4_rewrite_IP_&_port_asm.pass: 1
bpf.test_sock_addr.sh.pass: 1
bpf.test_tunnel.sh.pass: 1
bpf.test_lirc_mode2.sh.pass: 1
bpf.test_skb_cgroup_id.sh.Wait_for_testing_link-local_IP_to_become_available.pass: 1
bpf.test_skb_cgroup_id.sh.pass: 1
bpf.test_flow_dissector.sh.test_flow_dissector.pass: 1
bpf.test_flow_dissector.sh.pass: 1
bpf.test_xdp_vlan_mode_generic.sh.xdp_vlan_mode_generic.pass: 1
bpf.test_xdp_vlan_mode_generic.sh.pass: 1
bpf.test_xdp_vlan_mode_native.sh.xdp_vlan_mode_native.pass: 1
bpf.test_xdp_vlan_mode_native.sh.pass: 1
bpf.test_lwt_ip_encap.sh.egress_IPv4_encap_test.pass: 1
bpf.test_lwt_ip_encap.sh.ingress_IPv4_encap_test_vrf_red.pass: 1
bpf.test_lwt_ip_encap.sh.pass: 1
bpf.test_tcp_check_syncookie.sh.pass: 1
bpf.test_tc_edt.sh.pass: 1
bpf.test_xdping.sh.pass: 1
bpf.test_bpftool_build.sh.pass: 1
bpf.test_bpftool.sh.pass: 1
10 changes: 0 additions & 10 deletions spec/stats/kernel-selftests/bpf-06
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@ make: Entering directory '/usr/src/perf_selftests-x86_64-rhel-8.3-kselftests-3d7
# Failed to load bpf_testmod.ko into the kernel: -2
# WARNING! Selftests relying on bpf_testmod.ko will be skipped.
# #1/1 align/mov:OK
# #1/2 align/shift:OK
# #1/3 align/addsub:OK
# #1/4 align/mul:OK
# #1/5 align/unknown shift:OK
# #1/6 align/unknown mul:OK
# #1/7 align/packet const offset:OK
# #1/8 align/packet variable offset:OK
# #1/9 align/packet variable offset 2:OK
# #1/10 align/dubious pointer arithmetic:OK
# #1/11 align/variable subtraction:OK
# #1/12 align/pointer variable subtraction:OK
# #1 align:OK
# libbpf: failed to find kernel BTF type ID of 'file_mprotect': -3
Expand Down
18 changes: 4 additions & 14 deletions spec/stats/kernel-selftests/bpf-06.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
bpf.test_progs.mov.pass: 1
bpf.test_progs.shift.pass: 1
bpf.test_progs.addsub.pass: 1
bpf.test_progs.mul.pass: 1
bpf.test_progs.unknown_shift.pass: 1
bpf.test_progs.unknown_mul.pass: 1
bpf.test_progs.packet_const_offset.pass: 1
bpf.test_progs.packet_variable_offset.pass: 1
bpf.test_progs.packet_variable_offset_2.pass: 1
bpf.test_progs.dubious_pointer_arithmetic.pass: 1
bpf.test_progs.variable_subtraction.pass: 1
bpf.test_progs.pointer_variable_subtraction.pass: 1
bpf.test_progs.align/mov.pass: 1
bpf.test_progs.align/pointer_variable_subtraction.pass: 1
bpf.test_progs.align.pass: 1
bpf.test_progs.bpf_cookie.fail: 1
bpf.test_progs.ksym_used_btfs_UAF.fail: 1
bpf.test_progs.kfunc_kfunc_btf_tab_UAF.fail: 1
bpf.test_progs.bpf_mod_race/ksym_used_btfs_UAF.fail: 1
bpf.test_progs.bpf_mod_race/kfunc_kfunc_btf_tab_UAF.fail: 1
bpf.test_progs.bpf_mod_race.fail: 1
bpf.test_progs.fail: 1
15 changes: 0 additions & 15 deletions spec/stats/kernel-selftests/breakpoints-01

This file was deleted.

9 changes: 0 additions & 9 deletions spec/stats/kernel-selftests/breakpoints-01.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions spec/stats/kernel-selftests/breakpoints-02

This file was deleted.

1 change: 0 additions & 1 deletion spec/stats/kernel-selftests/breakpoints-02.yaml

This file was deleted.

Loading

0 comments on commit eb5e2fc

Please sign in to comment.