* [PATCH net] selftests: forwarding: lib: quote the sysctl values
@ 2023-02-08 3:21 Hangbin Liu
2023-02-08 11:30 ` Petr Machata
2023-02-09 10:10 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2023-02-08 3:21 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Jakub Kicinski, Paolo Abeni, Shuah Khan,
David Ahern, Petr Machata, 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 <liuhangbin@gmail.com>
---
tools/testing/selftests/net/forwarding/lib.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 1c4f866de7d7..3d8e4ebda1b6 100755
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -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()
--
2.38.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: forwarding: lib: quote the sysctl values
2023-02-08 3:21 [PATCH net] selftests: forwarding: lib: quote the sysctl values Hangbin Liu
@ 2023-02-08 11:30 ` Petr Machata
2023-02-09 10:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Petr Machata @ 2023-02-08 11:30 UTC (permalink / raw)
To: Hangbin Liu
Cc: netdev, David S. Miller, Jakub Kicinski, Paolo Abeni, Shuah Khan,
David Ahern, Petr Machata
Hangbin Liu <liuhangbin@gmail.com> writes:
> 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 <liuhangbin@gmail.com>
Yep, makes sense.
Reviewed-by: Petr Machata <petrm@nvidia.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] selftests: forwarding: lib: quote the sysctl values
2023-02-08 3:21 [PATCH net] selftests: forwarding: lib: quote the sysctl values Hangbin Liu
2023-02-08 11:30 ` Petr Machata
@ 2023-02-09 10:10 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-09 10:10 UTC (permalink / raw)
To: Hangbin Liu; +Cc: netdev, davem, kuba, pabeni, shuah, dsahern, petrm
Hello:
This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:
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 <liuhangbin@gmail.com>
> ---
> 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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-02-09 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08 3:21 [PATCH net] selftests: forwarding: lib: quote the sysctl values Hangbin Liu
2023-02-08 11:30 ` Petr Machata
2023-02-09 10:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).