• Amit Cohen's avatar
    selftests: netdevsim: Add fib_notifications test · 19d36d29
    Amit Cohen authored
    Add test to check fib notifications behavior.
    
    The test checks route addition, route deletion and route replacement for
    both IPv4 and IPv6.
    
    When fib_notify_on_flag_change=0, expect single notification for route
    addition/deletion/replacement.
    
    When fib_notify_on_flag_change=1, expect:
    - two notification for route addition/replacement, first without RTM_F_TRAP
      and second with RTM_F_TRAP.
    - single notification for route deletion.
    
    $ ./fib_notifications.sh
    TEST: IPv4 route addition                                           [ OK ]
    TEST: IPv4 route deletion                                           [ OK ]
    TEST: IPv4 route replacement                                        [ OK ]
    TEST: IPv6 route addition                                           [ OK ]
    TEST: IPv6 route deletion                                           [ OK ]
    TEST: IPv6 route replacement                                        [ OK ]
    Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    19d36d29
fib_notifications.sh 6.41 KB