Skip to content

Commit 9fd1f46

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 d1628af commit 9fd1f46

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

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

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

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

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

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

8082
func_opt_parse_option "$@"
@@ -107,7 +109,7 @@ setup_kernel_check_point
107109

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

110-
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
112+
for idx in $(seq 0 $((PIPELINE_COUNT - 1)))
111113
do
112114
channel=$(func_pipeline_parse_value "$idx" channel)
113115
rate=$(func_pipeline_parse_value "$idx" rate)
@@ -178,8 +180,7 @@ AUDIO
178180
#flush the output
179181
echo
180182
if [ $ret -ne 0 ]; then
181-
sof-process-kill.sh
182-
[[ $? -ne 0 ]] && dlogw "Kill process catch error"
183+
sof-process-kill.sh || dlogw "Kill process catch error"
183184
exit $ret
184185
fi
185186
sof-kernel-log-check.sh "$KERNEL_CHECKPOINT" || die "Caught error in kernel log"

0 commit comments

Comments
 (0)