On 2/28/21 7:26 AM, Ido Schimmel wrote:
> From: Ido Schimmel <ido...@nvidia.com>
> 
> Test that blackhole nexthops are not flushed when the loopback device
> goes down.
> 


> 
> Signed-off-by: Ido Schimmel <ido...@nvidia.com>
> ---
>  tools/testing/selftests/net/fib_nexthops.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/tools/testing/selftests/net/fib_nexthops.sh 
> b/tools/testing/selftests/net/fib_nexthops.sh
> index 4c7d33618437..d98fb85e201c 100755
> --- a/tools/testing/selftests/net/fib_nexthops.sh
> +++ b/tools/testing/selftests/net/fib_nexthops.sh
> @@ -1524,6 +1524,14 @@ basic()
>       run_cmd "$IP nexthop replace id 2 blackhole dev veth1"
>       log_test $? 2 "Blackhole nexthop with other attributes"
>  
> +     # blackhole nexthop should not be affected by the state of the loopback
> +     # device
> +     run_cmd "$IP link set dev lo down"
> +     check_nexthop "id 2" "id 2 blackhole"
> +     log_test $? 0 "Blackhole nexthop with loopback device down"
> +
> +     run_cmd "$IP link set dev lo up"
> +
>       #
>       # groups
>       #
> 

Thanks for adding a test.

Reviewed-by: David Ahern <dsah...@gmail.com>

Reply via email to