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

Refine logger #1065

Closed
wants to merge 3 commits into from
Closed

Conversation

keqiaozhang
Copy link
Contributor

No description provided.

@keqiaozhang keqiaozhang marked this pull request as ready for review June 21, 2023 02:45
@keqiaozhang keqiaozhang requested a review from a team as a code owner June 21, 2023 02:45
dlogi '.ldc dictionary file not found, SOF logs collection disabled'
return 0 # 0 is 'true'
}
fi
fi

return 1
Copy link
Contributor

Choose a reason for hiding this comment

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

An error condition should have a message stating what the error is before returning.

kv2019i
kv2019i previously approved these changes Jun 21, 2023
Copy link
Contributor

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Thanks @keqiaozhang ! This will pave way to enable SysT logging later on -> thesofproject/sof#7703

dlogi 'IPC4 FW logging only support with SOF Zephyr build'
dlogi 'SOF logs collection is globally disabled.'
return 0
else
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for this else

Copy link
Collaborator

Choose a reason for hiding this comment

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

+1. Less indentation and less nesting: easier to read.

https://medium.com/swlh/return-early-pattern-3d18a41bba8

Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

Thanks! the logic looks good, please fix the minor code style issues.

case-lib/lib.sh Outdated
if [ ${OPT_VAL['s']} -eq 0 ]; then
return 0
fi
[ ${OPT_VAL['s']} -eq 0 ] && return 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not needed and it looks incompatible with set -e. It's actually compatible with set -e but that's confusing.

It's also less readable for some people and distracting git churn in a too complex and too messy area of the code.

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 21, 2023

Please re-add check-sof-logger in some PR testing before merging this? Depending on recent daily test results.

We used to have frequent failures but we're probably not testing these configurations. In any case it should run at least for MTL.

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 30, 2023

@marc-hb
Copy link
Collaborator

marc-hb commented Jun 30, 2023

On IPC4 platforms, we only check logger with Zephyr build
firmware and no need to check the ldc file. The ldc file
checking only when testing with IPC3 firmware.

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
No need to check the ldc file on IPC4 Zephyr platforms and swith
to use firmware file to determine whether it is a Zephyr build FW.

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
Before we used cavstool.py as a temporary solution on IPC3 Zephyr platforms
for etrace, but now IPC3 Zephyr built FW is no longer supported.

Signed-off-by: Keqiao Zhang <keqiao.zhang@intel.com>
@keqiaozhang
Copy link
Contributor Author

Updated, sof-logger check passed and no side-effects.

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.

5 participants