]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: fib_nexthops: Add test cases for error routes deletion
authorIdo Schimmel <idosch@nvidia.com>
Sun, 21 Dec 2025 14:48:29 +0000 (16:48 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 30 Dec 2025 09:39:22 +0000 (10:39 +0100)
commit44741e9de29bff4911b045b961393c5d837f51ae
treee8a83610ae1f94982f423f06300a1be8904fc5b9
parentac782f4e3bfcde145b8a7f8af31d9422d94d172a
selftests: fib_nexthops: Add test cases for error routes deletion

Add test cases that check that error routes (e.g., blackhole) are
deleted when their nexthop is deleted.

Output without "ipv4: Fix reference count leak when using error routes
with nexthop objects":

 # ./fib_nexthops.sh -t "ipv4_fcnal ipv6_fcnal"

 IPv4 functional
 ----------------------
 [...]
       WARNING: Unexpected route entry
 TEST: Error route removed on nexthop deletion                       [FAIL]

 IPv6
 ----------------------
 [...]
 TEST: Error route removed on nexthop deletion                       [ OK ]

 Tests passed:  20
 Tests failed:   1
 Tests skipped:  0

Output with "ipv4: Fix reference count leak when using error routes
with nexthop objects":

 # ./fib_nexthops.sh -t "ipv4_fcnal ipv6_fcnal"

 IPv4 functional
 ----------------------
 [...]
 TEST: Error route removed on nexthop deletion                       [ OK ]

 IPv6
 ----------------------
 [...]
 TEST: Error route removed on nexthop deletion                       [ OK ]

 Tests passed:  21
 Tests failed:   0
 Tests skipped:  0

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://patch.msgid.link/20251221144829.197694-2-idosch@nvidia.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/fib_nexthops.sh