Skip to content

env-check: add sof-dyndbg.conf file check - #260

Closed
fredoh9 wants to merge 1 commit into
thesofproject:masterfrom
fredoh9:fix/check_dyndbg
Closed

fredoh9 wants to merge 1 commit into
thesofproject:masterfrom
fredoh9:fix/check_dyndbg

Conversation

@fredoh9

@fredoh9 fredoh9 commented Jun 24, 2020 •

Copy link
Copy Markdown
Contributor

Check sof-dyndbg.conf available in the system, give optional warning and
short usage of dyndbg for SOF modules.

Signed-off-by: Fred Oh fred.oh@linux.intel.com


Output file:

Optional: Enable dynamic debug logs on  /etc/modprobe.d/sof-dyndbg.conf  file
	For example,
	options snd_sof dyndbg=+p
	options snd_sof_pci dyndbg=+p

deploy.sh change will be merged soon. This can fix
#173

@fredoh9
fredoh9 requested review from Bin-QA and marc-hb as code owners June 24, 2020 18:11
@fredoh9
fredoh9 force-pushed the fix/check_dyndbg branch from 975bc36 to 2cf67cc Compare June 24, 2020 18:12
@fredoh9

fredoh9 commented Jun 24, 2020

Copy link
Copy Markdown
Contributor Author

Debug log verbosity was discussed in thesofproject/linux#2204 as well. Same sof-dyndbg.conf to all test devices are very much required.

Comment thread env-check.sh Outdated
@plbossart

Copy link
Copy Markdown
Member

Debug log verbosity was discussed in thesofproject/linux#2204 as well. Same sof-dyndbg.conf to all test devices are very much required.

right, but the contents of sof-dyndbg.conf should be discussed.

Comment thread env-check.sh Outdated
Comment thread env-check.sh Outdated
Comment thread env-check.sh Outdated
@fredoh9
fredoh9 force-pushed the fix/check_dyndbg branch from 2cf67cc to ac610ea Compare June 26, 2020 17:51
Comment thread env-check.sh Outdated

@marc-hb marc-hb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

missing quotes. First warning reported by shellcheck.

Comment thread env-check.sh Outdated
Comment thread env-check.sh Outdated
@fredoh9
fredoh9 force-pushed the fix/check_dyndbg branch 2 times, most recently from daa683c to 46f572d Compare July 30, 2020 21:56
@fredoh9
fredoh9 requested a review from marc-hb July 30, 2020 21:56
Check sof-dyndbg.conf available in the system, give optional warning and
print short usage of dyndbg for SOF modules.

ShellCheck error, SC2059 is ignored.
    printf '\e[31mWarning\e[0m\nSolution:'"$out_str"'\n'
           ^-- SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
@marc-hb
marc-hb self-requested a review July 30, 2020 22:17
Comment thread env-check.sh
echo -e "\e[31mWarning\e[0m\nSolution:"$out_str
# We know exactly what $out_str is, it's not some random and unsanitized input
# shellcheck disable=SC2059
printf '\e[31mWarning\e[0m\nSolution:'"$out_str"'\n'

@marc-hb marc-hb Jul 30, 2020 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This doesn't work, it prints the warning every time because the backslash applies only to the comment line. This totally confuses shellcheck BTW, did you run shellcheck?

false || \
# only the comment is "backslashed"
   printf 'RUNS ANYWAY'

Move # shellcheck disable earlier before the start of the "real line"

@marc-hb

marc-hb commented Aug 1, 2020

Copy link
Copy Markdown
Collaborator

re-submitted without the echo/printf change at #309

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