Skip to content
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

test-case: rename pause-resume to pause-release #1025

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fredoh9
Copy link
Collaborator

@fredoh9 fredoh9 commented Apr 14, 2023

resume term leads to confusion with system resume. Nothing to do with system suspend/resume test. pause-release is more clear.

fixes: #792

test plan in SOF CI system also need to rename the command also when this is merged.

@fredoh9 fredoh9 requested a review from a team as a code owner April 14, 2023 21:01
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

I disagree sorry.

The only way to confuse "pause/resume" with suspend/resume is to ignore the first word! I've never seen anyone confusing "pause" with "suspend". So this is a whole lot of code churn and potential git conflicts for solving a minor issue.

The official man aplay calls it "pause/resume"

"release" is not the opposite of "pause", "release" is the opposite of "acquire". Morever, playing typically acquires resources while pausing releases them.

If other people think a change is really necessary then pause-unpause or pause-start would be better

Copy link
Contributor

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

A bit concerned with the transition time with existing scripts running check-pause-resume.sh getting broken with this -- see inline comment. Otherwise seems good.

test-case/check-pause-release.sh Outdated Show resolved Hide resolved
@plbossart
Copy link
Member

I support this change 100%, but the only want to avoid naming issues is to use the ALSA terminology:

check_pause_push_pause_release is a bit longer but will avoid any confusions.

And yes a symlink is required until all references to the old script are removed.

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 17, 2023

I support this change 100%, but the only want to avoid naming issues is to use the ALSA terminology:

Can you please share a link to the official ALSA terminology? I did a quick search but I only found "pause/resume" in man aplay.

check_pause_push_pause_release is a bit longer but will avoid any confusions.

What could the much shorter check-pause-unpause be confused with?

marc-hb added a commit to marc-hb/sof-test that referenced this pull request Apr 17, 2023
Now shellcheck clean before thesofproject#1025

Signed-off-by: Marc Herbert <[email protected]>
@plbossart
Copy link
Member

https://elixir.bootlin.com/linux/latest/source/include/sound/pcm.h#L100

this is a kernel test, let's use kernel terminology.

We have similar confusions in SoundWire between clock_pause, stretch, stop, resume, restart.

Use one set of words clearly linked to a well-defined concept is key. Unpause is not such a word, sorry.

@marc-hb marc-hb dismissed their stale review April 17, 2023 18:35

overruled

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 17, 2023

https://sof-ci.01.org/softestpr/PR1025/build285/devicetest/index.html?model=MTLP_RVP_NOCODEC&testcase=multiple-pause-resume-50 (internal 23679) failed with a strange warning (that did not cause the failure)

=== PAUSE ===                                                            
(50/50) pcm'Deepbuffer Port0' cmd'aplay' id'8': Wait for 49 ms before pause

(50/50) pcm'Deepbuffer Port0' cmd'aplay' id'8': Wait for 33 ms before release

2023-04-17 22:31:56 UTC [REMOTE_INFO] pipeline: Port2 with arecord
2023-04-17 22:31:56 UTC [REMOTE_INFO] pipeline: Deepbuffer Port0 with aplay
2023-04-17 22:31:56 UTC [REMOTE_INFO] Check expect exit status
2023-04-17 22:31:56 UTC [REMOTE_WARNING] SOF_TEST_TOP_PID=17709 already defined, multiple lib.sh inclusions?
declare -- cmd="journalctl_cmd --since=@1681770512"
2023-04-17 22:31:56 UTC [REMOTE_ERROR] pause release PID 19337 had non-zero exit status
2023-04-17 22:31:56 UTC [REMOTE_ERROR] Starting func_exit_handler(), exit status=1, FUNCNAME stack:
2023-04-17 22:31:56 UTC [REMOTE_ERROR]  die()  @  /home/ubuntu/sof-test/test-case/../case-lib/lib.sh
2023-04-17 22:31:56 UTC [REMOTE_ERROR]  main()  @  /home/ubuntu/sof-test/test-case/multiple-pause-resume.sh:191
2023-04-17 22:31:57 UTC [REMOTE_INFO] pkill -TERM -f mtrace-reader.py
2023-04-17 22:31:57 UTC [REMOTE_INFO] ktime=1755 sof-test PID=17709: ending
2023-04-17 22:31:57 UTC [REMOTE_INFO] Test Result: FAIL!

marc-hb added a commit that referenced this pull request Apr 17, 2023
Now shellcheck clean before #1025

Signed-off-by: Marc Herbert <[email protected]>
@marc-hb
Copy link
Collaborator

marc-hb commented Apr 18, 2023

shellcheck warnings fixed in #1026, minor conflict now, needs rebase.

@fredoh9
Copy link
Collaborator Author

fredoh9 commented Apr 19, 2023

rebased top of main

resume term leads to confusion with system resume. Nothing to do with
system suspend/resume test. pause-release is more clear.

Signed-off-by: Fred Oh <[email protected]>
To support backward compatibility, keep the symbolic link for
the time being.
check-pause-resume.sh -> check-pause-release.sh
multiple-pause-resume.sh -> multiple-pause-release.sh

Signed-off-by: Fred Oh <[email protected]>
plbossart
plbossart previously approved these changes Apr 19, 2023
@fredoh9 fredoh9 requested a review from marc-hb April 19, 2023 17:47
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

Instead of the symbolic links you could use an exec like in test-case/multiple-pipeline-capture.sh which would give you the possibility of printing a deprecation warning.

@fredoh9
Copy link
Collaborator Author

fredoh9 commented Apr 20, 2023

@marc-hb I take adding symbolic links is really short term solution. I could update the test case database in same time with the merge without the symbolic link. as soon as this merge.
I think adding a wrapper is over kill for real short time. I will submit a revert PR for the commit as soon as this merge.

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 20, 2023

There are always more users than you think. In fact there is already one in this repo that you missed, looks like you didn't git grep.

Renamed pause-resume to pause-release.
Ref link: thesofproject#1025

Signed-off-by: Fred Oh <[email protected]>
@fredoh9
Copy link
Collaborator Author

fredoh9 commented Apr 20, 2023

missed run-all-test.sh

@fredoh9 fredoh9 requested review from marc-hb and plbossart May 1, 2023 22:07
@fredoh9
Copy link
Collaborator Author

fredoh9 commented May 1, 2023

@marc-hb @plbossart @ranj063 do you have any comment for this PR?

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.

[FEATURE] Rename multiple-pause-resume to multi-pause-release
5 participants