From 25b0ac520234cb3326c5cdadbea6b0b80666a338 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 21 Nov 2023 11:27:02 +0100 Subject: tests: shell: quote reference to array to iterate over empty string This patch restores coverage for non-interval set backend. Use "${FLAGS[@]}" in loop, otherwise empty string is skipped in the iteration. This snippet: FLAGS=("") available_flags FLAGS "single" for flags in "${FLAGS[@]}" ; do echo $flags done ... now shows the empty string: # bash test.sh interval Fixes: ed927baa4fd8 ("tests: shell: skip pipapo set backend in transactions/30s-stress") Signed-off-by: Pablo Neira Ayuso --- tests/shell/testcases/transactions/30s-stress | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/shell/testcases/transactions/30s-stress b/tests/shell/testcases/transactions/30s-stress index ef3e1d3e..e92b9226 100755 --- a/tests/shell/testcases/transactions/30s-stress +++ b/tests/shell/testcases/transactions/30s-stress @@ -324,7 +324,7 @@ random_elem() FLAGS=("") available_flags FLAGS $key - for flags in ${FLAGS[@]} ; do + for flags in "${FLAGS[@]}" ; do cnt=$((cnt+1)) if [ $f -ne fkr ] ;then f=$((f+1)) -- cgit v1.2.3