Skip to content

test-case: improve Chrome OS compatibility - #684

Merged
aiChaoSONG merged 4 commits into
thesofproject:mainfrom
aiChaoSONG:for_chrome
Jun 8, 2021
Merged

aiChaoSONG merged 4 commits into
thesofproject:mainfrom
aiChaoSONG:for_chrome

Conversation

@aiChaoSONG

Copy link
Copy Markdown

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

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

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

aiChaoSONG commented Jun 4, 2021 •

Copy link
Copy Markdown
Author

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>

@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.

[ 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

Comment thread case-lib/lib.sh
journalctl_cmd()
{
journalctl -k -q --no-pager --utc --output=short-monotonic \
sudo journalctl -k -q --no-pager --utc --output=short-monotonic \

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.

@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?

@aiChaoSONG aiChaoSONG Oct 31, 2022 •

Copy link
Copy Markdown
Author

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
Copy Markdown
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.

4 participants