Uh oh!
There was an error while loading. Please reload this page.
audio: add UT_STATIC to crossover and smart_amp - #4148
Conversation
Allow component to be included in unit tests by using UT_STATIC in the declaration. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
lgirdwood
commented
May 6, 2021
@kv2019i looks like a fuzzer build error |
marc-hb
commented
May 6, 2021
It looks like UT_STATIC is not defined in this case. To reproduce copy/paste the commands in Note @cujomalainey is working on proper fuzzer build in #4132 |
marc-hb
commented
May 6, 2021
Just found that |
cujomalainey
commented
May 6, 2021
My hope is to turn the fuzzer build into also a |
Allow component to be included in unit tests by using UT_STATIC in the declaration. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i
commented
May 7, 2021
Ok, fixed the issue now. Even if crossover is not part of UT tests yet, better to align the declarations with the rest of the components. We do need to come back to the UT_STATIC definition. It's no longer just about UT, so sof/ut.h doesn't make as much sense anymore. E.g. we use this for non-UT zephyr builds as well. So this should be turned into a more generic macro how one declare a component init function. |
marc-hb
commented
May 7, 2021
Is this explained somewhere in the source? I'm also wondering how you came to this crossover change, did that involve Zephyr? It was clearly not when trying to unit test it... |
kv2019i
commented
May 7, 2021
@marc-hb wrote:
No, but if you check git history for UT_STATIC, it's pretty obvious.
I found a few issues with the Zephyr build (and fixed them). Then I was curious why this had slipped through the cracks and did a grep of the whole codebase, to all component init calls. Crossover and the smart-amp were the only component inits without UT_STATIC, so thus this patch. |
marc-hb
left a comment
There was a problem hiding this comment.
No, but if you check git history for UT_STATIC, it's pretty obvious.
Wait, that sounds like... work? :-)
did a grep of the whole codebase, to all component init calls.
That too!
More seriously: a couple comments in ut.h (or any better place) would not hurt. I (ab)use git history all the time but it should IMHO not be required for information like this.
Still a few component in main without UT_STATIC.