mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 18:53:52 +08:00
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: Amit Cohen <amcohen@nvidia.com> Signed-off-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
907eea4868
commit
d1a7a48928
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user