selftests: forwarding: lib: quote the sysctl values
Subsystems (4)
PATCH 1/1 selftests: forwarding: lib: quote the sysctl values
When set/restore sysctl value, we should quote the value as some keys may have multi values, e.g. net.ipv4.ping_group_range
Fixes f5ae57784ba8 ("selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()")
Signed-off-by Hangbin Liu <[email protected]>
--- tools/testing/selftests/net/forwarding/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/forwarding/lib.sh +2 -2
@@ -914,14 +914,14 @@ sysctl_set() local value=$1; shift SYSCTL_ORIG[$key]=$(sysctl -n $key) - sysctl -qw $key=$value + sysctl -qw $key="$value" } sysctl_restore() { local key=$1; shift - sysctl -qw $key=${SYSCTL_ORIG["$key"]} + sysctl -qw $key="${SYSCTL_ORIG[$key]}" } forwarding_enable()
Signature · 1 line
2.38.1
Quoted 5 lines · Hangbin Liu
When set/restore sysctl value, we should quote the value as some keys may have multi values, e.g. net.ipv4.ping_group_range
Fixes f5ae57784ba8 ("selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()")Signed-off-by Hangbin Liu <[email protected]>
Yep, makes sense.
Reviewed-by Petr Machata <[email protected]>
This patch was applied to netdev/net.git (master) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <[email protected]>:
Quoted 8 lines · On Wed, 8 Feb 2023 11:21:10 +0800 you wrote:
When set/restore sysctl value, we should quote the value as some keys may have multi values, e.g. net.ipv4.ping_group_range
Fixes f5ae57784ba8 ("selftests: forwarding: lib: Add sysctl_set(), sysctl_restore()")Signed-off-by Hangbin Liu <[email protected]>--- tools/testing/selftests/net/forwarding/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net] selftests: forwarding: lib: quote the sysctl values
https://git.kernel.org/netdev/net/c/3a082086aa20
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html