From: Danielle Ratson Date: Wed, 18 May 2022 07:27:26 +0000 (+0300) Subject: selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test X-Git-Tag: v6.1-rc5~1274^2~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ba106fcd4b441c5d6e3d1219104e022ca470d00;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Petr Machata Signed-off-by: David S. Miller --- diff --git a/tools/testing/selftests/drivers/net/netdevsim/hw_stats_l3.sh b/tools/testing/selftests/drivers/net/netdevsim/hw_stats_l3.sh index fe18984..cba5ac0 100755 --- a/tools/testing/selftests/drivers/net/netdevsim/hw_stats_l3.sh +++ b/tools/testing/selftests/drivers/net/netdevsim/hw_stats_l3.sh @@ -319,11 +319,11 @@ counter_test() ((pkts < 10)) check_err $? "$type stats show >= 10 packets after first enablement" - sleep 2 + sleep 2.5 local pkts=$(get_hwstat dummy1 l3 rx.packets) ((pkts >= 20)) - check_err $? "$type stats show < 20 packets after 2s passed" + check_err $? "$type stats show < 20 packets after 2.5s passed" $IP stats set dev dummy1 ${type}_stats off