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

test-case: improve Chrome OS compatibility #684

Merged
merged 4 commits into from
Jun 8, 2021

Conversation

aiChaoSONG
Copy link

These two patches make check-playback/capture test cases can run on Chrome smoothly. suppose sof-test is downloaded to /usr/local, and other dependencies are installed with chromebrew

Chao Song added 2 commits June 3, 2021 11:08
We are not using dmesg to collect logs now, so don't
need to clear the log buffer.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Under Chrome OS, need root permission to run journalctl.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
@aiChaoSONG aiChaoSONG requested a review from a team as a code owner June 3, 2021 03:53
paulstelian97
paulstelian97 previously approved these changes Jun 3, 2021
plbossart
plbossart previously approved these changes Jun 3, 2021
Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

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

Thanks @aiChaoSONG.
maybe that's a stretch but does this help with Fedora compatibility as well? What's missing now?

@aiChaoSONG
Copy link
Author

aiChaoSONG commented Jun 4, 2021

Thanks @aiChaoSONG.
maybe that's a stretch but does this help with Fedora compatibility as well? What's missing now?

Some commands in sof-test need root privilege, so they are executed as sudo cmd, for example, sudo sof-logger. On Ubuntu, we add current user to sudo group, then we don't need to input password when run cmd with sudo.

The same thing needs to be done for Fedora and Chrome, but there is not a sudo group on these two distros as Ubuntu, what I do is to

  • add current user to audio group: sudo usermod --append --groups audio $USER
  • config audio group in visudo, add audio ALL=(ALL) NOPASSWD: ALL

After above two steps, you can run sof-test on fedora, just as you run it on ubuntu.

marc-hb
marc-hb previously approved these changes Jun 4, 2021
Chao Song added 2 commits June 7, 2021 18:15
On Chrome OS, we need to execute lspci with sudo,
this command is not found for normal user.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Chao Song <chao.song@linux.intel.com>
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.

[ 833.106967] kernel: IO error in rt700_jack_detect_handler, ret -16 in
https://sof-ci.01.org/softestpr/PR684/build716/devicetest/?model=CML_RVP_SDW&testcase=check-suspend-resume-5 is unrelated thesofproject/linux#2943

@@ -335,7 +335,7 @@ is_sof_used()
# a wrapper to journalctl with required style
journalctl_cmd()
{
journalctl -k -q --no-pager --utc --output=short-monotonic \
sudo journalctl -k -q --no-pager --utc --output=short-monotonic \
Copy link
Collaborator

Choose a reason for hiding this comment

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

@aiChaoSONG I just had a look a recent ChromeOS image (less than a couple weeks old) and I found zero trace of journalctl, only rsyslogd... can you explain?

Copy link
Author

@aiChaoSONG aiChaoSONG Oct 31, 2022

Choose a reason for hiding this comment

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

At the time I tried sof-test on chrome, there was journalctl. I have no idea why they remove journalctl in later chrome image, but there is a new tool for log, craslog, which works just like journalctl.

https://chromium.googlesource.com/chromiumos/platform2/+/HEAD/croslog

edit: looks there is a bug in journalctl, so they design a new tool.
https://bugs.chromium.org/p/chromium/issues/detail?id=1066706

Copy link
Collaborator

Choose a reason for hiding this comment

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

You're right: there was journalctl but only for a short time. With your help I found a bit more info, see #576

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.

None yet

4 participants