[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240529144351.44719939@wsk>
Date: Wed, 29 May 2024 14:43:51 +0200
From: Lukasz Majewski <lukma@...x.de>
To: Geliang Tang <geliang@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
<pabeni@...hat.com>, Shuah Khan <shuah@...nel.org>, Sebastian Andrzej
Siewior <bigeasy@...utronix.de>, Hangbin Liu <liuhangbin@...il.com>,
Geliang Tang <tanggeliang@...inos.cn>, netdev@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net v2] selftests: hsr: Fix "File exists" errors for
hsr_ping
Hi Geliang,
First of all - thanks for spotting and fixing this error.
> From: Geliang Tang <tanggeliang@...inos.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@...il.com> Signed-off-by: Geliang Tang
> <tanggeliang@...inos.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@...x.de
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists