Skip to content

Commit 661fd75

Browse files
committed
multiple-pause-resume: reduce min/max value for faster pause/resume
Faster pause/resume transition is more effective to find bugs. Default loop/repeat count are slightly increased. For thorough test, use -l/-r option to specify loop/repeat count. Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
1 parent c87c85f commit 661fd75

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

test-case/multiple-pause-resume.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,20 @@ OPT_NAME['t']='tplg' OPT_DESC['t']='tplg file, default value is env TPLG: $T
2727
OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG"
2828

2929
OPT_NAME['l']='loop' OPT_DESC['l']='loop count'
30-
OPT_HAS_ARG['l']=1 OPT_VAL['l']=3
30+
OPT_HAS_ARG['l']=1 OPT_VAL['l']=5
3131

3232
OPT_NAME['c']='count' OPT_DESC['c']='combine test pipeline count'
3333
OPT_HAS_ARG['c']=1 OPT_VAL['c']=2
3434

3535
OPT_NAME['r']='loop' OPT_DESC['r']='pause resume repeat count'
36-
OPT_HAS_ARG['r']=1 OPT_VAL['r']=3
36+
OPT_HAS_ARG['r']=1 OPT_VAL['r']=5
3737

38-
OPT_NAME['i']='min' OPT_DESC['i']='random range min value, unit is ms'
39-
OPT_HAS_ARG['i']=1 OPT_VAL['i']='100'
38+
# pause/resume interval will be a random value bounded by the min and max values below
39+
OPT_NAME['i']='min' OPT_DESC['i']='pause/resume transition min value, unit is ms'
40+
OPT_HAS_ARG['i']=1 OPT_VAL['i']='20'
4041

41-
OPT_NAME['a']='max' OPT_DESC['a']='random range max value, unit is ms'
42-
OPT_HAS_ARG['a']=1 OPT_VAL['a']='200'
42+
OPT_NAME['a']='max' OPT_DESC['a']='pause/resume transition max value, unit is ms'
43+
OPT_HAS_ARG['a']=1 OPT_VAL['a']='50'
4344

4445
OPT_NAME['s']='sof-logger' OPT_DESC['s']="Open sof-logger trace the data will store at $LOG_ROOT"
4546
OPT_HAS_ARG['s']=0 OPT_VAL['s']=1
@@ -139,7 +140,8 @@ exit 1
139140
END
140141
}
141142

142-
max_wait_time=$[ 10 * $repeat_count ]
143+
# to prevent infinite loop, 5 second per a repeat is plenty
144+
max_wait_time=$((5 * repeat_count))
143145

144146
for i in $(seq 1 $loop_count)
145147
do

0 commit comments

Comments
 (0)