diff mbox series

[net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test

Message ID 20220518072726.741777-1-danieller@nvidia.com (mailing list archive)
State Accepted
Commit 7ba106fcd4b441c5d6e3d1219104e022ca470d00
Delegated to: Netdev Maintainers
Headers show
Series [net-next] selftests: netdevsim: Increase sleep time in hw_stats_l3.sh test | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 1 maintainers not CCed: linux-kselftest@vger.kernel.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 13 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Danielle Ratson May 18, 2022, 7:27 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org May 18, 2022, 1:10 p.m. UTC | #1
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!
diff mbox series

Patch

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