Skip to content

Commit f1ba55a

Browse files
piso77gregkh
authored andcommitted
selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion
[ Upstream commit 651149f ] 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> Reviewed-by: David Ahern <dsahern@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f9286c0 commit f1ba55a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎tools/testing/selftests/net/fib_nexthop_multiprefix.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ setup()
144144

145145
cleanup()
146146
{
147-
for n in h1 r1 h2 h3 h4
147+
for n in h0 r1 h1 h2 h3
148148
do
149149
ip netns del ${n} 2>/dev/null
150150
done

0 commit comments

Comments
 (0)