[LTP] [PATCH 2/3] network/tst_net.sh: fix busybox/sysctl in tst_set_sysctl()

Alexey Kodanev
2021-08-04T12:04:45Z

busybox/sysctl expects -e option to be set before 'name=value'.
This can easily be fixed by splitting the string in tst_set_sysctl(),
so that 'rparam' with '-e' option is added in between.

Signed-off-by: Alexey Kodanev <aleksei.kodanev@bell-sw.com>
---
testcases/lib/tst_net.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 511fb7eb1..bb30c13ec 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -918,7 +918,7 @@ tst_set_sysctl()
local rparam=
[ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'"

- tst_net_run $safe $rparam "sysctl -q -w $name=$value"
+ tst_net_run $safe $rparam "sysctl -q -w" "$name=$value"
}

tst_cleanup_rhost()
--
2.25.1