* [PATCH net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test
@ 2022-05-18 7:27 Danielle Ratson
2022-05-18 13:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Danielle Ratson @ 2022-05-18 7:27 UTC (permalink / raw)
To: netdev; +Cc: davem, shuah, petrm, pabeni, mlxsw, Danielle Ratson
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>
---
tools/testing/selftests/drivers/net/netdevsim/hw_stats_l3.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 fe1898402987..cba5ac08426b 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
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test
2022-05-18 7:27 [PATCH net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test Danielle Ratson
@ 2022-05-18 13:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-05-18 13:10 UTC (permalink / raw)
To: Danielle Ratson; +Cc: netdev, davem, shuah, petrm, pabeni, mlxsw
Hello:
This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:
On Wed, 18 May 2022 10:27:26 +0300 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test
https://git.kernel.org/netdev/net-next/c/7ba106fcd4b4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-18 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-18 7:27 [PATCH net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test Danielle Ratson
2022-05-18 13:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).