Skip to content
Commit 2e518551 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'selftests-forwarding-sysctl'



Petr Machata says:

====================
selftests: forwarding: Updates to sysctl handling

Some selftests need to adjust sysctl settings. In order to be neutral to
the system that the test is run on, it is a good practice to change back
to the original setting after the test ends. That involves some
boilerplate that can be abstracted away.

In patch #1, introduce two functions, sysctl_set() and sysctl_restore().
The former stores the current value of a given setting, and sets a new
value. The latter restores the setting to the previously-stored value.

In patch #2, use these wrappers in a number of tests.

Additionally in patch #3, fix a problem in mirror_gre_nh.sh, which
neglected to set a sysctl that's crucial for the test to work.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 41f40546 7eaaf0bc
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