/usr/src/linux-headers-5.15.0-181/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-181/tools/testing/selftests/net/altnames.sh (1817B)
#!/bin/bash # SPDX-License-Identifier: GPL-2.0 lib_dir=$(dirname $0)/forwarding ALL_TESTS="altnames_test" NUM_NETIFS=0 source $lib_dir/lib.sh DUMMY_DEV=dummytest SHORT_NAME=shortname LONG_NAME=someveryveryveryveryveryverylongname altnames_test() { RET=0 local output local name ip link property add $DUMMY_DEV altname $SHORT_NAME check_err $? "Failed to add short alternative name" output=$(ip -j -p link show $SHORT_NAME) check_err $? "Failed to do link show with short alternative name" name=$(echo $output | jq -e -r ".[0].altnames[0]") check_err $? "Failed to get short alternative name from link show JSON" [ "$name" == "$SHORT_NAME" ] check_err $? "Got unexpected short alternative name from link show JSON" ip -j -p link show $DUMMY_DEV &>/dev/null check_err $? "Failed to do link show with original name" ip link property add $DUMMY_DEV altname $LONG_NAME check_err $? "Failed to add long alternative name" output=$(ip -j -p link show $LONG_NAME) check_err $? "Failed to do link show with long alternative name" name=$(echo $output | jq -e -r ".[0].altnames[1]") check_err $? "Failed to get long alternative name from link show JSON" [ "$name" == "$LONG_NAME" ] check_err $? "Got unexpected long alternative name from link show JSON" ip link property del $DUMMY_DEV altname $SHORT_NAME check_err $? "Failed to delete short alternative name" ip -j -p link show $SHORT_NAME &>/dev/null check_fail $? "Unexpected success while trying to do link show with deleted short alternative name" # long name is left there on purpose to be removed alongside the device log_test "altnames test" } setup_prepare() { ip link add name $DUMMY_DEV type dummy } cleanup() { pre_cleanup ip link del name $DUMMY_DEV } trap cleanup EXIT setup_prepare tests_run exit $EXIT_STATUS