Skip to content

Comments

WIP: Userspace LL ztest#10576

Draft
lgirdwood wants to merge 5 commits intothesofproject:mainfrom
lgirdwood:qemudc233c-pipe
Draft

WIP: Userspace LL ztest#10576
lgirdwood wants to merge 5 commits intothesofproject:mainfrom
lgirdwood:qemudc233c-pipe

Conversation

@lgirdwood
Copy link
Member

Very basic/simple ztest to start with user LL. For developers only, lots still todo. Includes qemu support for dc233c atm.

(.venv) lrg@moth:~/work/sof/build-qemu_xtensa_mmu$ west build -t run
-- west build: running target run
[0/27] cmake -P /home/lrg/work/sof/sof/scripts/cmake/version.cmake
-- SOF version.cmake starting at 2026-02-24T20:54:21Z UTC
-- /home/lrg/work/sof/sof/ is at git commit with parent(s):
commit 31248867b7d03507a44c4383bbfeb91993ad0254 7bee513d082b5e058f2accb3bde00c2c7907b439 (HEAD -> qemudc233c-pipe, lrg/qemudc233c, qemudc233c)
Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Date:   Tue Feb 24 15:38:55 2026 +0000

    boot tests: add support for running boot tests on qemu simulator
    
    Call directly here as more qemu target wont simulate IPC which is used
    as entry for testing on HW.
    
    Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
-- GIT_TAG / GIT_LOG_HASH : v2.14-pre-rc-427-g31248867b7d0-dirty / 31248867b
-- Source content hash: 412cbc68. Notes:
  - by design, source hash is broken by Kconfig changes. See #3890.
  - Source hash is also broken by _asymmetric_ autocrlf=input, see
    #5917 and reverted #5920.
-- Unchanged /home/lrg/work/sof/build-qemu_xtensa_mmu/zephyr/include/generated/sof_versions.h
[1/2] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: dc233c
[    0.017126] <inf> init: FW ABI 0x301d001 DBG ABI 0x5003000 tags SOF:v2.14-pre-rc-427-g31248867b7d0-dirty zephyr:v4.3.0-5654-gf6a32b27dc17 src hash 0x412cbc68 (ref hash 0x412cbc68)
[    0.022360] <inf> ipc: SOF_BOOT_TEST_STANDALONE, disabling IPC.
*** Booting Zephyr OS build v4.3.0-5654-gf6a32b27dc17 ***
[    0.022566] <inf> main: SOF on qemu_xtensa
[    0.022584] <inf> main: SOF initialized
Running TESTSUITE sof_boot
===================================================================
START - test_sys_sem
[    0.028553] <inf> sof_boot_test: SOF thread UserSpace! (qemu_xtensa/dc233c/mmu) sem 0x1aa000: 0
 PASS - test_sys_sem in 0.007 seconds
===================================================================
START - user_space
[    0.129540] <inf> sof_boot_test: SOF thread UserSpace! (qemu_xtensa/dc233c/mmu)
[    0.140062] <inf> sof_boot_test: SOF thread UserSpace! (qemu_xtensa/dc233c/mmu)
 PASS - user_space in 0.012 seconds
===================================================================
TESTSUITE sof_boot succeeded
Running TESTSUITE userspace_ipc4_pipeline
===================================================================
START - test_pipeline_create_destroy_handlers
[    0.241230] <inf> sof_boot_test: Starting IPC4 pipeline test (handlers)
[    0.241251] <inf> pipe: pipeline new pipe_id 2 priority 0
[    0.241376] <inf> sof_boot_test: IPC4 pipeline test (handlers) complete
 PASS - test_pipeline_create_destroy_handlers in 0.001 seconds
===================================================================
START - test_pipeline_create_destroy_helpers
[    0.341912] <inf> sof_boot_test: Starting IPC4 pipeline test (helpers)
[    0.341931] <inf> pipe: pipeline new pipe_id 1 priority 0
[    0.342072] <inf> sof_boot_test: IPC4 pipeline test (helpers) complete
 PASS - test_pipeline_create_destroy_helpers in 0.001 seconds
===================================================================
TESTSUITE userspace_ipc4_pipeline succeeded
Running TESTSUITE userspace_ll
===================================================================
START - ll_task_test
 SKIP - ll_task_test in 0.001 seconds
===================================================================
TESTSUITE userspace_ll succeeded
Running TESTSUITE userspace_mailbox
===================================================================
START - mailbox_test
 SKIP - mailbox_test in 0.001 seconds
===================================================================
TESTSUITE userspace_mailbox succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [sof_boot]: pass = 2, fail = 0, skip = 0, total = 2 duration = 0.019 seconds
 - PASS - [sof_boot.test_sys_sem] duration = 0.007 seconds
 - PASS - [sof_boot.user_space] duration = 0.012 seconds

SUITE PASS - 100.00% [userspace_ipc4_pipeline]: pass = 2, fail = 0, skip = 0, total = 2 duration = 0.002 seconds
 - PASS - [userspace_ipc4_pipeline.test_pipeline_create_destroy_handlers] duration = 0.001 seconds
 - PASS - [userspace_ipc4_pipeline.test_pipeline_create_destroy_helpers] duration = 0.001 seconds

SUITE SKIP -   0.00% [userspace_ll]: pass = 0, fail = 0, skip = 1, total = 1 duration = 0.001 seconds
 - SKIP - [userspace_ll.ll_task_test] duration = 0.001 seconds

SUITE SKIP -   0.00% [userspace_mailbox]: pass = 0, fail = 0, skip = 1, total = 1 duration = 0.001 seconds
 - SKIP - [userspace_mailbox.mailbox_test] duration = 0.001 seconds

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL
QEMU: Terminated

${sof_module} no longer set anywhere and resolved to NULL. Fix with
correct paths.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Userspace can be built without fast_get().

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Add a qemu target for SOF that will build with native zephyr support
for drivers including xtensa MMU. This will be used for GH worklow
ztest validation and as a SDV for userspace work.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Call directly here as more qemu target wont simulate IPC which is used
as entry for testing on HW.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Starting point. Other patches to be merged etc.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
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.

2 participants