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

lib.sh: workaround "sudo ... &" corruption issue 1151 for stable-v2.2 #1221

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,13 @@ func_mtrace_collect()

local mtraceCmd=("$MTRACE")
dlogi "Starting ${mtraceCmd[*]} >& $clogfile &"

# Cleaned up by func_exit_handler() in hijack.sh
# The use of 'bash -c' is a workaround for below issue:
# https://github.com/thesofproject/sof-test/issues/1151
#
# We need "bash -c" because "sudo ... &" corrupts the terminal among
# other issues, see bug #1151.
# shellcheck disable=SC2024
sudo bash -c "${mtraceCmd[*]} >& $clogfile &"
sudo bash -c "${mtraceCmd[*]} &" >& "$clogfile"
}

func_lib_log_post_process()
Expand Down Expand Up @@ -461,9 +463,13 @@ func_sof_logger_collect()
# shellcheck disable=SC2206
local loggerCmd=("$SOFLOGGER" $logopt -l "$ldcFile")
dlogi "Starting ${loggerCmd[*]} > $logfile &"

# Cleaned up by func_exit_handler() in hijack.sh
#
# We need "bash -c" because "sudo ... &" corrupts the terminal among
# other issues, see bug #1151.
# shellcheck disable=SC2024
sudo "${loggerCmd[@]}" > "$logfile" &
sudo bash -c "${loggerCmd[*]} &" > "$logfile"
}

SOF_LOG_COLLECT=0
Expand Down
Loading