From 8341638878285ac57500efc4d7c21af23dfce48c Mon Sep 17 00:00:00 2001 From: Chao Song Date: Wed, 17 Jan 2024 15:35:26 +0800 Subject: [PATCH] lib.sh: Workaround sof-test output alignment issue If sof-test test case is run manually and locally, the output of sof-test is messy, the lines are not aligned left at the beginning of each line, some lines start in the middle of a line, which makes the output log hard to follow. This patch helps to workaround the above issue. Link: https://github.com/thesofproject/sof-test/issues/1151 Signed-off-by: Chao Song --- case-lib/lib.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/case-lib/lib.sh b/case-lib/lib.sh index 2f1a6f2e..32009bf2 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -373,8 +373,10 @@ 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 # shellcheck disable=SC2024 - sudo "${mtraceCmd[@]}" >& "$clogfile" & + sudo bash -c "${mtraceCmd[*]} >& $clogfile &" } func_lib_log_post_process()