Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions test-case/multiple-pause-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,28 @@ do
func_pause_resume_pipeline "$idx"
pid_lst=("${pid_lst[@]}" $!)
done
# wait for expect script finished
dlogi "wait for expect process finished"
# wait for aplay/arecord finished
dlogi "wait for expect/aplay/arecord process finished"
iwait=$max_wait_time
while [ $iwait -gt 0 ]
do
iwait=$((iwait - 1))
sleep 1s
[[ ! "$(pidof expect)" ]] && break
[[ ! "$(pidof expect aplay arecord)" ]] && break
done
# fix aplay/arecord last output
# Catch timout after the wait loop
echo
if [ "$(pidof expect)" ]; then
if [ "$(pidof expect aplay arecord)" ]; then
dloge "Still have expect process not finished after wait for $max_wait_time"
# list aplay/arecord processes
# list expect/aplay/arecord processes
pgrep -a -f expect || true
pgrep -a -f aplay || true
pgrep -a -f arecord || true

# kill aplay/arecord
sof-process-kill.sh ||
dlogw "Kill process catch error"

exit 1
fi
# now check for all expect quit status
Expand Down