/
usr
/
src
/
linux-headers-5.15.0-181
/
tools
/
testing
/
selftests
/
net
/
/usr/src/linux-headers-5.15.0-181/tools/testing/selftests/net
mkdir
upload
Name
Size
Mode
Actions
af_unix/
-
0755
rm
forwarding/
-
0755
rm
mptcp/
-
0755
rm
altnames.sh
1817
0755
edit
dl
rm
bareudp.sh
21290
0755
edit
dl
rm
drop_monitor_tests.sh
4439
0755
edit
dl
rm
fcnal-test.sh
103221
0755
edit
dl
rm
fib-onlink-tests.sh
12409
0755
edit
dl
rm
fib_nexthops.sh
68003
0755
edit
dl
rm
fib_nexthop_multiprefix.sh
5870
0755
edit
dl
rm
fib_nexthop_nongw.sh
2327
0755
edit
dl
rm
fib_rule_tests.sh
5981
0755
edit
dl
rm
fib_tests.sh
57224
0755
edit
dl
rm
fin_ack_lat.sh
507
0755
edit
dl
rm
gre_gso.sh
4237
0755
edit
dl
rm
gro.sh
2132
0755
edit
dl
rm
icmp.sh
2618
0755
edit
dl
rm
icmp_redirect.sh
12820
0755
edit
dl
rm
in_netns.sh
323
0755
edit
dl
rm
ioam6.sh
25962
0755
edit
dl
rm
ip6_gre_headroom.sh
1400
0755
edit
dl
rm
ipv6_flowlabel.sh
502
0755
edit
dl
rm
ip_defrag.sh
2087
0755
edit
dl
rm
l2tp.sh
9909
0755
edit
dl
rm
lib.sh
597
0644
edit
dl
rm
Makefile
2499
0644
edit
dl
rm
msg_zerocopy.sh
3012
0755
edit
dl
rm
netdevice.sh
4521
0755
edit
dl
rm
net_helper.sh
514
0644
edit
dl
rm
pmtu.sh
74711
0755
edit
dl
rm
psock_snd.sh
2252
0755
edit
dl
rm
reuseaddr_ports_exhausted.sh
635
0755
edit
dl
rm
reuseport_addr_any.sh
81
0755
edit
dl
rm
route_localnet.sh
1871
0755
edit
dl
rm
rtnetlink.sh
29476
0755
edit
dl
rm
rxtimestamp.sh
79
0755
edit
dl
rm
setup_loopback.sh
2654
0644
edit
dl
rm
setup_veth.sh
929
0644
edit
dl
rm
so_txtime.sh
2434
0755
edit
dl
rm
srv6_end_dt4_l3vpn_test.sh
17454
0755
edit
dl
rm
srv6_end_dt6_l3vpn_test.sh
17615
0755
edit
dl
rm
srv6_end_dt46_l3vpn_test.sh
21121
0755
edit
dl
rm
tcp_fastopen_backup_key.sh
1086
0755
edit
dl
rm
test_blackhole_dev.sh
280
0755
edit
dl
rm
test_bpf.sh
225
0755
edit
dl
rm
test_vxlan_fdb_changelink.sh
678
0755
edit
dl
rm
test_vxlan_under_vrf.sh
5607
0755
edit
dl
rm
toeplitz.sh
4983
0755
edit
dl
rm
toeplitz_client.sh
667
0755
edit
dl
rm
traceroute.sh
7131
0755
edit
dl
rm
txtimestamp.sh
1702
0755
edit
dl
rm
udpgro.sh
5988
0755
edit
dl
rm
udpgro_bench.sh
2126
0755
edit
dl
rm
udpgro_fwd.sh
7145
0755
edit
dl
rm
udpgso.sh
545
0755
edit
dl
rm
udpgso_bench.sh
2852
0755
edit
dl
rm
unicast_extensions.sh
8263
0755
edit
dl
rm
veth.sh
10441
0755
edit
dl
rm
vrf-xfrm-tests.sh
10970
0755
edit
dl
rm
vrf_route_leaking.sh
14946
0755
edit
dl
rm
vrf_strict_mode_test.sh
7688
0755
edit
dl
rm
xfrm_policy.sh
14759
0755
edit
dl
rm
Edit:
/usr/src/linux-headers-5.15.0-181/tools/testing/selftests/net/gro.sh
(2132B)
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 readonly SERVER_MAC="aa:00:00:00:00:02" readonly CLIENT_MAC="aa:00:00:00:00:01" readonly TESTS=("data" "ack" "flags" "tcp" "ip" "large") readonly PROTOS=("ipv4" "ipv6") dev="" test="all" proto="ipv4" run_test() { local server_pid=0 local exit_code=0 local protocol=$1 local test=$2 local ARGS=( "--${protocol}" "--dmac" "${SERVER_MAC}" \ "--smac" "${CLIENT_MAC}" "--test" "${test}" "--verbose" ) setup_ns # Each test is run 3 times to deflake, because given the receive timing, # not all packets that should coalesce will be considered in the same flow # on every try. for tries in {1..3}; do # Actual test starts here ip netns exec server_ns ./gro "${ARGS[@]}" "--rx" "--iface" "server" \ 1>>log.txt & server_pid=$! sleep 0.5 # to allow for socket init ip netns exec client_ns ./gro "${ARGS[@]}" "--iface" "client" \ 1>>log.txt wait "${server_pid}" exit_code=$? if [[ "${exit_code}" -eq 0 ]]; then break; fi done cleanup_ns echo ${exit_code} } run_all_tests() { local failed_tests=() for proto in "${PROTOS[@]}"; do for test in "${TESTS[@]}"; do echo "running test ${proto} ${test}" >&2 exit_code=$(run_test $proto $test) if [[ "${exit_code}" -ne 0 ]]; then failed_tests+=("${proto}_${test}") fi; done; done if [[ ${#failed_tests[@]} -ne 0 ]]; then echo "failed tests: ${failed_tests[*]}. \ Please see log.txt for more logs" exit 1 else echo "All Tests Succeeded!" fi; } usage() { echo "Usage: $0 \ [-i <DEV>] \ [-t data|ack|flags|tcp|ip|large] \ [-p <ipv4|ipv6>]" 1>&2; exit 1; } while getopts "i:t:p:" opt; do case "${opt}" in i) dev="${OPTARG}" ;; t) test="${OPTARG}" ;; p) proto="${OPTARG}" ;; *) usage ;; esac done if [ -n "$dev" ]; then source setup_loopback.sh else source setup_veth.sh fi setup trap cleanup EXIT if [[ "${test}" == "all" ]]; then run_all_tests else exit_code=$(run_test "${proto}" "${test}") exit $exit_code fi;
Save
cmd:
run