tests: lib: filter out SSP timeouts#1323
Merged
redzynix merged 1 commit intothesofproject:mainfrom Nov 26, 2025
Merged
Conversation
marc-hb
reviewed
Nov 18, 2025
case-lib/lib.sh
Outdated
| # Filter out SSP timeout errors which not relevant on older firmware | ||
| grep -v 'poll timeout reg .* mask .* val .* us .*' | \ | ||
| grep -v 'ssp_empty_tx_fifo() warning: timeout' | \ | ||
| grep -i --word-regexp -e 'ERR' -e 'ERROR' -e '<err>' -e OSError |
Collaborator
There was a problem hiding this comment.
This looks fragile and it's located in the main/critical spot. Also, it's losing the -B 2 and -A 1 context.
Do you really care about other errors on those old platforms? If not, you could just go all the way, extend 706a9d8 and ignore those legacy platforms completely.
If you still care about other errors on legacy systems, then it's simpler not to duplicate the first grep and not lose the context with only 2 greps like this:
SSP_timeout_msgs=(
-e 'poll timeout reg .* mask .* val .* us .*'
-e 'ssp_empty_tx_fifo() warning: timeout'
)
grep -v "${SSP_timeout_msgs[@]}" "$1" |
grep -B 2 -A 1 -i --word-regexp -e 'ERR' -e 'ERROR' -e '<err>' -e OSError So the last grep gives you the exit status wanted.
Or:
case "$platf" in
abd|def)
SSP_timeout_msgs=(
-e 'poll timeout reg .* mask .* val .* us .*'
-e 'ssp_empty_tx_fifo() warning: timeout'
);;
*)
# dummy string so it's never empty
SSP_timeout_msgs=(
-e dummy_ztring_Never_matches
) ;;
esac
grep -v "${SSP_timeout_msgs[@]}" "$1" |
grep -B 2 -A 1 -i --word-regexp -e 'ERR' -e 'ERROR' -e '<err>' -e OSError
Contributor
Author
There was a problem hiding this comment.
thank you for suggestion! you were absolutely correct, i have implemented and tested your example
2899439 to
f60ed8f
Compare
In legacy SSP driver, DMA request request is enabled during FIFO drain, causing DMA keeps filling FIFO and preventing empty, which leads to timeout. ERROR is logged by poll_for_register_delay() while ssp_empty_tx_fifo() returns WARN, so there is inconsistent error handling between this two functions. Issue#4369 describe issue on older firmware version. Signed-off-by: Mateusz Junkier <mateusz.junkier@intel.com>
f60ed8f to
9e5b09d
Compare
marc-hb
approved these changes
Nov 24, 2025
redzynix
approved these changes
Nov 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In legacy SSP driver, DMA request request is enabled during FIFO drain, causing DMA keeps filling FIFO and preventing empty, which leads to timeout. ERROR is logged by poll_for_register_delay() while ssp_empty_tx_fifo() returns WARN, so there is inconsistent error handling between this two functions.
Issue#4369 describe issue on older firmware version.