-
Notifications
You must be signed in to change notification settings - Fork 59
multiple-pipeline-capture.sh: fix recent set -e related regression #521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes 202507f ("multiple-pipeline: fix set -e compatibility and add it") that didn't pay attention to the fact that sof-process-state.sh returns 2 when there is no process match and broke the test when there are only aplay or only arecord commands but not both at the same time. This regression was observed (among others) at: https://sof-ci.01.org/linuxpr/PR2565/build4887/devicetest/?model=APL_UP2_NOCODEC&testcase=multiple-pipeline-capture Also fixes more minor set -e compatibility issues. I missed the failure in https://sof-ci.01.org/softestpr/PR497/build372/devicetest/?model=APL_UP2_NOCODEC&testcase=multiple-pipeline-capture because it was reported as "N/A" and not FAIL because Jenkins interprets an exit status '2' as N/A. I should have paid more attention. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
aiChaoSONG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
other part look good
| pgrep -a arecord | ||
| pkill -9 aplay | ||
| pkill -9 arecord | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about ! pgrep -a aplay || pkill -9 aplay, I think this should be compatible with set -e. the (set +e ...) looks like some hack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this a good idea and better code however I don't think it's worth delaying this very urgent fix and I don't think (set +e ...) is a hack at all
Is it enough if I promise to submit a follow up commit with your change ASAP after this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marc-hb sure, this is already good enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about ! pgrep -a aplay || pkill -9 aplay
|
I inspected https://sof-ci.01.org/softestpr/PR521/build405/devicetest/?model=APL_UP2_HDA&testcase=multiple-pipeline-capture which is N/A and it looks OK. This test is PASS on every other platform. |
aiChaoSONG
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
... because its normal output is typically discarded. This would have avoided regression 202507f / thesofproject#497 fixed by thesofproject#521. This could help with other multi pipelines issues. Also add a documentation header so not everyone has to read the entire code. Also add a warning about the massive copy/paste across multiple-pipeline-playback and multiple-pipeline-capture (these are the heaviest sof-process-state users). Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As suggested by Chao in thesofproject#521 Also remove no-op exit $? on the last line. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
... because its normal output is typically discarded. This would have avoided regression 202507f / thesofproject#497 fixed by thesofproject#521. This could help with other multi pipelines issues. Also add a documentation header so not everyone has to read the entire code. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As suggested by Chao in thesofproject#521 Also remove no-op exit $? on the last line. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
As suggested by Chao in #521 Also remove no-op exit $? on the last line. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
... because its normal output is typically discarded. This would have avoided regression 202507f / thesofproject#497 fixed by thesofproject#521. This could help with other multi pipelines issues. Also add a documentation header so not everyone has to read the entire code. When a process is not found just say so. No need for guesses and interpretations. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
... because its normal output is typically discarded. This would have avoided regression 202507f / #497 fixed by #521. This could help with other multi pipelines issues. Also add a documentation header so not everyone has to read the entire code. When a process is not found just say so. No need for guesses and interpretations. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Fixes 202507f ("multiple-pipeline: fix set -e compatibility and add
it") that didn't pay attention to the fact that sof-process-state.sh
returns 2 when there is no process match and broke the test when there
are only aplay or only arecord commands but not both at the same time.
This regression was observed (among others) at:
https://sof-ci.01.org/linuxpr/PR2565/build4887/devicetest/?model=APL_UP2_NOCODEC&testcase=multiple-pipeline-capture
Also fixes more minor set -e compatibility issues.
I missed the failure in
https://sof-ci.01.org/softestpr/PR497/build372/devicetest/?model=APL_UP2_NOCODEC&testcase=multiple-pipeline-capture
because it was reported as "N/A" and not FAIL because Jenkins interprets
an exit status '2' as N/A. I should have paid more attention.
Signed-off-by: Marc Herbert marc.herbert@intel.com