Skip to content

Conversation

@lyakh
Copy link
Collaborator

@lyakh lyakh commented Jul 15, 2025

Add a boot test to run a Zephyr user-space test

@lyakh lyakh added the DNM Do Not Merge tag label Jul 15, 2025
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

LGTM, just some opens on how we scale to more user tests.

@@ -0,0 +1,33 @@
// SPDX-License-Identifier: BSD-3-Clause
Copy link
Member

Choose a reason for hiding this comment

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

I think we are going to have scheduler, library and llext syscalls so probably best to have a syscall directory here and a file for each subsystem.

@@ -0,0 +1,61 @@
// SPDX-License-Identifier: BSD-3-Clause
Copy link
Member

Choose a reason for hiding this comment

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

likewise re names - my feeling is we will have more userspace tests so best to say userspace-locking.c

@lyakh
Copy link
Collaborator Author

lyakh commented Jul 16, 2025

SOFCI TEST

@lgirdwood
Copy link
Member

SOFCI TEST

@lgirdwood
Copy link
Member

@lyakh why the DNM - assume we are pending on Zephyr PRs ?

@lgirdwood
Copy link
Member

SOFCI TEST

@lyakh
Copy link
Collaborator Author

lyakh commented Jul 30, 2025

@lyakh why the DNM - assume we are pending on Zephyr PRs ?

@lgirdwood yes, because we had problems with upgrading to the newest Zephyr and even now it isn't perfect but now I'll re-push this, dropping the last two commits

@lyakh lyakh force-pushed the user branch 3 times, most recently from 6bf019c to dd42a9a Compare August 1, 2025 14:52
@lyakh lyakh changed the title [DNM] Test user-space Test user-space Aug 1, 2025
@lyakh lyakh removed the DNM Do Not Merge tag label Aug 1, 2025
Copy link
Collaborator

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

Hmm, a bit of a mismatch between "test user-space" and enabling CONFIG_USERSPACE for default for PTL targets....


CONFIG_USERSPACE=y
CONFIG_APPLICATION_DEFINED_SYSCALL=y
CONFIG_MAX_THREAD_BYTES=3
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 really aligned with the PR title "test user-space". This PR in fact enables user-space for all PTL targets including next release. Is this intentional at this point?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kv2019i yes, just enabling the feature doesn't do much as long as we don't have user-space threads, but you're right, it's still a significant change and should be reflected in the PR title

Copy link
Collaborator

Choose a reason for hiding this comment

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

@lyakh I think enabling is a good first step, but yeah, just looking at ifdefs in Zephyr source, there are a couple of thousand of ifdefs for CONFIG_USERSPACE, so compiled code will be quite differente, whether we user threads in SOF or not.

Copy link
Member

Choose a reason for hiding this comment

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

Lets get CONFIG_USERSPACE tested regularly now in CI. Yes we are not using, but lets get some comfort that enabling does not do any harm.

@kv2019i kv2019i changed the title Test user-space Test user-space and enable CONFIG_USERSPACE on select platforms Aug 6, 2025
Copy link
Collaborator

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

I modified the title now, good to go now. The CI tests need to pass of course, but codewise this is ok to go.

@lyakh
Copy link
Collaborator Author

lyakh commented Aug 7, 2025

I modified the title now, good to go now. The CI tests need to pass of course, but codewise this is ok to go.

@kv2019i thanks, yes, looks like we need gperf for Windows - at least that's the failure with the GitHub "build-windows" work flow

@kv2019i
Copy link
Collaborator

kv2019i commented Aug 7, 2025

@lyakh wrote:

@kv2019i thanks, yes, looks like we need gperf for Windows - at least that's the failure with the GitHub "build-windows" work
flow

Not sure about that. We've not had a maintainer for the Windows build in a long time, so not sure how we can keep it. If nobody signs up, I'd propose to remove it from CI and move on.

So I was more referring to the required CI checks failing.

@lyakh
Copy link
Collaborator Author

lyakh commented Oct 29, 2025

Turns out VMH testing on MTL is badly broken https://sof-ci.01.org/sofpr/PR10119/build16827/devicetest/index.html , disable it until it's fixed.

kv2019i added a commit to kv2019i/sof that referenced this pull request Oct 29, 2025
@lyakh lyakh added the DNM Do Not Merge tag label Oct 30, 2025
@lyakh lyakh force-pushed the user branch 4 times, most recently from a8d5c25 to aa8828d Compare November 3, 2025 14:36
@lyakh lyakh force-pushed the user branch 2 times, most recently from cf0934e to 2e90058 Compare November 5, 2025 14:16
@lyakh lyakh requested a review from dabekjakub as a code owner November 5, 2025 14:16
@@ -1,5 +1,11 @@
if (CONFIG_SOF_BOOT_TEST)
if (CONFIG_SOF_BOOT_TEST AND NOT CONFIG_METEORLAKE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not mtl?

Copy link
Member

@abonislawski abonislawski left a comment

Choose a reason for hiding this comment

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

Looks like there are commits for more than 1 PR

endif()

if (CONFIG_ACE_VERSION_3_0)
zephyr_library_sources_ifdef(CONFIG_SOF_BOOT_TEST
Copy link
Member

Choose a reason for hiding this comment

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

no dependency on CONFIG_USERSPACE?

if (CONFIG_SOF_BOOT_TEST)
       zephyr_library_sources_ifdef(CONFIG_VIRTUAL_HEAP
               vmh.c
       )
       zephyr_library_sources_ifdef(CONFIG_USERSPACE
               userspace/ksem.c
       )
endif()

PTL supports user-space, enable it by default, which also enabled the
boot-time user-space test.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh
Copy link
Collaborator Author

lyakh commented Dec 16, 2025

@lyakh lyakh removed the DNM Do Not Merge tag label Dec 16, 2025
@kv2019i
Copy link
Collaborator

kv2019i commented Dec 16, 2025

@lyakh Is it the same #10417 ? The test failing is same and same codec, but at least there seem to be a new way this fails (in terms how this shows up in logs):

https://sof-ci.01.org/sofpr/PR10119/build18064/devicetest/index.html?model=PTLH_RVP_NOCODEC&testcase=multiple-pipeline-all

[ 2847.127690] <inf> ipc: ipc_cmd: rx	: 0x47000000|0x0
[ 2847.128446] <err> schedule: scheduler_register: allocation failed

@kv2019i
Copy link
Collaborator

kv2019i commented Dec 16, 2025

Hmm, this now only enables the boot tests, so the commit summary is somewhat misleading now. This does explain why the fails happen differently as there's more use of the system before SOF application logic starts to be run, so we run out of memory sooner. Let's proceed with merge as rest of tests are passing and get some more coverage for this.

@kv2019i kv2019i merged commit 055db19 into thesofproject:main Dec 16, 2025
38 of 43 checks passed
@lyakh lyakh deleted the user branch December 16, 2025 12:58
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