Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests: drivers: hw: ethtool.sh: Adjust output

Some log_test calls are done in a loop, and lead to the same log output.
This might prove tricky to deduplicate for automated tools. Instead, roll
the unique information from log_info to log_test, and drop the log_info.
This also leads to more compact and clearer output.

This change prompts rewording the messages so that they are not excessively
long.

Some check_err messages do not indicate what the issue actually is, so
reword them to say it's a "ping with", like is the case in some other
instances in this test.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Petr Machata and committed by
Paolo Abeni
f359d44a 042db639

+6 -9
+6 -9
tools/testing/selftests/drivers/net/hw/ethtool.sh
··· 65 65 setup_wait_dev_with_timeout $h1 66 66 setup_wait_dev_with_timeout $h2 67 67 ping_do $h1 192.0.2.2 68 - check_err $? "speed $speed autoneg off" 69 - log_test "force of same speed autoneg off" 70 - log_info "speed = $speed" 68 + check_err $? "ping with speed $speed autoneg off" 69 + log_test "force speed $speed on both ends" 71 70 done 72 71 73 72 ethtool -s $h2 autoneg on ··· 111 112 setup_wait_dev_with_timeout $h1 112 113 setup_wait_dev_with_timeout $h2 113 114 ping_do $h1 192.0.2.2 114 - check_err $? "h1-speed=$speed autoneg off, h2 autoneg on" 115 - log_test "one side with autoneg off and another with autoneg on" 116 - log_info "force speed = $speed" 115 + check_err $? "ping with h1-speed=$speed autoneg off, h2 autoneg on" 116 + log_test "force speed $speed vs. autoneg" 117 117 done 118 118 119 119 ethtool -s $h1 autoneg on ··· 205 207 setup_wait_dev_with_timeout $h1 206 208 setup_wait_dev_with_timeout $h2 207 209 ping_do $h1 192.0.2.2 208 - check_err $? "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" 210 + check_err $? "ping with h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" 209 211 210 - log_test "advertise subset of speeds" 211 - log_info "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise" 212 + log_test "advertise $speed_1_to_advertise vs. $speed_2_to_advertise" 212 213 done 213 214 214 215 ethtool -s $h2 autoneg on