/usr/src/linux-headers-5.15.0-190/tools/testing/selftests/net
NameSizeModeActions
af_unix/-0755rm
forwarding/-0755rm
mptcp/-0755rm
altnames.sh18170755editdlrm
bareudp.sh212900755editdlrm
drop_monitor_tests.sh44390755editdlrm
fcnal-test.sh1032210755editdlrm
fib-onlink-tests.sh124090755editdlrm
fib_nexthops.sh680030755editdlrm
fib_nexthop_multiprefix.sh58700755editdlrm
fib_nexthop_nongw.sh23270755editdlrm
fib_rule_tests.sh59810755editdlrm
fib_tests.sh572240755editdlrm
fin_ack_lat.sh5070755editdlrm
gre_gso.sh42370755editdlrm
gro.sh21320755editdlrm
icmp.sh26180755editdlrm
icmp_redirect.sh128200755editdlrm
in_netns.sh3230755editdlrm
ioam6.sh259620755editdlrm
ip6_gre_headroom.sh14000755editdlrm
ipv6_flowlabel.sh5020755editdlrm
ip_defrag.sh20870755editdlrm
l2tp.sh99090755editdlrm
lib.sh5970644editdlrm
Makefile24990644editdlrm
msg_zerocopy.sh30120755editdlrm
netdevice.sh45210755editdlrm
net_helper.sh5140644editdlrm
pmtu.sh747110755editdlrm
psock_snd.sh22520755editdlrm
reuseaddr_ports_exhausted.sh6350755editdlrm
reuseport_addr_any.sh810755editdlrm
route_localnet.sh18710755editdlrm
rtnetlink.sh294760755editdlrm
rxtimestamp.sh790755editdlrm
setup_loopback.sh26540644editdlrm
setup_veth.sh9290644editdlrm
so_txtime.sh24340755editdlrm
srv6_end_dt4_l3vpn_test.sh174540755editdlrm
srv6_end_dt6_l3vpn_test.sh176150755editdlrm
srv6_end_dt46_l3vpn_test.sh211210755editdlrm
tcp_fastopen_backup_key.sh10860755editdlrm
test_blackhole_dev.sh2800755editdlrm
test_bpf.sh2250755editdlrm
test_vxlan_fdb_changelink.sh6780755editdlrm
test_vxlan_under_vrf.sh56070755editdlrm
toeplitz.sh49830755editdlrm
toeplitz_client.sh6670755editdlrm
traceroute.sh71310755editdlrm
txtimestamp.sh17020755editdlrm
udpgro.sh59880755editdlrm
udpgro_bench.sh21260755editdlrm
udpgro_fwd.sh71450755editdlrm
udpgso.sh5450755editdlrm
udpgso_bench.sh28520755editdlrm
unicast_extensions.sh82630755editdlrm
veth.sh104410755editdlrm
vrf-xfrm-tests.sh109700755editdlrm
vrf_route_leaking.sh149460755editdlrm
vrf_strict_mode_test.sh76880755editdlrm
xfrm_policy.sh147590755editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/tools/testing/selftests/net/udpgso_bench.sh (2852B)
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 # # Run a series of udpgso benchmarks readonly GREEN='\033[0;92m' readonly YELLOW='\033[0;33m' readonly RED='\033[0;31m' readonly NC='\033[0m' # No Color readonly TESTPORT=8000 readonly KSFT_PASS=0 readonly KSFT_FAIL=1 readonly KSFT_SKIP=4 num_pass=0 num_err=0 num_skip=0 kselftest_test_exitcode() { local -r exitcode=$1 if [[ ${exitcode} -eq ${KSFT_PASS} ]]; then num_pass=$(( $num_pass + 1 )) elif [[ ${exitcode} -eq ${KSFT_SKIP} ]]; then num_skip=$(( $num_skip + 1 )) else num_err=$(( $num_err + 1 )) fi } kselftest_exit() { echo -e "$(basename $0): PASS=${num_pass} SKIP=${num_skip} FAIL=${num_err}" if [[ $num_err -ne 0 ]]; then echo -e "$(basename $0): ${RED}FAIL${NC}" exit ${KSFT_FAIL} fi if [[ $num_skip -ne 0 ]]; then echo -e "$(basename $0): ${YELLOW}SKIP${NC}" exit ${KSFT_SKIP} fi echo -e "$(basename $0): ${GREEN}PASS${NC}" exit ${KSFT_PASS} } wake_children() { local -r jobs="$(jobs -p)" if [[ "${jobs}" != "" ]]; then kill -1 ${jobs} 2>/dev/null fi } trap wake_children EXIT run_one() { local -r args=$@ local nr_socks=0 local i=0 local -r timeout=10 ./udpgso_bench_rx -p "$TESTPORT" & ./udpgso_bench_rx -p "$TESTPORT" -t & # Wait for the above test program to get ready to receive connections. while [ "$i" -lt "$timeout" ]; do nr_socks="$(ss -lnHi | grep -c "\*:${TESTPORT}")" [ "$nr_socks" -eq 2 ] && break i=$((i + 1)) sleep 1 done if [ "$nr_socks" -ne 2 ]; then echo "timed out while waiting for udpgso_bench_rx" exit 1 fi ./udpgso_bench_tx -p "$TESTPORT" ${args} } run_in_netns() { local -r args=$@ ./in_netns.sh $0 __subprocess ${args} kselftest_test_exitcode $? } run_udp() { local -r args=$@ echo "udp" run_in_netns ${args} echo "udp gso" run_in_netns ${args} -S 0 echo "udp gso zerocopy" run_in_netns ${args} -S 0 -z echo "udp gso timestamp" run_in_netns ${args} -S 0 -T echo "udp gso zerocopy audit" run_in_netns ${args} -S 0 -z -a echo "udp gso timestamp audit" run_in_netns ${args} -S 0 -T -a echo "udp gso zerocopy timestamp audit" run_in_netns ${args} -S 0 -T -z -a } run_tcp() { local -r args=$@ echo "tcp" run_in_netns ${args} -t echo "tcp zerocopy" run_in_netns ${args} -t -z # excluding for now because test fails intermittently # add -P option to include poll() to reduce possibility of lost messages #echo "tcp zerocopy audit" #run_in_netns ${args} -t -z -P -a } run_all() { local -r core_args="-l 3" local -r ipv4_args="${core_args} -4 -D 127.0.0.1" local -r ipv6_args="${core_args} -6 -D ::1" echo "ipv4" run_tcp "${ipv4_args}" run_udp "${ipv4_args}" echo "ipv6" run_tcp "${ipv6_args}" run_udp "${ipv6_args}" } if [[ $# -eq 0 ]]; then run_all kselftest_exit elif [[ $1 == "__subprocess" ]]; then shift run_one $@ else run_in_netns $@ fi