Skip to content

lib.sh: disable logging with SOF_LOGGING=none env or missing .ldc - #813

Merged
marc-hb merged 1 commit into
thesofproject:mainfrom
marc-hb:no-logger
Dec 2, 2021
Merged

lib.sh: disable logging with SOF_LOGGING=none env or missing .ldc#813
marc-hb merged 1 commit into
thesofproject:mainfrom
marc-hb:no-logger

Conversation

@marc-hb

Copy link
Copy Markdown
Collaborator

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 marc.herbert@intel.com

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 <marc.herbert@intel.com>
@marc-hbmarc-hb changed the title lib.sh: disable logging with SOF_LOGGING=false env or missing .ldclib.sh: disable logging with SOF_LOGGING=none env or missing .ldcDec 1, 2021
@marc-hb
marc-hb marked this pull request as ready for review December 1, 2021 02:22
@marc-hb
marc-hb requested a review from a team as a code ownerDecember 1, 2021 02:22
@marc-hb

Copy link
Copy Markdown
CollaboratorAuthor

Need to fix the commit message.

@marc-hb

marc-hb commented Dec 1, 2021

Copy link
Copy Markdown
CollaboratorAuthor

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
EDIT: newer https://sof-ci.01.org/softestpr/PR813/build936/devicetest/ with no code difference has only failure 3283

To really test this in CI (in addition to extensive testing locally) I hardcoded SOF_LOGGING=none in throw-away PR #814. The results in https://sof-ci.01.org/softestpr/PR814/build935/devicetest/ look good: all tests passed or skipped without any FW logs - except for the (very special/different) sof-logger test which passed with FW logs.

Comment threadcase-lib/lib.sh
# 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'

@greg-intelgreg-intelDec 1, 2021

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
CollaboratorAuthor

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.

Comment threadcase-lib/lib.sh
fi

# ... across all tests at once.
# In the future we should support SOF_LOGGING=etrace (only), see

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
CollaboratorAuthor

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.

@fredoh9fredoh9 left a comment

Copy link
Copy Markdown
Contributor

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

  1. no ldc file in the system
  2. OPT_VAL['s'] == 0
  3. $SOF_LOGGING == none

@marc-hbmarc-hb left a comment

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

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

Thanks for the quick reviews. As this (and #811 before it) is eagerly waited, I will merge in 6-7 hours if no one requests any change. Sorry for the short notice (not so short when including earlier discussions in #811)

Comment threadcase-lib/lib.sh
fi

# ... across all tests at once.
# In the future we should support SOF_LOGGING=etrace (only), see

Copy link
Copy Markdown
CollaboratorAuthor

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.

Comment threadcase-lib/lib.sh
# 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'

Copy link
Copy Markdown
CollaboratorAuthor

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.

@marc-hb
marc-hb merged commit 982f92d into thesofproject:mainDec 2, 2021
@marc-hb
marc-hb deleted the no-logger branch December 2, 2021 04:50
Sign up for freeto 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.

4 participants

@marc-hb@fredoh9@aiChaoSONG@greg-intel