* [LTP] [PATCH] lib/tst_net.sh: fix tst_set_sysctl() for non-netns setup
@ 2019-01-09 12:57 Alexey Kodanev
2019-01-10 14:51 ` Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kodanev @ 2019-01-09 12:57 UTC (permalink / raw)
To: ltp
When we don't use netns setup, $rparam is empty in tst_set_sysctl(),
and tst_net_run() mistakenly set sysctl command to $rparam. This results
to the following error, $cmd is empty:
bbr01 1 TINFO: timeout per run is 0h 20m 0s
bbr01 1 TINFO: emulate congestion with packet loss 0.5%
bbr01 1 TINFO: compare 'cubic' and 'bbr' congestion alg. results
bbr01 1 TINFO: setting cubic
bbr01 1 TBROK: tst_net_run: command not defined
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
testcases/lib/tst_net.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh
index 209cf9b..eca616f 100644
--- a/testcases/lib/tst_net.sh
+++ b/testcases/lib/tst_net.sh
@@ -718,9 +718,9 @@ tst_set_sysctl()
[ "$3" = "safe" ] && safe="-s"
local rparam=
- [ "$TST_USE_NETNS" = "yes" ] && rparam="-e"
+ [ "$TST_USE_NETNS" = "yes" ] && rparam="-r -e"
- tst_net_run $safe -r $rparam "sysctl -q -w $name=$value"
+ tst_net_run $safe $rparam "sysctl -q -w $name=$value"
}
tst_cleanup_rhost()
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH] lib/tst_net.sh: fix tst_set_sysctl() for non-netns setup
2019-01-09 12:57 [LTP] [PATCH] lib/tst_net.sh: fix tst_set_sysctl() for non-netns setup Alexey Kodanev
@ 2019-01-10 14:51 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2019-01-10 14:51 UTC (permalink / raw)
To: ltp
Hi Alexey,
..
thanks for your fix. I pushed it with minor change (was not needed, but made
code more readable, I should have done it in original commit).
> local rparam=
> - [ "$TST_USE_NETNS" = "yes" ] && rparam="-e"
> + [ "$TST_USE_NETNS" = "yes" ] && rparam="-r -e"
[ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'"
Kind regards,
Petr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-10 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-09 12:57 [LTP] [PATCH] lib/tst_net.sh: fix tst_set_sysctl() for non-netns setup Alexey Kodanev
2019-01-10 14:51 ` Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox