Repository navigation
test: selector: add ztest unit tests - #11401
piotrhoppeintel wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The channel-count test cannot detect propagation regressions because its buffers already contain the expected values; set different counts before prepare() so the assertions verify propagation.
1 open issue
What changed in this PR
Adds native_sim ztests for the selector’s format-conversion functionality introduced in #11370, without changing production code.
Changes:
- Tests format dispatch, bidirectional S16/S24 conversion, saturation, rounding, and circular-buffer wrapping.
- Covers IPC4 payload handling, preparation, channel propagation, passthrough selection, and coefficient-based processing.
- Adds standalone test support and build configuration.
| File | Description |
|---|---|
test/ztest/unit/audio/selector/testcase.yaml |
Registers the native_sim test suite and tags. |
test/ztest/unit/audio/selector/selector_ztest.c |
Adds selector processing and component-level tests. |
test/ztest/unit/audio/selector/selector_test_support.c |
Supplies minimal SOF context and allocation helpers. |
test/ztest/unit/audio/selector/prj.conf |
Enables ztest, IPC4, selector, and sample formats. |
test/ztest/unit/audio/selector/CMakeLists.txt |
Builds the standalone suite with selector dependencies. |
Review effort: Balanced
PR 11401: test resultsRun date: 2026-11-13 18:45 UTC Tested commit: 2422d7b7dff22477cc6a500203b7a58e650e1164 |
kv2019i
left a comment
There was a problem hiding this comment.
Good to see more test content added. Some notes inline.
| /** | ||
| * @brief Return the minimal SOF context used by selector ztests. | ||
| */ | ||
| struct sof *sof_get(void) |
There was a problem hiding this comment.
Hmm, we have lot of ztests that need these, I wonder if there is aready some way to reuse these? We have the posix rtos implementation used e.g. by fuzzers, can that be used here?
There was a problem hiding this comment.
c94ade6 to
64f3bd8
Compare
|
looks like CI is getting stuck will rerun. |
|
SOFCI TEST |
|
@piotrhoppeintel can you check CI, seems stuck. Thanks ! |
64f3bd8 to
8509ccf
Compare
Add native_sim tests for selector format dispatch, sample conversion, saturation, rounding and circular-buffer wrapping. Cover component preparation, IPC4 payload handling, channel propagation, passthrough selection and coefficient-based processing. Signed-off-by: Piotr Hoppe <piotr.hoppe@intel.com>
8509ccf to
2422d7b
Compare

Add native_sim tests for the functionality implemented in #11370, covering selector format dispatch, sample conversion, saturation, rounding, and circular-buffer wrapping.
Cover component preparation, IPC4 payload handling, channel propagation, passthrough selection, and coefficient-based processing.