Skip to content

Commit 4eb3a0d

Browse files
author
Wanzhuo.Li
committed
pause-release-suspend-resume: fix the shellcheck warnings
Signed-off-by: Wanzhuo.Li <wanzhuox.li@intel.com>
1 parent 78953be commit 4eb3a0d

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ set -e
5353
## completion.
5454

5555
CASEDIR=$(dirname "${BASH_SOURCE[0]}")
56-
source $CASEDIR/../case-lib/lib.sh
56+
57+
# shellcheck source=case-lib/lib.sh
58+
source "$CASEDIR"/../case-lib/lib.sh
5759

5860
OPT_NAME['m']='mode' OPT_DESC['m']='test mode. Example: playback; capture'
5961
OPT_HAS_ARG['m']=1 OPT_VAL['m']='playback'
@@ -73,7 +75,7 @@ OPT_HAS_ARG['i']=1 OPT_VAL['i']='200'
7375
OPT_NAME['s']='sof-logger' OPT_DESC['s']="Open sof-logger trace the data will store at $LOG_ROOT"
7476
OPT_HAS_ARG['s']=0 OPT_VAL['s']=1
7577

76-
OPT_NAME['t']='tplg' OPT_DESC['t']='tplg file, default value is env TPLG: $TPLG'
78+
OPT_NAME['t']='tplg' OPT_DESC['t']='tplg path, default is environment variable: TPLG'
7779
OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG"
7880

7981
func_opt_parse_option "$@"
@@ -106,13 +108,12 @@ setup_kernel_check_point
106108

107109
func_pipeline_export "$tplg" "type:$test_mode & ${OPT_VAL['S']}"
108110

109-
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
111+
for idx in $(seq 0 $((PIPELINE_COUNT - 1)))
110112
do
111113
channel=$(func_pipeline_parse_value "$idx" channel)
112114
rate=$(func_pipeline_parse_value "$idx" rate)
113115
fmt=$(func_pipeline_parse_value "$idx" fmt)
114116
dev=$(func_pipeline_parse_value "$idx" dev)
115-
snd=$(func_pipeline_parse_value "$idx" snd)
116117

117118
dlogi "Entering audio stream expect script with:
118119
$cmd -D $dev -r $rate -c $channel -f $fmt -vv -i $file_name -q"
@@ -178,8 +179,7 @@ AUDIO
178179
#flush the output
179180
echo
180181
if [ $ret -ne 0 ]; then
181-
sof-process-kill.sh
182-
[[ $? -ne 0 ]] && dlogw "Kill process catch error"
182+
sof-process-kill.sh || dlogw "Kill process catch error"
183183
exit $ret
184184
fi
185185
sof-kernel-log-check.sh "$KERNEL_CHECKPOINT" || die "Caught error in kernel log"

0 commit comments

Comments
 (0)