Skip to content

Commit dbd67f8

Browse files
author
Amery Song
committed
test-case: fix function argument degrading
If a shell function takes a variable as its argument, and the variable is empty, then the argument will degrade to nothing in the function. This patch adds quotes to function arguments to avoid argument degrading. No functional change, only add quotes. Signed-off-by: Amery Song <chao.song@intel.com>
1 parent 75af596 commit dbd67f8

19 files changed

+21
-21
lines changed

test-case/check-audio-equalizer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ duration=${OPT_VALUE_lst['d']}
3838
loop_cnt=${OPT_VALUE_lst['l']}
3939

4040
# import only EQ pipeline from topology
41-
func_pipeline_export $tplg "eq:any"
41+
func_pipeline_export "$tplg" "eq:any"
4242
sofcard=${SOFCARD:-0}
4343

4444
# Test equalizer

test-case/check-capture.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ file_prefix=${OPT_VALUE_lst['f']}
6161

6262
func_lib_setup_kernel_last_line
6363
func_lib_check_sudo
64-
func_pipeline_export $tplg "type:capture & ${OPT_VALUE_lst['S']}"
64+
func_pipeline_export "$tplg" "type:capture & ${OPT_VALUE_lst['S']}"
6565

6666
for round in $(seq 1 $round_cnt)
6767
do

test-case/check-fw-echo-reference.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ frequency=${OPT_VALUE_lst['f']}
4343

4444
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
4545

46-
func_pipeline_export $tplg "echo:any"
46+
func_pipeline_export "$tplg" "echo:any"
4747
func_lib_setup_kernel_last_line
4848

4949
if [ "$PIPELINE_COUNT" != "2" ]; then

test-case/check-keyword-detection.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ duration=${OPT_VALUE_lst['d']}
5454

5555
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
5656

57-
func_pipeline_export $tplg "kpbm:any"
57+
func_pipeline_export "$tplg" "kpbm:any"
5858
func_lib_setup_kernel_last_line
5959

6060
if test "$PIPELINE_COUNT" != "1"; then

test-case/check-kmod-load-unload-after-playback.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tplg=${OPT_VALUE_lst['t']}
5252
loop_cnt=${OPT_VALUE_lst['l']}
5353
pb_duration=${OPT_VALUE_lst['d']}
5454

55-
func_pipeline_export $tplg "type:playback"
55+
func_pipeline_export "$tplg" "type:playback"
5656

5757
func_lib_check_sudo
5858
# overwrite the subscript: test-case LOG_ROOT environment

test-case/check-pause-resume.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ esac
7474

7575
[[ -z $file_name ]] && file_name=$dummy_file
7676

77-
func_pipeline_export $tplg "type:$test_mode & ${OPT_VALUE_lst['S']}"
77+
func_pipeline_export "$tplg" "type:$test_mode & ${OPT_VALUE_lst['S']}"
7878
func_lib_setup_kernel_last_line
7979
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
8080
do

test-case/check-playback.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fi
6969

7070
func_lib_setup_kernel_last_line
7171
func_lib_check_sudo
72-
func_pipeline_export $tplg "type:playback & ${OPT_VALUE_lst['S']}"
72+
func_pipeline_export "$tplg" "type:playback & ${OPT_VALUE_lst['S']}"
7373

7474
for round in $(seq 1 $round_cnt)
7575
do

test-case/check-runtime-pm-double-active.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ APP_LST['capture']='arecord'
7070
DEV_LST['capture']='/dev/null'
7171

7272
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
73-
func_pipeline_export $tplg "type:any"
73+
func_pipeline_export "$tplg" "type:any"
7474
func_lib_setup_kernel_last_line
7575

7676
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))

test-case/check-runtime-pm-status.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ APP_LST['capture']='arecord'
6464
DEV_LST['capture']='/dev/null'
6565

6666
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
67-
func_pipeline_export $tplg "type:any"
67+
func_pipeline_export "$tplg" "type:any"
6868
func_lib_setup_kernel_last_line
6969

7070
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))

test-case/check-signal-stop-start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func_stop_start_pipeline()
8181
done
8282
}
8383

84-
func_pipeline_export $tplg "type:$test_mode"
84+
func_pipeline_export "$tplg" "type:$test_mode"
8585
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
8686
do
8787
channel=$(func_pipeline_parse_value $idx channel)

0 commit comments

Comments
 (0)