33set -e
44
55# #
6- # # Case Name: Run multiple pipeline for pause resume
6+ # # Case Name: Run multiple pipeline for pause release
77# # Preconditions:
88# # N/A
99# # Description:
10- # # pickup multiple pipline to do pause resume
11- # # fake pause/resume with expect
10+ # # pickup multiple pipline to do pause release
11+ # # trigger pause/release with expect
1212# # expect sleep for sleep time then mocks spacebar keypresses ' ' to
13- # # cause resume action
13+ # # cause release action
1414# # Case step:
1515# # 1. run 1st pipeline
1616# # 2. pickup any other pipeline
17- # # 3. use expect to fake pause/resume in each pipeline
17+ # # 3. use expect to trigger pause/release in each pipeline
1818# # 4. go through with tplg file
1919# # Expect result:
2020# # no errors occur for either process
@@ -32,14 +32,14 @@ OPT_HAS_ARG['l']=1 OPT_VAL['l']=5
3232OPT_NAME[' c' ]=' count' OPT_DESC[' c' ]=' combine test pipeline count'
3333OPT_HAS_ARG[' c' ]=1 OPT_VAL[' c' ]=2
3434
35- OPT_NAME[' r' ]=' repeat' OPT_DESC[' r' ]=' pause resume repeat count'
35+ OPT_NAME[' r' ]=' repeat' OPT_DESC[' r' ]=' pause release repeat count'
3636OPT_HAS_ARG[' r' ]=1 OPT_VAL[' r' ]=5
3737
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'
38+ # pause/release interval will be a random value bounded by the min and max values below
39+ OPT_NAME[' i' ]=' min' OPT_DESC[' i' ]=' pause/release transition min value, unit is ms'
4040OPT_HAS_ARG[' i' ]=1 OPT_VAL[' i' ]=' 20'
4141
42- OPT_NAME[' a' ]=' max' OPT_DESC[' a' ]=' pause/resume transition max value, unit is ms'
42+ OPT_NAME[' a' ]=' max' OPT_DESC[' a' ]=' pause/release transition max value, unit is ms'
4343OPT_HAS_ARG[' a' ]=1 OPT_VAL[' a' ]=' 50'
4444
4545OPT_NAME[' s' ]=' sof-logger' OPT_DESC[' s' ]=" Open sof-logger trace the data will store at $LOG_ROOT "
101101done
102102[[ ${# pipeline_combine_lst[@]} -eq 0 ]] && dlogw " pipeline combine is empty" && exit 2
103103
104- func_pause_resume_pipeline ()
104+ func_pause_release_pipeline ()
105105{
106106 local idx=${pipeline_idx_lst[$1]} cmd=${cmd_idx_lst[$1]} file=${file_idx_lst[$1]}
107107 local channel; channel=$( func_pipeline_parse_value " $idx " channel)
@@ -128,7 +128,7 @@ expect {
128128 }
129129 "*PAUSE*" {
130130 set sleep_t [expr int([expr rand() * $rnd_range ]) + $rnd_min ]
131- puts "\r(\$ i/$repeat_count ) pcm'$pcm ' cmd'$cmd ' id'$idx ': Wait for \$ sleep_t ms before resume "
131+ puts "\r(\$ i/$repeat_count ) pcm'$pcm ' cmd'$cmd ' id'$idx ': Wait for \$ sleep_t ms before release "
132132 send " "
133133 after \$ sleep_t
134134 incr i
154154 declare -a pid_lst
155155 for idx in $pipeline_combine_str
156156 do
157- func_pause_resume_pipeline " $idx "
157+ func_pause_release_pipeline " $idx "
158158 pid_lst=(" ${pid_lst[@]} " $! )
159159 done
160160 # wait for expect script finished
176176 exit 1
177177 fi
178178 # now check for all expect quit status
179- # dump the pipeline combine, because pause resume will have too many operation log
179+ # dump the pipeline combine, because pause release will have too many operation log
180180 for idx in $pipeline_combine_str
181181 do
182182 pipeline_index=${pipeline_idx_lst[$idx]}
188188 do
189189 wait " $pid " || {
190190 sof-kernel-log-check.sh " $KERNEL_CHECKPOINT " || true
191- die " pause resume PID $pid had non-zero exit status"
191+ die " pause release PID $pid had non-zero exit status"
192192 }
193193 done
194194 done
0 commit comments