Skip to content

Commit 2c1dd4c

Browse files
dsaherndavem330
authored andcommitted
selftests: Fix suppress test in fib_tests.sh
fib_tests is spewing errors: ... Cannot open network namespace "ns1": No such file or directory Cannot open network namespace "ns1": No such file or directory Cannot open network namespace "ns1": No such file or directory Cannot open network namespace "ns1": No such file or directory ping: connect: Network is unreachable Cannot open network namespace "ns1": No such file or directory Cannot open network namespace "ns1": No such file or directory ... Each test entry in fib_tests is supposed to do its own setup and cleanup. Right now the $IP commands in fib_suppress_test are failing because there is no ns1. Add the setup/cleanup and logging expected for each test. Fixes: ca7a03c ("ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule") Signed-off-by: David Ahern <[email protected]> Cc: Jason A. Donenfeld <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent d5812a8 commit 2c1dd4c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/testing/selftests/net/fib_tests.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,16 +618,22 @@ fib_nexthop_test()
618618

619619
fib_suppress_test()
620620
{
621+
echo
622+
echo "FIB rule with suppress_prefixlength"
623+
setup
624+
621625
$IP link add dummy1 type dummy
622626
$IP link set dummy1 up
623627
$IP -6 route add default dev dummy1
624628
$IP -6 rule add table main suppress_prefixlength 0
625-
ping -f -c 1000 -W 1 1234::1 || true
629+
ping -f -c 1000 -W 1 1234::1 >/dev/null 2>&1
626630
$IP -6 rule del table main suppress_prefixlength 0
627631
$IP link del dummy1
628632

629633
# If we got here without crashing, we're good.
630-
return 0
634+
log_test 0 0 "FIB rule suppress test"
635+
636+
cleanup
631637
}
632638

633639
################################################################################

0 commit comments

Comments
 (0)