Skip to content

Commit 69041cd

Browse files
committed
shellcheck fixes
Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
1 parent 688118d commit 69041cd

7 files changed

+12
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ do
6565
fi
6666
done
6767

68-
for i in $(seq 1 $loop_cnt)
68+
for i in $(seq 1 "$loop_cnt")
6969
do
7070
for fmt in $fmts
7171
do

test-case/check-ipc-flood.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ sof-kernel-dump.sh | grep sof-audio | grep -q "Firmware debug" ||
4646
func_lib_check_sudo
4747

4848
dlogi "Check $ipc_flood_dfs"
49-
sudo test -e $ipc_flood_dfs ||
49+
sudo test -e "$ipc_flood_dfs" ||
5050
skip_test "${BASH_SOURCE[0]} need $ipc_flood_dfs to run the test case"
5151

5252
dlogi "Running ipc flood test!"
5353

54-
for i in $(seq 1 $loop_cnt)
54+
for i in $(seq 1 "$loop_cnt")
5555
do
5656
# TODO: use journalctl to replace dmesg
5757
# cleanup dmesg buffer for each iteration

test-case/check-keyword-detection.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ _restore_default_wov_config_bolb()
106106
# update the blob
107107
_update_blob(){
108108
new_blob=$test_dir"/new_blob"
109-
[ $preamble_time -ge $history_depth ] || {
109+
[ "$preamble_time" -ge "$history_depth" ] || {
110110
die "Warning: invalid arguments, preamble_time must be greater than or equal to history_depth"
111111
}
112112
awk -F, -v OFS=, '{if ( $4 == '"$def_pt"' && $7 == '"$def_hd"' ) $4='"$preamble_time"'; $7='"$history_depth"'}1' \

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ loop_cnt=${OPT_VAL['l']}
4444
PATH="${PATH%%:*}/kmod:$PATH"
4545
func_lib_check_sudo 'unloading modules'
4646

47-
if [ ${OPT_VAL['p']} -eq 1 ];then
47+
if [ "${OPT_VAL['p']}" -eq 1 ];then
4848
func_lib_disable_pulseaudio
4949
fi
5050

51-
for idx in $(seq 1 $loop_cnt)
51+
for idx in $(seq 1 "$loop_cnt")
5252
do
5353
dlogi "===== Starting iteration $idx of $loop_cnt ====="
5454
## - 1: remove module section

test-case/check-pause-release-suspend-resume.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ esac
115115

116116
logger_disabled || func_lib_start_log_collect
117117

118+
setup_kernel_check_point
119+
118120
dlogi "Entering audio stream expect script with: $cmd -D $pcm -r $rate -c $channel -f $fmt -vv -i $dummy_file -q"
119121
dlogi "Will enter suspend-resume cycle during paused period of audio stream process"
120122

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ func_check_dsp_status()
5050
}
5151

5252
func_opt_parse_option "$@"
53+
setup_kernel_check_point
5354

5455
tplg=${OPT_VAL['t']}
5556
loop_count=${OPT_VAL['l']}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ esac
6363
func_stop_start_pipeline()
6464
{
6565
local i=1
66-
while [ $i -le $count ]
66+
while [ $i -le "$count" ]
6767
do
6868
# check aplay/arecord process state
6969
sof-process-state.sh "$pid" >/dev/null || {
@@ -74,10 +74,10 @@ func_stop_start_pipeline()
7474
dlogi "Stop/start count: $i"
7575
# stop the pipeline
7676
kill -SIGSTOP "$pid"
77-
sleep $interval
77+
sleep "$interval"
7878
# start the pipeline
7979
kill -SIGCONT "$pid"
80-
sleep $interval
80+
sleep "$interval"
8181
(( i++ ))
8282
done
8383
}

0 commit comments

Comments
 (0)