Skip to content

test: ztest: unit: audio: buffer: add src/kernel/include to include path - #11501

Merged
lgirdwood merged 2 commits into
thesofproject:mainfrom
kv2019i:202611-fix-ztest
Nov 20, 2026
Merged

lgirdwood merged 2 commits into
thesofproject:mainfrom
kv2019i:202611-fix-ztest

Conversation

@kv2019i

@kv2019i kv2019i commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

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.

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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/include to 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

@intel-sofci

Copy link
Copy Markdown

PR 11501: test results

Run date: 2026-11-20 16:41 UTC

Tested commit: 793c3bd97a605b712047f151f061d4bf26f894a6

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

@lgirdwood

Copy link
Copy Markdown
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
lgirdwood merged commit d9b1a78 into thesofproject:main Nov 20, 2026
45 of 46 checks passed
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.

4 participants