* [PATCH] tests: hsr: Increase timeout to 10 minutes
@ 2024-10-22 8:02 Yunshui Jiang
2024-10-22 15:46 ` Simon Horman
2024-10-22 16:12 ` Andrew Lunn
0 siblings, 2 replies; 5+ messages in thread
From: Yunshui Jiang @ 2024-10-22 8:02 UTC (permalink / raw)
To: linux-kernel; +Cc: netdev, davem, edumazet, kuba, pabeni, Yunshui Jiang
The time-consuming HSR test, hsr_ping.sh, actually needs 7 min to run.
Around 375s to be exact, and even more on a debug kernel or kernel with
other network security limits. The timeout setting for the kselftest is
currently 45 seconds, which is way too short to integrate hsr tests to
run_kselftest infrastructure. So, HSR test needs an explicit setting.
And to leave us some slack, use 10 min as default timeout.
Signed-off-by: Yunshui Jiang <jiangyunshui@kylinos.cn>
---
tools/testing/selftests/net/hsr/settings | 1 +
1 file changed, 1 insertion(+)
create mode 100644 tools/testing/selftests/net/hsr/settings
diff --git a/tools/testing/selftests/net/hsr/settings b/tools/testing/selftests/net/hsr/settings
new file mode 100644
index 000000000000..a62d2fa1275c
--- /dev/null
+++ b/tools/testing/selftests/net/hsr/settings
@@ -0,0 +1 @@
+timeout=600
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] tests: hsr: Increase timeout to 10 minutes
2024-10-22 8:02 [PATCH] tests: hsr: Increase timeout to 10 minutes Yunshui Jiang
@ 2024-10-22 15:46 ` Simon Horman
2024-10-22 16:12 ` Andrew Lunn
1 sibling, 0 replies; 5+ messages in thread
From: Simon Horman @ 2024-10-22 15:46 UTC (permalink / raw)
To: Yunshui Jiang; +Cc: linux-kernel, netdev, davem, edumazet, kuba, pabeni
On Tue, Oct 22, 2024 at 04:02:23PM +0800, Yunshui Jiang wrote:
> The time-consuming HSR test, hsr_ping.sh, actually needs 7 min to run.
> Around 375s to be exact, and even more on a debug kernel or kernel with
> other network security limits. The timeout setting for the kselftest is
> currently 45 seconds, which is way too short to integrate hsr tests to
> run_kselftest infrastructure. So, HSR test needs an explicit setting.
> And to leave us some slack, use 10 min as default timeout.
>
> Signed-off-by: Yunshui Jiang <jiangyunshui@kylinos.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] tests: hsr: Increase timeout to 10 minutes
2024-10-22 8:02 [PATCH] tests: hsr: Increase timeout to 10 minutes Yunshui Jiang
2024-10-22 15:46 ` Simon Horman
@ 2024-10-22 16:12 ` Andrew Lunn
2024-10-28 8:27 ` [PATCH v2] tests: hsr: Increase timeout to 50 seconds Yunshui Jiang
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2024-10-22 16:12 UTC (permalink / raw)
To: Yunshui Jiang; +Cc: linux-kernel, netdev, davem, edumazet, kuba, pabeni
On Tue, Oct 22, 2024 at 04:02:23PM +0800, Yunshui Jiang wrote:
> The time-consuming HSR test, hsr_ping.sh, actually needs 7 min to run.
> Around 375s to be exact
That is quite a long time, if it is being used in a CI/CD environment.
If it possible to make the test faster? What takes all the time?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] tests: hsr: Increase timeout to 50 seconds
2024-10-22 16:12 ` Andrew Lunn
@ 2024-10-28 8:27 ` Yunshui Jiang
2024-10-30 23:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 5+ messages in thread
From: Yunshui Jiang @ 2024-10-28 8:27 UTC (permalink / raw)
To: andrew; +Cc: davem, edumazet, jiangyunshui, kuba, linux-kernel, netdev, pabeni
The HSR test, hsr_ping.sh, actually needs 7 min to run. Around 375s to
be exact, and even more on a debug kernel or kernel with other network
security limits. The timeout setting for the kselftest is currently 45
seconds, which is way too short to integrate hsr tests to run_kselftest
infrastructure. However, timeout of hundreds of seconds is quite a long
time, especially in a CI/CD environment. It seems that we need
accelerate the test and balance with timeout setting.
The most time-consuming func is do_ping_long, where ping command sends
10 packages to the given address. The default interval between two ping
packages is 1s according to the ping Mannual. There isn't any operation
between pings thus we could pass -i 0.1 to ping to make it 10 times
faster.
While even with this short interval, the test still need about 46.4
seconds to finish because of the two HSR interfaces, each of which is
tested by calling do_ping func 12 times and do_ping_long func 19 times
and sleep for 3s.
So, an explicit setting is also needed to slightly increase the
timeout. And to leave us some slack, use 50 as default timeout.
Signed-off-by: Yunshui Jiang <jiangyunshui@kylinos.cn>
---
tools/testing/selftests/net/hsr/hsr_common.sh | 4 ++--
tools/testing/selftests/net/hsr/settings | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 tools/testing/selftests/net/hsr/settings
diff --git a/tools/testing/selftests/net/hsr/hsr_common.sh b/tools/testing/selftests/net/hsr/hsr_common.sh
index 8e97b1f2e7e5..1dc882ac1c74 100644
--- a/tools/testing/selftests/net/hsr/hsr_common.sh
+++ b/tools/testing/selftests/net/hsr/hsr_common.sh
@@ -15,7 +15,7 @@ do_ping()
{
local netns="$1"
local connect_addr="$2"
- local ping_args="-q -c 2"
+ local ping_args="-q -c 2 -i 0.1"
if is_v6 "${connect_addr}"; then
$ipv6 || return 0
@@ -36,7 +36,7 @@ do_ping_long()
{
local netns="$1"
local connect_addr="$2"
- local ping_args="-q -c 10"
+ local ping_args="-q -c 10 -i 0.1"
if is_v6 "${connect_addr}"; then
$ipv6 || return 0
diff --git a/tools/testing/selftests/net/hsr/settings b/tools/testing/selftests/net/hsr/settings
new file mode 100644
index 000000000000..0fbc037f2aa8
--- /dev/null
+++ b/tools/testing/selftests/net/hsr/settings
@@ -0,0 +1 @@
+timeout=50
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2] tests: hsr: Increase timeout to 50 seconds
2024-10-28 8:27 ` [PATCH v2] tests: hsr: Increase timeout to 50 seconds Yunshui Jiang
@ 2024-10-30 23:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-30 23:50 UTC (permalink / raw)
To: Yunshui Jiang; +Cc: andrew, davem, edumazet, kuba, linux-kernel, netdev, pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 28 Oct 2024 16:27:56 +0800 you wrote:
> The HSR test, hsr_ping.sh, actually needs 7 min to run. Around 375s to
> be exact, and even more on a debug kernel or kernel with other network
> security limits. The timeout setting for the kselftest is currently 45
> seconds, which is way too short to integrate hsr tests to run_kselftest
> infrastructure. However, timeout of hundreds of seconds is quite a long
> time, especially in a CI/CD environment. It seems that we need
> accelerate the test and balance with timeout setting.
>
> [...]
Here is the summary with links:
- [v2] tests: hsr: Increase timeout to 50 seconds
https://git.kernel.org/netdev/net-next/c/365836e010a1
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] 5+ messages in thread
end of thread, other threads:[~2024-10-30 23:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22 8:02 [PATCH] tests: hsr: Increase timeout to 10 minutes Yunshui Jiang
2024-10-22 15:46 ` Simon Horman
2024-10-22 16:12 ` Andrew Lunn
2024-10-28 8:27 ` [PATCH v2] tests: hsr: Increase timeout to 50 seconds Yunshui Jiang
2024-10-30 23:50 ` 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