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

case-lib/lib.sh: use sudo to access debugfs files #1172

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

plbossart
Copy link
Member

Apparently debugfs requires more care. Oh well.

Link: #1171

case-lib/lib.sh Outdated
@@ -831,7 +831,7 @@ is_ipc4()
fi

dlogw "using pre kernel 6.9 backwards-compatible fallback with ipc_type kernel parameter"
if ipc_type=$(cat /sys/module/snd_sof_pci/parameters/ipc_type); then
if ipc_type=$(sudo cat /sys/module/snd_sof_pci/parameters/ipc_type); then
Copy link
Collaborator

@marc-hb marc-hb Apr 9, 2024

Choose a reason for hiding this comment

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

This does not seem required. When running sof_insert/sof_remove I noticed sudo can be pretty slow, even slower on Fedora I think. Of course we should ideally cache the result of is_ipc4() but right now we don't.

EDIT: also, sudo creates a lot of journalctl noise already.

marc-hb
marc-hb previously approved these changes Apr 10, 2024
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.

Tests results look good. Very small change that gets rid of very confusing error messages: merging.

@marc-hb
Copy link
Collaborator

marc-hb commented Apr 10, 2024

@plbossart want to keep this a draft still? If not then please merge

@plbossart plbossart marked this pull request as ready for review April 10, 2024 17:56
@plbossart plbossart requested a review from a team as a code owner April 10, 2024 17:56
@plbossart
Copy link
Member Author

I missed one:

grep: /sys/kernel/debug/sof/fw_profile/*: Permission denied

Apparently debugfs requires more care. Oh well.

Link: thesofproject#1171
Signed-off-by: Pierre-Louis Bossart <[email protected]>
@marc-hb marc-hb merged commit 46219fa into thesofproject:main Apr 10, 2024
4 of 6 checks passed
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.

3 participants