Repository navigation
test: ztest: unit: audio: buffer: add src/kernel/include to include path - #11501
Merged
Merged
Conversation
The math tests link libm into the app with target_link_libraries(app PRIVATE m). The app is partially linked into a relocatable object, and the 32-bit host libm pulls in __x86.get_pc_thunk.bx from a discarded COMDAT section, so the final link fails with "defined in discarded section". native_sim already links -lm in the runner, so drop the explicit library, as the crossover test does. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
The buffer test compiles zephyr/lib/alloc.c, which includes sof/kernel/drivers/interrupt-map.h, but the test did not add src/kernel/include to its include path, so the build fails with "No such file or directory". Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i
requested review from
dbaluta,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
November 20, 2026 16:14
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the buffer include-path and math-test linkage changes.
No open issues 🎉
What changed in this PR
This PR addresses SOF ztest build failures by updating the buffer test’s header search path and removing explicit math-library linkage from seven math test targets.
Changes:
- Add
src/kernel/includeto the audio buffer test’s include paths. - Remove
target_link_libraries(app PRIVATE m)from math tests to address the reported machine-specific build failure.
| File | Description |
|---|---|
| test/ztest/unit/math/window/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/math/matrix/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/math/fft/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/math/fft_multi/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/math/dft3/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/math/dct/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/math/auditory/CMakeLists.txt | Remove explicit math-library linkage. |
| test/ztest/unit/audio/buffer/CMakeLists.txt | Add the kernel header include path. |
Review effort: Balanced
PR 11501: test resultsRun date: 2026-11-20 16:41 UTC Tested commit: 793c3bd97a605b712047f151f061d4bf26f894a6 |
Member
|
Not sure either, I think some aspects of twister are random - but we did have a zephyr 0.30 workflow update merge very recently. |
lgirdwood
approved these changes
Nov 20, 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.
Fix to ztest fails that started to occur in today's PRs. @lgirdwood not sure why this slipped through, none of the PRs merged today fail this ztest.
The other fix is not happening in all machines, but at least I'm hitting it on one old 24.04 machine.