• Ido Schimmel's avatar
    selftests: fib_nexthops: Test blackhole nexthops when loopback goes down · 3a1099d3
    Ido Schimmel authored
    Test that blackhole nexthops are not flushed when the loopback device
    goes down.
    
    Output without previous patch:
    
     # ./fib_nexthops.sh -t basic
    
     Basic functional tests
     ----------------------
     TEST: List with nothing defined                                     [ OK ]
     TEST: Nexthop get on non-existent id                                [ OK ]
     TEST: Nexthop with no device or gateway                             [ OK ]
     TEST: Nexthop with down device                                      [ OK ]
     TEST: Nexthop with device that is linkdown                          [ OK ]
     TEST: Nexthop with device only                                      [ OK ]
     TEST: Nexthop with duplicate id                                     [ OK ]
     TEST: Blackhole nexthop                                             [ OK ]
     TEST: Blackhole nexthop with other attributes                       [ OK ]
     TEST: Blackhole nexthop with loopback device down                   [FAIL]
     TEST: Create group                                                  [ OK ]
     TEST: Create group with blackhole nexthop                           [FAIL]
     TEST: Create multipath group where 1 path is a blackhole            [ OK ]
     TEST: Multipath group can not have a member replaced by blackhole   [ OK ]
     TEST: Create group with non-existent nexthop                        [ OK ]
     TEST: Create group with same nexthop multiple times                 [ OK ]
     TEST: Replace nexthop with nexthop group                            [ OK ]
     TEST: Replace nexthop group with nexthop                            [ OK ]
     TEST: Nexthop group and device                                      [ OK ]
     TEST: Test proto flush                                              [ OK ]
     TEST: Nexthop group and blackhole                                   [ OK ]
    
     Tests passed:  19
     Tests failed:   2
    
    Output with previous patch:
    
     # ./fib_nexthops.sh -t basic
    
     Basic functional tests
     ----------------------
     TEST: List with nothing defined                                     [ OK ]
     TEST: Nexthop get on non-existent id                                [ OK ]
     TEST: Nexthop with no device or gateway                             [ OK ]
     TEST: Nexthop with down device                                      [ OK ]
     TEST: Nexthop with device that is linkdown                          [ OK ]
     TEST: Nexthop with device only                                      [ OK ]
     TEST: Nexthop with duplicate id                                     [ OK ]
     TEST: Blackhole nexthop                                             [ OK ]
     TEST: Blackhole nexthop with other attributes                       [ OK ]
     TEST: Blackhole nexthop with loopback device down                   [ OK ]
     TEST: Create group                                                  [ OK ]
     TEST: Create group with blackhole nexthop                           [ OK ]
     TEST: Create multipath group where 1 path is a blackhole            [ OK ]
     TEST: Multipath group can not have a member replaced by blackhole   [ OK ]
     TEST: Create group with non-existent nexthop                        [ OK ]
     TEST: Create group with same nexthop multiple times                 [ OK ]
     TEST: Replace nexthop with nexthop group                            [ OK ]
     TEST: Replace nexthop group with nexthop                            [ OK ]
     TEST: Nexthop group and device                                      [ OK ]
     TEST: Test proto flush                                              [ OK ]
     TEST: Nexthop group and blackhole                                   [ OK ]
    
     Tests passed:  21
     Tests failed:   0
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    3a1099d3
fib_nexthops.sh 48 KB