-
Notifications
You must be signed in to change notification settings - Fork 49
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
kmod: sof_remove: Drop Pulseaudio test and stop including case-lib/li… #1169
kmod: sof_remove: Drop Pulseaudio test and stop including case-lib/li… #1169
Conversation
…b.sh The PA test does not make much sense anymore as distros are moving or moved to use PW and the audio servers should have been disabled in the DUT anyways to not interfere with tests (PA/PW will probe the new card on module load for example). Including case-lib/lib.sh have the side effect that it will 'start a test'. This involves checking if the firmware is booted, but if we have booted up in legacy or DSPless mode the script aborts and one has to figure out [1] how to force the script to do what it supposed to be doing: removing the modules. This is a helper script, not a test case. [1] NO_POLL_FW_LOADING=false tools/kmod/sof_remove.sh Signed-off-by: Peter Ujfalusi <[email protected]>
True, but this is a helper script and it invokes the whole sof-test infra to 'run a test', which fails under certain cases and it is not a friendly endeavor to figure out how to just remove the modules. |
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.
Thanks @ujfalusi , good catch.
Totally agree that this is not a "test-case" and that pulling the entire lib.sh
dependency is way too much.
Also, that lib.sh
has become "too heavy" (as you noted: "starting a test"...) and should probably be broken down but that's for another day.
This being said pulseaudio is still in Ubuntu 22 LTS. Ubuntu 24 LTS is around the corner but not quite there yet. Not sure about other Linux distros. We want to keep a reasonable amount of "backwards compatibility" for a reasonable amount of time.
I just noticed the function systemctl_show_pulseaudio
is relatively short and used only in sof_remove.sh
. So how about you just move the former to the latter? Maybe not the best "architecture" but very simple change and problem solved.
BTW: a2062a3
Actually, merely moving that A good place to invoke |
func_exit_handler() makes sense only when used with start_test() start_test() is a "mandatory" right now because it's invoked from lib.sh. But this is wrong because it should be possible to import lib.sh functions without actually running anything and it's causing various issues like sof_remove.sh depending on the firmware being loaded, see discussion in thesofproject#1169 This commit will make it possible NOT to use start_test(). Signed-off-by: Marc Herbert <[email protected]>
Of course there are a few unexpected complications but I think I have it. First part is here, please review: |
@marc-hb, @plbossart, it is fine to make the case-lib leaner, but the point is still why the helper script needs to include that? |
Work in progress in |
I think my previous comment missed your point, sorry I read too fast. This previous suggestion of mine is hopefully more relevant:
I really don't see why anyone would NOT want to copy the entire sof-test tree sorry. |
I got the point, but I don't see why removing modules should depend on systemd. And if PA/PW is using the card, the sof_remove will just wait until the module can be removed. By this logic we should be also looking for dtrace/mtrace/aplay/arecord/crecord? What I'm saying is that if you are running the tests then yes, PA (and PW) should be disabled, no question about that, but it is the test case lib which should be testing this. |
sof_remote.sh does not really "depend" on systemd. It only tries to invoke systemd to provide more information on failure because pulseaudio is/was the most common culprit by one order of magnitude. If you don't have systemd[*] then that will fail too but by that time it does not matter much any more, does it? Two failures or one failure is just a FAIL either way. [*] ... then you probably Peter Ujfalusi? :-D |
func_exit_handler() makes sense only when used with start_test() start_test() is a "mandatory" right now because it's invoked from lib.sh. But this is wrong because it should be possible to import lib.sh functions without actually running anything and it's causing various issues like sof_remove.sh depending on the firmware being loaded, see discussion in thesofproject#1169 This commit will make it possible NOT to use start_test(). Signed-off-by: Marc Herbert <[email protected]>
func_exit_handler() makes sense only when used with start_test() start_test() is a "mandatory" right now because it's invoked from lib.sh. But this is wrong because it should be possible to import lib.sh functions without actually running anything and it's causing various issues like sof_remove.sh depending on the firmware being loaded, see discussion in #1169 This commit will make it possible NOT to use start_test(). Signed-off-by: Marc Herbert <[email protected]>
Submitted in #1187, all PR tests passing. With it sof_remove.sh does not "start a test" anymore. |
This makes is possible to use this file separately from sof-test, as requested in thesofproject#1169. Signed-off-by: Marc Herbert <[email protected]>
I make This means you can copy sof_remove.sh alone to a different device and it still works. Please review.
I don't know about pulseaudio but that's not what happens with
These are not daemons and don't have a life of their own.
|
Thank you, see my comment on #1220.
OK, that might be the case, probably I saw the wait with still running mtrace... I agree, it is better to not wait, but fail for CI.
Right, but it expects atm that at least once the firmware was booted, it should not care about that. Imho the |
Closing for now as sof_remove.sh appears to be working now without hiccups. Thanks @marc-hb for the updates, one of them surely fixed this! |
That was never by design. It was by lack of design :-) I fixed that particular issue a while ago in commit 7c2ede0. Maybe you were on vacation at the time? :-) EDIT: you were not; you commented!
|
This makes is possible to use this file separately from sof-test, as requested in thesofproject#1169. Signed-off-by: Marc Herbert <[email protected]>
This makes is possible to use this file separately from sof-test, as requested in #1169. Signed-off-by: Marc Herbert <[email protected]>
…b.sh
The PA test does not make much sense anymore as distros are moving or moved to use PW and the audio servers should have been disabled in the DUT anyways to not interfere with tests (PA/PW will probe the new card on module load for example).
Including case-lib/lib.sh have the side effect that it will 'start a test'. This involves checking if the firmware is booted, but if we have booted up in legacy or DSPless mode the script aborts and one has to figure out [1] how to force the script to do what it supposed to be doing: removing the modules.
This is a helper script, not a test case.
[1]
NO_POLL_FW_LOADING=false tools/kmod/sof_remove.sh
Signed-off-by: Peter Ujfalusi [email protected]