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

selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test

hw_stats_l3.sh test is failing often for l3 stats shows less than 20
packets after 2 seconds sleep.

This is happening since there is a race between the 2 seconds sleep and
the netdevsim actually delivering the packets.

Increase the sleep time so the packets will be delivered successfully on
time.

Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Danielle Ratson and committed by
David S. Miller
7ba106fc 32329216

+2 -2
+2 -2
tools/testing/selftests/drivers/net/netdevsim/hw_stats_l3.sh
··· 319 319 ((pkts < 10)) 320 320 check_err $? "$type stats show >= 10 packets after first enablement" 321 321 322 - sleep 2 322 + sleep 2.5 323 323 324 324 local pkts=$(get_hwstat dummy1 l3 rx.packets) 325 325 ((pkts >= 20)) 326 - check_err $? "$type stats show < 20 packets after 2s passed" 326 + check_err $? "$type stats show < 20 packets after 2.5s passed" 327 327 328 328 $IP stats set dev dummy1 ${type}_stats off 329 329