mirror-linux/tools/testing/selftests/net
Amit Cohen 10fef9ca6a selftests: ethtool: Fix test when only two speeds are supported
The test case check_highest_speed_is_chosen() configures $h1 to
advertise a subset of its supported speeds and checks that $h2 chooses
the highest speed from the subset.

To find the common advertised speeds between $h1 and $h2,
common_speeds_get() is called.

Currently, the first speed returned from common_speeds_get() is removed
claiming "h1 does not advertise this speed". The claim is wrong because
the function is called after $h1 already advertised a subset of speeds.

In case $h1 supports only two speeds, it will advertise a single speed
which will be later removed because of previously mentioned bug. This
results in the test needlessly failing. When more than two speeds are
supported this is not an issue because the first advertised speed
is the lowest one.

Fix this by not removing any speed from the list of commonly advertised
speeds.

Fixes: 64916b57c0 ("selftests: forwarding: Add speed and auto-negotiation test")
Reported-by: Danielle Ratson <danieller@mellanox.com>
Signed-off-by: Amit Cohen <amitc@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-29 12:16:21 -07:00
..
forwarding selftests: ethtool: Fix test when only two speeds are supported 2020-07-29 12:16:21 -07:00
mptcp selftests: mptcp: pm: rm the right tmp file 2020-05-15 10:33:56 -07:00
.gitignore SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
Makefile selftests: Add tests for vrf and xfrms 2020-04-22 19:31:40 -07:00
altnames.sh selftest: net: add alternative names test 2019-11-08 14:10:27 -08:00
config selftests: move timestamping selftests to net folder 2020-03-29 21:48:30 -07:00
fcnal-test.sh fcnal-test: Fix vrf argument in local tcp tests 2020-01-06 13:46:39 -08:00
fib-onlink-tests.sh
fib_nexthop_multiprefix.sh selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion 2020-07-14 15:06:12 -07:00
fib_nexthops.sh ipv6: fib6_select_path can not use out path for nexthop objects 2020-07-06 13:24:16 -07:00
fib_rule_tests.sh
fib_tests.sh selftests: Fix suppress test in fib_tests.sh 2020-04-22 13:02:52 -07:00
fin_ack_lat.c selftests: net: Add FIN_ACK processing order related latency spike test 2020-02-02 13:33:21 -08:00
fin_ack_lat.sh selftests: net: Add FIN_ACK processing order related latency spike test 2020-02-02 13:33:21 -08:00
hwtstamp_config.c selftests: move timestamping selftests to net folder 2020-03-29 21:48:30 -07:00
icmp_redirect.sh
in_netns.sh
ip6_gre_headroom.sh
ip_defrag.c selftests: net: ip_defrag: ignore EPERM 2020-06-02 15:54:20 -07:00
ip_defrag.sh selftests: net: ip_defrag: modprobe missing nf_defrag_ipv6 support 2020-07-17 12:49:18 -07:00
ipv6_flowlabel.c
ipv6_flowlabel.sh
ipv6_flowlabel_mgr.c
l2tp.sh selftests: Make l2tp.sh executable 2019-10-22 14:01:35 -07:00
msg_zerocopy.c
msg_zerocopy.sh
netdevice.sh
nettest.c nettest: Add support for TCP_MD5 extensions 2020-01-02 15:51:22 -08:00
pmtu.sh selftests: pmtu: implement IPIP, SIT and ip6tnl PMTU discovery tests 2020-04-20 12:08:06 -07:00
psock_fanout.c selftests/net: psock_fanout: fix clang issues for target arch PowerPC 2020-07-27 12:56:58 -07:00
psock_lib.h
psock_snd.c
psock_snd.sh
psock_tpacket.c
reuseaddr_conflict.c
reuseaddr_ports_exhausted.c selftests: net: Add SO_REUSEADDR test to check if 4-tuples are fully utilized. 2020-03-12 12:08:09 -07:00
reuseaddr_ports_exhausted.sh selftests: net: Add SO_REUSEADDR test to check if 4-tuples are fully utilized. 2020-03-12 12:08:09 -07:00
reuseport_addr_any.c selftests/net: add definition for SOL_DCCP to fix compilation errors for old libc 2020-03-21 20:23:10 -07:00
reuseport_addr_any.sh
reuseport_bpf.c
reuseport_bpf_cpu.c
reuseport_bpf_numa.c
reuseport_dualstack.c selftests: net: reuseport_dualstack: fix uninitalized parameter 2019-11-01 15:11:02 -07:00
route_localnet.sh
rtnetlink.sh
run_afpackettests
run_netsocktests
rxtimestamp.c selftests/net: rxtimestamp: fix clang issues for target arch PowerPC 2020-07-27 12:56:58 -07:00
so_txtime.c selftests/net: so_txtime: fix clang issues for target arch PowerPC 2020-07-27 12:56:58 -07:00
so_txtime.sh selftests/net: make so_txtime more robust to timer variance 2019-12-14 18:03:01 -08:00
socket.c
tcp_fastopen_backup_key.c
tcp_fastopen_backup_key.sh
tcp_inq.c
tcp_mmap.c selftests/net: tcp_mmap: fix clang warning for target arch PowerPC 2020-07-27 12:56:59 -07:00
test_blackhole_dev.sh
test_bpf.sh
test_vxlan_fdb_changelink.sh
test_vxlan_under_vrf.sh
timestamping.c selftests/net: in timestamping, strncpy needs to preserve null byte 2020-06-08 19:14:28 -07:00
tls.c net/tls(TLS_SW): Add selftest for 'chunked' sendfile test 2020-06-08 19:01:54 -07:00
traceroute.sh selftest: net: add some traceroute tests 2019-11-06 17:35:49 -08:00
txring_overwrite.c
txtimestamp.c selftests: move timestamping selftests to net folder 2020-03-29 21:48:30 -07:00
txtimestamp.sh selftest: txtimestamp: fix net ns entry logic 2020-07-21 16:11:07 -07:00
udpgro.sh
udpgro_bench.sh
udpgso.c linux-kselftest-5.5-rc1-fixes 2019-11-25 14:58:09 -08:00
udpgso.sh
udpgso_bench.sh
udpgso_bench_rx.c
udpgso_bench_tx.c selftests: net: Fix printf format warnings on arm 2019-11-07 14:54:08 -07:00
vrf-xfrm-tests.sh selftests: Add tests for vrf and xfrms 2020-04-22 19:31:40 -07:00
xfrm_policy.sh