Skip to content

Commit 265b6a6

Browse files
pevikmetan-ucw
authored andcommitted
net/virt_lib.sh: Fix quoting default variable on dash
Dash (and maybe some other posix shells) needs quoting whole argument, otherwise it's not able to assign: /opt/ltp/testcases/bin/ipvlan01.sh: 384: local: l2,mode: bad variable name /opt/ltp/testcases/bin/vlan01.sh: 360: local: ,protocol: bad variable name The problem was in $opt, change also $start_id to use the same convention. Fixes: dcacbcf ("network/virt: add test-case 01 to virt_lib.sh") 94aac42 ("network/virt: add test-case 02 to virt_lib.sh") Signed-off-by: Petr Vorel <[email protected]> Acked-by: Cyril Hrubis <[email protected]>
1 parent 1f011e5 commit 265b6a6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

testcases/network/virt/virt_lib.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ virt_netperf_msg_sizes()
356356
# OPTIONS - different options separated by comma.
357357
virt_test_01()
358358
{
359-
start_id=${start_id:-"1"}
360-
local opts=${1:-""}
359+
start_id="${start_id:-1}"
360+
local opts="${1:-}"
361361
local n=0
362362

363363
while true; do
@@ -380,8 +380,8 @@ virt_test_01()
380380
# OPTIONS - different options separated by comma.
381381
virt_test_02()
382382
{
383-
start_id=${start_id:-"1"}
384-
local opts=${1:-""}
383+
start_id="${start_id:-1}"
384+
local opts="${1:-}"
385385
local n=0
386386

387387
while true; do

0 commit comments

Comments
 (0)