Skip to content

Conversation

@marc-hb
Copy link
Collaborator

@marc-hb marc-hb commented Nov 18, 2020

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

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>
Copy link

@aiChaoSONG aiChaoSONG left a 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
)

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.

Copy link
Collaborator Author

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?

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

Copy link
Collaborator Author

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

#523

@marc-hb
Copy link
Collaborator Author

marc-hb commented Nov 18, 2020

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 aiChaoSONG marked this pull request as ready for review November 18, 2020 07:19
@aiChaoSONG aiChaoSONG requested a review from a team as a code owner November 18, 2020 07:19
Copy link

@aiChaoSONG aiChaoSONG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aiChaoSONG aiChaoSONG merged commit 481e56f into thesofproject:master Nov 18, 2020
@marc-hb marc-hb deleted the multi-regression branch November 18, 2020 07:25
marc-hb added a commit to marc-hb/sof-test that referenced this pull request Nov 18, 2020
... 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>
marc-hb added a commit to marc-hb/sof-test that referenced this pull request Nov 18, 2020
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>
marc-hb added a commit to marc-hb/sof-test that referenced this pull request Nov 18, 2020
... 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>
marc-hb added a commit to marc-hb/sof-test that referenced this pull request Nov 23, 2020
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>
marc-hb added a commit that referenced this pull request Nov 24, 2020
As suggested by Chao in #521

Also remove no-op exit $? on the last line.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
marc-hb added a commit to marc-hb/sof-test that referenced this pull request Dec 1, 2020
... 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>
xiulipan pushed a commit that referenced this pull request Dec 1, 2020
... 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants