Skip to content

Commit

Permalink
apause.exp: catch and print error messages and exit immediately
Browse files Browse the repository at this point in the history
Fail fast and avoid timeouts.

This is especially important considering pause will soon be disabled by
default:
- thesofproject/linux#5041

Signed-off-by: Marc Herbert <[email protected]>
  • Loading branch information
marc-hb committed Aug 1, 2024
1 parent 2e0ebd4 commit e5f9248
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions case-lib/apause.exp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,20 @@ set volume_always_zero true

expect {

# `man re_syntax` claims that Tcl regular expressions are compliant
# with the basic and extended POSIX ones while adding a 3rd,
# extended flavor. It's not clear which flavor `expect -re` uses
# but it's not the basic one.
# Use {} not "" to avoid quoting issues and backslash proliferation.

# When multiple patterns match, first pattern wins.

-nocase -re {error.*\r|PAUSE.*no[[:blank:]]*hw[[:blank:]]*support.*\r} {
set buffer_with_lf "[cr_to_lf $expect_out(buffer)]"
log 0 "ERROR: $buffer_with_lf"
exit 1
}

# Volume xx% or MAX line
#
# When not backpressured by a sleeping (=bad!) Expect process,
Expand Down

0 comments on commit e5f9248

Please sign in to comment.