* [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping
@ 2024-05-22 10:45 Geliang Tang
2024-05-27 9:50 ` patchwork-bot+netdevbpf
2024-05-29 12:43 ` Lukasz Majewski
0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2024-05-22 10:45 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, Sebastian Andrzej Siewior, Lukasz Majewski,
Hangbin Liu
Cc: Geliang Tang, netdev, linux-kselftest
From: Geliang Tang <tanggeliang@kylinos.cn>
The hsr_ping test reports the following errors:
INFO: preparing interfaces for HSRv0.
INFO: Initial validation ping.
INFO: Longer ping test.
INFO: Cutting one link.
INFO: Delay the link and drop a few packages.
INFO: All good.
INFO: preparing interfaces for HSRv1.
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
Error: ipv4: Address already assigned.
Error: ipv6: address already assigned.
Error: ipv4: Address already assigned.
Error: ipv6: address already assigned.
Error: ipv4: Address already assigned.
Error: ipv6: address already assigned.
INFO: Initial validation ping.
That is because the cleanup code for the 2nd round test before
"setup_hsr_interfaces 1" is removed incorrectly in commit 680fda4f6714
("test: hsr: Remove script code already implemented in lib.sh").
This patch fixes it by re-setup the namespaces using
setup_ns ns1 ns2 ns3
command before "setup_hsr_interfaces 1". It deletes previous namespaces
and create new ones.
Fixes: 680fda4f6714 ("test: hsr: Remove script code already implemented in lib.sh")
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
v2:
- re-setup the namespaces as Hangbin suggested.
---
tools/testing/selftests/net/hsr/hsr_ping.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh b/tools/testing/selftests/net/hsr/hsr_ping.sh
index 790294c8af83..3684b813b0f6 100755
--- a/tools/testing/selftests/net/hsr/hsr_ping.sh
+++ b/tools/testing/selftests/net/hsr/hsr_ping.sh
@@ -174,6 +174,8 @@ trap cleanup_all_ns EXIT
setup_hsr_interfaces 0
do_complete_ping_test
+setup_ns ns1 ns2 ns3
+
setup_hsr_interfaces 1
do_complete_ping_test
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping
2024-05-22 10:45 [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping Geliang Tang
@ 2024-05-27 9:50 ` patchwork-bot+netdevbpf
2024-05-29 12:43 ` Lukasz Majewski
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-27 9:50 UTC (permalink / raw)
To: Geliang Tang
Cc: davem, edumazet, kuba, pabeni, shuah, bigeasy, lukma, liuhangbin,
tanggeliang, netdev, linux-kselftest
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 22 May 2024 18:45:04 +0800 you wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> The hsr_ping test reports the following errors:
>
> INFO: preparing interfaces for HSRv0.
> INFO: Initial validation ping.
> INFO: Longer ping test.
> INFO: Cutting one link.
> INFO: Delay the link and drop a few packages.
> INFO: All good.
> INFO: preparing interfaces for HSRv1.
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> Error: ipv4: Address already assigned.
> Error: ipv6: address already assigned.
> Error: ipv4: Address already assigned.
> Error: ipv6: address already assigned.
> Error: ipv4: Address already assigned.
> Error: ipv6: address already assigned.
> INFO: Initial validation ping.
>
> [...]
Here is the summary with links:
- [net,v2] selftests: hsr: Fix "File exists" errors for hsr_ping
https://git.kernel.org/netdev/net/c/21a22ed618d0
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] 4+ messages in thread
* Re: [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping
2024-05-22 10:45 [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping Geliang Tang
2024-05-27 9:50 ` patchwork-bot+netdevbpf
@ 2024-05-29 12:43 ` Lukasz Majewski
2024-05-29 13:20 ` Geliang Tang
1 sibling, 1 reply; 4+ messages in thread
From: Lukasz Majewski @ 2024-05-29 12:43 UTC (permalink / raw)
To: Geliang Tang
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, Sebastian Andrzej Siewior, Hangbin Liu, Geliang Tang,
netdev, linux-kselftest
[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]
Hi Geliang,
First of all - thanks for spotting and fixing this error.
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> The hsr_ping test reports the following errors:
>
> INFO: preparing interfaces for HSRv0.
> INFO: Initial validation ping.
> INFO: Longer ping test.
> INFO: Cutting one link.
> INFO: Delay the link and drop a few packages.
> INFO: All good.
> INFO: preparing interfaces for HSRv1.
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> RTNETLINK answers: File exists
> Error: ipv4: Address already assigned.
> Error: ipv6: address already assigned.
> Error: ipv4: Address already assigned.
> Error: ipv6: address already assigned.
> Error: ipv4: Address already assigned.
> Error: ipv6: address already assigned.
Interestingly, on the QEMU setup with -4 switch this error was not
present.
Instead, the not re-initialized name space caused some subtle errors
when tc's netns and netem were run (a few packets got dropped).
> INFO: Initial validation ping.
>
> That is because the cleanup code for the 2nd round test before
> "setup_hsr_interfaces 1" is removed incorrectly in commit 680fda4f6714
> ("test: hsr: Remove script code already implemented in lib.sh").
>
> This patch fixes it by re-setup the namespaces using
>
> setup_ns ns1 ns2 ns3
>
> command before "setup_hsr_interfaces 1". It deletes previous
> namespaces and create new ones.
>
> Fixes: 680fda4f6714 ("test: hsr: Remove script code already
> implemented in lib.sh") Reviewed-by: Hangbin Liu
> <liuhangbin@gmail.com> Signed-off-by: Geliang Tang
> <tanggeliang@kylinos.cn> ---
> v2:
> - re-setup the namespaces as Hangbin suggested.
> ---
> tools/testing/selftests/net/hsr/hsr_ping.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh
> b/tools/testing/selftests/net/hsr/hsr_ping.sh index
> 790294c8af83..3684b813b0f6 100755 ---
> a/tools/testing/selftests/net/hsr/hsr_ping.sh +++
> b/tools/testing/selftests/net/hsr/hsr_ping.sh @@ -174,6 +174,8 @@
> trap cleanup_all_ns EXIT setup_hsr_interfaces 0
> do_complete_ping_test
>
> +setup_ns ns1 ns2 ns3
> +
> setup_hsr_interfaces 1
> do_complete_ping_test
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping
2024-05-29 12:43 ` Lukasz Majewski
@ 2024-05-29 13:20 ` Geliang Tang
0 siblings, 0 replies; 4+ messages in thread
From: Geliang Tang @ 2024-05-29 13:20 UTC (permalink / raw)
To: Lukasz Majewski
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Shuah Khan, Sebastian Andrzej Siewior, Hangbin Liu, Geliang Tang,
netdev, linux-kselftest
Hi Lukasz,
On Wed, 2024-05-29 at 14:43 +0200, Lukasz Majewski wrote:
> Hi Geliang,
>
> First of all - thanks for spotting and fixing this error.
>
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > The hsr_ping test reports the following errors:
> >
> > INFO: preparing interfaces for HSRv0.
> > INFO: Initial validation ping.
> > INFO: Longer ping test.
> > INFO: Cutting one link.
> > INFO: Delay the link and drop a few packages.
> > INFO: All good.
> > INFO: preparing interfaces for HSRv1.
> > RTNETLINK answers: File exists
> > RTNETLINK answers: File exists
> > RTNETLINK answers: File exists
> > RTNETLINK answers: File exists
> > RTNETLINK answers: File exists
> > RTNETLINK answers: File exists
> > Error: ipv4: Address already assigned.
> > Error: ipv6: address already assigned.
> > Error: ipv4: Address already assigned.
> > Error: ipv6: address already assigned.
> > Error: ipv4: Address already assigned.
> > Error: ipv6: address already assigned.
>
> Interestingly, on the QEMU setup with -4 switch this error was not
> present.
>
> Instead, the not re-initialized name space caused some subtle errors
> when tc's netns and netem were run (a few packets got dropped).
I got these errors on my Thinkpad T480 laptop, not QEMU. So I didn't
get the errors you mentioned.
With this patch, hsr_ping tests passed on my side.
Thanks,
-Geliang
>
> > INFO: Initial validation ping.
> >
> > That is because the cleanup code for the 2nd round test before
> > "setup_hsr_interfaces 1" is removed incorrectly in commit
> > 680fda4f6714
> > ("test: hsr: Remove script code already implemented in lib.sh").
> >
> > This patch fixes it by re-setup the namespaces using
> >
> > setup_ns ns1 ns2 ns3
> >
> > command before "setup_hsr_interfaces 1". It deletes previous
> > namespaces and create new ones.
> >
> > Fixes: 680fda4f6714 ("test: hsr: Remove script code already
> > implemented in lib.sh") Reviewed-by: Hangbin Liu
> > <liuhangbin@gmail.com> Signed-off-by: Geliang Tang
> > <tanggeliang@kylinos.cn> ---
> > v2:
> > - re-setup the namespaces as Hangbin suggested.
> > ---
> > tools/testing/selftests/net/hsr/hsr_ping.sh | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/testing/selftests/net/hsr/hsr_ping.sh
> > b/tools/testing/selftests/net/hsr/hsr_ping.sh index
> > 790294c8af83..3684b813b0f6 100755 ---
> > a/tools/testing/selftests/net/hsr/hsr_ping.sh +++
> > b/tools/testing/selftests/net/hsr/hsr_ping.sh @@ -174,6 +174,8 @@
> > trap cleanup_all_ns EXIT setup_hsr_interfaces 0
> > do_complete_ping_test
> >
> > +setup_ns ns1 ns2 ns3
> > +
> > setup_hsr_interfaces 1
> > do_complete_ping_test
> >
>
>
> Best regards,
>
> Lukasz Majewski
>
> --
>
> DENX Software Engineering GmbH, Managing Director: Erika Unter
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email:
> lukma@denx.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-29 13:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-22 10:45 [PATCH net v2] selftests: hsr: Fix "File exists" errors for hsr_ping Geliang Tang
2024-05-27 9:50 ` patchwork-bot+netdevbpf
2024-05-29 12:43 ` Lukasz Majewski
2024-05-29 13:20 ` Geliang Tang
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).