Skip to content

Commit 2869feb

Browse files
akodanevpevik
authored andcommitted
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: 372d920 ("net: Add tst_net_run helper") Signed-off-by: Alexey Kodanev <[email protected]> [pvorel: quote -e to make obvious it's parameter for -r, not another parameter] Acked-by: Petr Vorel <[email protected]>
1 parent 0cd0d9e commit 2869feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testcases/lib/tst_net.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,9 +700,9 @@ tst_set_sysctl()
700700
[ "$3" = "safe" ] && safe="-s"
701701

702702
local rparam=
703-
[ "$TST_USE_NETNS" = "yes" ] && rparam="-e"
703+
[ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'"
704704

705-
tst_net_run $safe -r $rparam "sysctl -q -w $name=$value"
705+
tst_net_run $safe $rparam "sysctl -q -w $name=$value"
706706
}
707707

708708
tst_cleanup_rhost()

0 commit comments

Comments
 (0)