Repository navigation
Conversation
The standalone userspace test suites run themselves from a SYS_INIT hook with ztest_run_test_suite(). Since sof_run_boot_tests() is also called from test_main() on CONFIG_SOF_BOOT_TEST_STANDALONE builds, its ztest_run_all() call runs every suite a second time. Not all suites can be rerun. On PTL the second run of the SSP DAI test finds HDA link DMA state left over from the first run, fails its assertion in the user thread and halts the firmware. Add a ZTEST_SUITE() predicate that always returns false and use it for the self-running suites. ztest_run_test_suite() does not check the predicate, but ztest_run_all() does, so each suite runs once. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i
requested review from
abonislawski,
dbaluta,
iuliana-prodan,
lbetlej,
lgirdwood,
lyakh,
mmaka1 and
plbossart
as code owners
November 6, 2026 12:47
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change preventing duplicate execution of standalone userspace test suites.
No open issues 🎉
What changed in this PR
Prevents standalone userspace test suites from running twice during boot, avoiding failures caused by leftover hardware state, including the SSP DAI failure on PTL.
Changes:
- Adds a documented, always-false suite predicate to exclude self-running suites from
ztest_run_all(). - Applies the predicate to four userspace suites while preserving their explicit execution from
SYS_INIThooks.
| File | Description |
|---|---|
zephyr/test/userspace/test_mailbox.c |
Prevents automatic reruns of the mailbox suite. |
zephyr/test/userspace/test_ll_task.c |
Prevents automatic reruns of the low-latency task suite. |
zephyr/test/userspace/test_intel_ssp_dai.c |
Prevents automatic reruns of the SSP DAI suite. |
zephyr/test/userspace/test_intel_hda_dma.c |
Prevents automatic reruns of the HDA DMA suite. |
src/include/sof/boot_test.h |
Defines and documents the shared standalone-suite predicate. |
Review effort: Balanced
PR 11409: test resultsRun date: 2026-11-06 13:26 UTC Tested commit: a3b0201bf0b7cda9850a67cb311d16a72881ee60 |
lgirdwood
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The standalone userspace test suites run themselves from a SYS_INIT hook with ztest_run_test_suite(). Since sof_run_boot_tests() is also called from test_main() on CONFIG_SOF_BOOT_TEST_STANDALONE builds, its ztest_run_all() call runs every suite a second time.
Not all suites can be rerun. On PTL the second run of the SSP DAI test finds HDA link DMA state left over from the first run, fails its assertion in the user thread and halts the firmware.
Add a ZTEST_SUITE() predicate that always returns false and use it for the self-running suites. ztest_run_test_suite() does not check the predicate, but ztest_run_all() does, so each suite runs once.