Skip to content

Conversation

@ekurdybx
Copy link
Contributor

@ekurdybx ekurdybx commented Aug 13, 2025

Added option to use pipewire instead of ALSA direct mode in tests, that can be turned on by setting TEST_WITH_PIPEWIRE=true. Added pipewire-wrapper, to run in SOF CI.
Currently only test that can run on pipewire is check-perfomance.sh (runs aplay/arecord on one of each types of sinks/sources).

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from eaa6172 to 64c96c8 Compare August 13, 2025 09:23
@sofci
Copy link
Collaborator

sofci commented Aug 13, 2025

Can one of the admins verify this patch?

reply test this please to run this test once

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 2 times, most recently from 4670555 to 6810df4 Compare August 13, 2025 09:55
@ekurdybx ekurdybx changed the title test: add option to test with pipewire tests: add option to test with pipewire Aug 13, 2025
@marc-hb marc-hb mentioned this pull request Aug 13, 2025
6 tasks
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 2 times, most recently from 9c63bbb to a867076 Compare August 14, 2025 12:33
@ekurdybx ekurdybx marked this pull request as ready for review August 14, 2025 12:37
@ekurdybx ekurdybx requested review from a team, golowanow, lgirdwood and marc-hb as code owners August 14, 2025 12:37
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.

So far, sof-test was 97% portable across distributions. I used to run sof-test on Fedora without any issue. I'm concerned pipewire is going to change that. It's OK to add Debian or Ubuntu-specific bits, however:

  • they must remain optional (it looks like they are now, great, keep it that way)
  • you should try to identify and name differently the parts that are distro-specific versus pipewire standards.

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.

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 3 times, most recently from 1aa0aa5 to dae8d46 Compare August 26, 2025 13:29
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 6 times, most recently from ae00d7b to 20e4244 Compare August 28, 2025 10:50
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 20e4244 to 9d24ad2 Compare August 29, 2025 09:18
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 9d24ad2 to bdcebcf Compare September 1, 2025 08:03
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from bdcebcf to 9a92625 Compare September 1, 2025 08:48
Copy link
Contributor

@redzynix redzynix left a comment

Choose a reason for hiding this comment

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

In general all's good, please just add small improvements from my comments.

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 9a92625 to e9eb1f7 Compare September 1, 2025 09:42
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 3 times, most recently from cfc984c to ca3ff6b Compare September 10, 2025 13:26
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 2 times, most recently from 55052ec to 4e554c3 Compare September 12, 2025 12:31
@marc-hb
Copy link
Collaborator

marc-hb commented Sep 15, 2025

You have just pushed 2 merge commits:

Screenshot 2025-09-15 at 08 35 43

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch 2 times, most recently from 4e554c3 to 054f9dd Compare September 16, 2025 07:35
@majunkier majunkier requested a review from marc-hb September 17, 2025 09:28
README.md Outdated
- SOF_ALSA_OPTS contains optional parameters passed on both play and record.
- SOF_APLAY_OPTS and SOF_ARECORD_OPTS contain optional parameters passed additionally on play and record respectively.
These options are applied to the selected tool (alsa or tinyalsa) based on the value of SOF_ALSA_TOOL
- SOF_TEST_PIPEWIRE (default: false) allows to use pipewire instead of ALSA direct mode. Currently only works with check-performance.sh.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- SOF_TEST_PIPEWIRE (default: false) allows to use pipewire instead of ALSA direct mode. Currently only works with check-performance.sh.
- SOF_TEST_PIPEWIRE (default: false) allows to use pipewire instead of ALSA direct mode. Supported by a limited number of tests, try something like `git grep SOF_TEST_PIPEWIRE` to find which one(s).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

dlogi "Starting func_exit_handler($exit_status)"

if [ "$SOF_TEST_PIPEWIRE" == true ]; then
func_lib_disable_pipewire
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you mark this comment as "resolved" without any code change or answer?

https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html#workflow-suggestions-that-help-reviewers

Marking all comments as resolved is not necessary before merge.

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 054f9dd to 3b53cb2 Compare September 18, 2025 07:13
@majunkier
Copy link
Contributor

please add commit description

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 3b53cb2 to 03e45f2 Compare September 18, 2025 07:40
@ekurdybx
Copy link
Contributor Author

You have just pushed 2 merge commits:

Screenshot 2025-09-15 at 08 35 43

My mistake, fixed that

@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 03e45f2 to 1622cb5 Compare September 19, 2025 13:28
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.

There could some minor issues left (including at least one below) but they can be fixed later.

On the other hand, this should really be run in jenkins. @ekurdybx your https://github.com/orgs/thesofproject/teams/sof-developers membership is way overdue. Please ask someone in https://github.com/orgs/thesofproject/teams/sof-developers?query=role%3Amaintainer . You probably can't see that link but most of your coworkers can.

case-lib/lib.sh Outdated
dlogi "Check if pipewire is running"

# shellcheck disable=SC2015
systemctl is-active --user --quiet pipewire{,-pulse}.{socket,service} && func_lib_disable_pipewire || dlogi "Pipewire not running"
Copy link
Collaborator

Choose a reason for hiding this comment

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

A && B || C is not equivalent to if A; then B; else C; fi, this is a very common misconception. Compare:

if true; then grep notfound /etc/passwd ; else 'ELSE is not run'; fi
true && grep notfound /etc/passwd || echo 'ELSE is also run!!'

(from #312)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed that

Add option to use pipewire instead of ALSA direct mode in tests.
Currently works only with check-performance.sh - runs aplay/arecord on
each type of pipewire sink/source.
Added pipewire-wrapper.sh to run with SOF CI.

Signed-off-by: Emilia Kurdybelska <emiliax.kurdybelska@intel.com>
@ekurdybx ekurdybx force-pushed the SOFC2-801-add-pipewire-test-option branch from 1622cb5 to ad761ca Compare September 22, 2025 07:36
@ekurdybx
Copy link
Contributor Author

There could some minor issues left (including at least one below) but they can be fixed later.

On the other hand, this should really be run in jenkins. @ekurdybx your github.com/orgs/thesofproject/teams/sof-developers membership is way overdue. Please ask someone in github.com/orgs/thesofproject/teams/sof-developers?query=role%3Amaintainer . You probably can't see that link but most of your coworkers can.

This was run in jenkins, I tested this on lnlm, ptlh and mtlp platforms, it works as expected.

@redzynix redzynix merged commit d4ea109 into thesofproject:main Sep 22, 2025
3 checks passed
@marc-hb
Copy link
Collaborator

marc-hb commented Sep 22, 2025

This was run in jenkins, I tested this on lnlm, ptlh and mtlp platforms, it works as expected.

I just realized none of the sof-test Pull Requests show Jenkins results any more, it's not specific to this particular PR. I mean, there is no sof-test Pull Request that has test results like this:

https://sof-ci.01.org/sofpr/PR10251/build15809/devicetest/index.html

@ekurdybx , @cgturner1 could you investigate this?

@marc-hb
Copy link
Collaborator

marc-hb commented Sep 22, 2025

Just proving myself wrong 10 min later, some jenkins results are now showing up in #1303

Screenshot 2025-09-22 at 11 26 04

However I had to allow them manually with the magic sentence. I should not have to, please get https://github.com/orgs/thesofproject/teams/sof-developers membership yesterday.

This was run in jenkins, ...

I suspected some publication / permission issue but based on this #1303 screenshot it does not look like this PR #1296 was run in jenkins. At least not in the "regular" jenkins like the one running #1303 above.

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.

6 participants