Skip to content

selftests: forwarding: Updates to sysctl handling

Petr Machata linux-kselftest netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()tools/testing/selftests/net/forwarding/lib.sh+17 -00 replies
2/3selftests: forwarding: Use sysctl_set(), sysctl_restore()tools/testing/selftests/net/forwarding/lib.sh tools/testing/selftests/net/forwarding/mirror_gre_changes.sh tools/testing/selftests/net/forwarding/router_multipath.sh+10 -200 replies
3/3selftests: forwarding: mirror_gre_nh: Unset RP filtertools/testing/selftests/net/forwarding/mirror_gre_nh.sh+6 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchIdo Schimmel
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next mlxsw 0/3] 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.

Petr Machata (3):
selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()
selftests: forwarding: Use sysctl_set(), sysctl_restore()
selftests: forwarding: mirror_gre_nh: Unset RP filter

 tools/testing/selftests/net/forwarding/lib.sh      | 28 ++++++++++++++++------
 .../selftests/net/forwarding/mirror_gre_changes.sh |  7 ++----
 .../selftests/net/forwarding/mirror_gre_nh.sh      |  6 +++++
 .../selftests/net/forwarding/router_multipath.sh   | 12 ++++------
 4 files changed, 33 insertions(+), 20 deletions(-)
Signature · 6 lines
2.4.11

--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html