Commit d1a7a489 authored by Amit Cohen's avatar Amit Cohen Committed by Jakub Kicinski

selftests: Extend fib tests to run with and without flags notifications

Run the test cases with both `fib_notify_on_flag_change` sysctls set to
'1', and then with both sysctls set to '0' to verify there are no
regressions in the test when notifications are added.
Signed-off-by: default avatarAmit Cohen <amcohen@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 907eea48
......@@ -225,6 +225,16 @@ ipv6_local_replace()
ip -n $ns link del dev dummy1
}
fib_notify_on_flag_change_set()
{
local notify=$1; shift
ip netns exec testns1 sysctl -qw net.ipv4.fib_notify_on_flag_change=$notify
ip netns exec testns1 sysctl -qw net.ipv6.fib_notify_on_flag_change=$notify
log_info "Set fib_notify_on_flag_change to $notify"
}
setup_prepare()
{
ip netns add testns1
......@@ -251,6 +261,10 @@ trap cleanup EXIT
setup_prepare
fib_notify_on_flag_change_set 1
tests_run
fib_notify_on_flag_change_set 0
tests_run
exit $EXIT_STATUS
......@@ -302,6 +302,16 @@ ipv6_error_path()
ipv6_error_path_replay
}
fib_notify_on_flag_change_set()
{
local notify=$1; shift
ip netns exec testns1 sysctl -qw net.ipv4.fib_notify_on_flag_change=$notify
ip netns exec testns1 sysctl -qw net.ipv6.fib_notify_on_flag_change=$notify
log_info "Set fib_notify_on_flag_change to $notify"
}
setup_prepare()
{
local netdev
......@@ -336,6 +346,10 @@ trap cleanup EXIT
setup_prepare
fib_notify_on_flag_change_set 1
tests_run
fib_notify_on_flag_change_set 0
tests_run
exit $EXIT_STATUS
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment