* [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion
@ 2020-07-14 15:40 Paolo Pisati
2020-07-14 17:58 ` David Ahern
2020-07-14 22:06 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Pisati @ 2020-07-14 15:40 UTC (permalink / raw)
To: David S . Miller, Jakub Kicinski, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel
During setup():
...
for ns in h0 r1 h1 h2 h3
do
create_ns ${ns}
done
...
while in cleanup():
...
for n in h1 r1 h2 h3 h4
do
ip netns del ${n} 2>/dev/null
done
...
and after removing the stderr redirection in cleanup():
$ sudo ./fib_nexthop_multiprefix.sh
...
TEST: IPv4: host 0 to host 3, mtu 1400 [ OK ]
TEST: IPv6: host 0 to host 3, mtu 1400 [ OK ]
Cannot remove namespace file "/run/netns/h4": No such file or directory
$ echo $?
1
and a non-zero return code, make kselftests fail (even if the test
itself is fine):
...
not ok 34 selftests: net: fib_nexthop_multiprefix.sh # exit=1
...
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
tools/testing/selftests/net/fib_nexthop_multiprefix.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
index 9dc35a16e415..51df5e305855 100755
--- a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
+++ b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
@@ -144,7 +144,7 @@ setup()
cleanup()
{
- for n in h1 r1 h2 h3 h4
+ for n in h0 r1 h1 h2 h3
do
ip netns del ${n} 2>/dev/null
done
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion
2020-07-14 15:40 [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion Paolo Pisati
@ 2020-07-14 17:58 ` David Ahern
2020-07-14 22:06 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2020-07-14 17:58 UTC (permalink / raw)
To: Paolo Pisati, David S . Miller, Jakub Kicinski, Shuah Khan
Cc: netdev, linux-kselftest, linux-kernel
On 7/14/20 9:40 AM, Paolo Pisati wrote:
> During setup():
> ...
> for ns in h0 r1 h1 h2 h3
> do
> create_ns ${ns}
> done
> ...
>
> while in cleanup():
> ...
> for n in h1 r1 h2 h3 h4
> do
> ip netns del ${n} 2>/dev/null
> done
> ...
>
> and after removing the stderr redirection in cleanup():
>
> $ sudo ./fib_nexthop_multiprefix.sh
> ...
> TEST: IPv4: host 0 to host 3, mtu 1400 [ OK ]
> TEST: IPv6: host 0 to host 3, mtu 1400 [ OK ]
> Cannot remove namespace file "/run/netns/h4": No such file or directory
> $ echo $?
> 1
>
> and a non-zero return code, make kselftests fail (even if the test
> itself is fine):
>
> ...
> not ok 34 selftests: net: fib_nexthop_multiprefix.sh # exit=1
> ...
>
> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
> ---
> tools/testing/selftests/net/fib_nexthop_multiprefix.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
> index 9dc35a16e415..51df5e305855 100755
> --- a/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
> +++ b/tools/testing/selftests/net/fib_nexthop_multiprefix.sh
> @@ -144,7 +144,7 @@ setup()
>
> cleanup()
> {
> - for n in h1 r1 h2 h3 h4
> + for n in h0 r1 h1 h2 h3
> do
> ip netns del ${n} 2>/dev/null
> done
>
Reviewed-by: David Ahern <dsahern@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion
2020-07-14 15:40 [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion Paolo Pisati
2020-07-14 17:58 ` David Ahern
@ 2020-07-14 22:06 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-07-14 22:06 UTC (permalink / raw)
To: paolo.pisati; +Cc: kuba, shuah, netdev, linux-kselftest, linux-kernel
From: Paolo Pisati <paolo.pisati@canonical.com>
Date: Tue, 14 Jul 2020 17:40:55 +0200
> During setup():
> ...
> for ns in h0 r1 h1 h2 h3
> do
> create_ns ${ns}
> done
> ...
>
> while in cleanup():
> ...
> for n in h1 r1 h2 h3 h4
> do
> ip netns del ${n} 2>/dev/null
> done
> ...
>
> and after removing the stderr redirection in cleanup():
>
> $ sudo ./fib_nexthop_multiprefix.sh
> ...
> TEST: IPv4: host 0 to host 3, mtu 1400 [ OK ]
> TEST: IPv6: host 0 to host 3, mtu 1400 [ OK ]
> Cannot remove namespace file "/run/netns/h4": No such file or directory
> $ echo $?
> 1
>
> and a non-zero return code, make kselftests fail (even if the test
> itself is fine):
>
> ...
> not ok 34 selftests: net: fib_nexthop_multiprefix.sh # exit=1
> ...
>
> Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-14 22:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 15:40 [PATCH] selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion Paolo Pisati
2020-07-14 17:58 ` David Ahern
2020-07-14 22:06 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.