Repository navigation
Conversation
The buffer unit test builds zephyr/lib/alloc.c, which includes <sof/kernel/drivers/interrupt-map.h> since commit 8b628c8 ("drivers: move the sof/drivers headers to sof/kernel/drivers"). The test was added after that and lists its include directories itself, so it does not build. Add src/kernel/include, as for the other unit tests that build kernel sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
lgirdwood
force-pushed
the
fix/ztest-buffer-kernel-include
branch
from
November 20, 2026 15:05
b33c7ec to
ba6a77f
Compare
lgirdwood
commented
Nov 20, 2026
lgirdwood
left a comment
Member
Author
There was a problem hiding this comment.
Code Review Summary
LGTM. test/ztest/unit/audio/buffer/CMakeLists.txt compiles zephyr/lib/alloc.c, which includes <sof/kernel/drivers/interrupt-map.h>, <sof/kernel/platform.h>, and <sof/kernel/lib/regions_mm.h> after #11487 merged concurrently with a1ab80bd1. Adding ${SOF_ROOT}/src/kernel/include matches the other ZTest suites that build kernel sources (audio/drc, math/fft, fast-get) and unblocks Zephyr Unit Tests (ZTest) CI on #11497.
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
sof.unit.audio.bufferZTest does not build on main:The test was ported from CMocka in a1ab80b, after #11487 moved the kernel-only headers to
src/kernel/include. It buildszephyr/lib/alloc.cand lists its include directories itself, so it needssrc/kernel/include, like the other unit tests that build kernel sources.Testing
On 9a990f5 (current main), run as in CI (twister on native_sim with ASan and LSan): all unit tests pass, including
sof.unit.audio.buffer.🤖 Generated with Claude Code