From 60b9fd425d5cc2458a99bcd3ee948eff2e7f2872 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Tue, 9 Apr 2024 18:25:12 -0500 Subject: [PATCH] case-lib/lib.sh: use sudo to access debugfs files Apparently debugfs requires more care. Oh well. Link: https://github.com/thesofproject/sof-test/issues/1171 Signed-off-by: Pierre-Louis Bossart --- case-lib/lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/case-lib/lib.sh b/case-lib/lib.sh index a87e20df..b5756442 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -304,7 +304,7 @@ get_ldc_subdir() test -e $fw_path_info || fw_path_info='/sys/module/snd_sof_pci/parameters/fw_path' - if fw_path=$(cat $fw_path_info); then + if fw_path=$(sudo cat $fw_path_info); then # "cat" was succesful if [ "$fw_path" != '(null)' ]; then subdir=${fw_path%/} # strip any trailing slash @@ -821,7 +821,7 @@ is_ipc4() { local ipc_type - if ipc_type=$(cat /sys/kernel/debug/sof/fw_profile/ipc_type); then + if ipc_type=$(sudo cat /sys/kernel/debug/sof/fw_profile/ipc_type); then # "cat" was successful case $ipc_type in 0) return 1;; # IPC3 found @@ -893,7 +893,7 @@ print_module_params() echo "----------------------------------------" echo "--------- Printing debugfs settings ----------" - grep -H ^ /sys/kernel/debug/sof/fw_profile/* || true + sudo grep -H ^ /sys/kernel/debug/sof/fw_profile/* || true echo "----------------------------------------------" }