diff options
author | Alexey Kodanev <alexey.kodanev@oracle.com> | 2019-01-09 15:57:40 +0300 |
---|---|---|
committer | Petr Vorel <pvorel@suse.cz> | 2019-01-10 15:47:29 +0100 |
commit | 2869feb93231735fa5592144eceb89f2030eab48 (patch) | |
tree | a995d5eb7e86de5322dd628f311f9483e16538e1 /testcases/lib | |
parent | 0cd0d9ef09f0afb4e7419997a5974f373f32fcec (diff) |
lib/tst_net.sh: fix tst_set_sysctl() for non-netns setup
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
Fixes: 372d9201c ("net: Add tst_net_run helper")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
[pvorel: quote -e to make obvious it's parameter for -r, not another parameter]
Acked-by: Petr Vorel <pvorel@suse.cz>
Diffstat (limited to 'testcases/lib')
-rw-r--r-- | 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 4fe3a09a8..06b8ad61c 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -700,9 +700,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() |