-
Notifications
You must be signed in to change notification settings - Fork 45
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: disable logging with SOF_LOGGING=none env or missing .ldc #813
Conversation
Some configurations don't support the logger. Others do but do not want to run it for various reasons. Supersedes thesofproject#811, see earlier discussions there. Signed-off-by: Marc Herbert <[email protected]>
Need to fix the commit message. |
https://sof-ci.01.org/softestpr/PR813/build934/devicetest has three known and unrelated issues: ADL NTP sync / too fast boot + very recent (5.6) "preemptible" regression thesofproject/linux#3283 + some rtcwake timeout To really test this in CI (in addition to extensive testing locally) I hardcoded |
# Some firmware/OS configurations do not support logging. | ||
ldcFile=$(find_ldc_file) || { | ||
dlogi '.ldc dictionary file not found, SOF logs collection disabled' | ||
return 0 # 0 is 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this comment is needed, as the script self documents on the line before. Or the comment can be on the line before the function definition, to clarify the outputs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's overkill. I will remove but only if someone requests some other changes because it does do not much harm either and uses very little real estate.
fi | ||
|
||
# ... across all tests at once. | ||
# In the future we should support SOF_LOGGING=etrace (only), see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need more clarification. In future we will support only etrace? why? slogger seems useful to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #726 referenced on the next line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I like this idea. logger_disabled() has 3 options to support
- no ldc file in the system
- OPT_VAL['s'] == 0
- $SOF_LOGGING == none
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fi | ||
|
||
# ... across all tests at once. | ||
# In the future we should support SOF_LOGGING=etrace (only), see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #726 referenced on the next line.
# Some firmware/OS configurations do not support logging. | ||
ldcFile=$(find_ldc_file) || { | ||
dlogi '.ldc dictionary file not found, SOF logs collection disabled' | ||
return 0 # 0 is 'true' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, it's overkill. I will remove but only if someone requests some other changes because it does do not much harm either and uses very little real estate.
Some configurations don't support the logger. Others do but do not want
to run it for various reasons.
Supersedes #811, see earlier discussions there.
Signed-off-by: Marc Herbert [email protected]