-
Notifications
You must be signed in to change notification settings - Fork 321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
samples: change smart_amp_test prefix smart_amp_
to smart_amp_test_
#8441
Conversation
Avoids conflicts with the "real" smart_amp.c when the "stub" compilation check enables everything and compiles everything. Also makes `git grep smart_thing` a bit more convenient in some cases. Only the IPC3 sample clashed because the real code does not use MODULE_ADAPTER(). Pre-emptively rename the IPC4 sample too for consistency and in case the real code changes its mind later. Only global symbols are renamed; no need to git churn private symbols. Fixes commit ba2cfe3 ("app/stub*.conf: add CONFIG_SAMPLE_SMART_AMP=y") which clashed with commit d4d0a0c ("smart_amp: fix code and re-enable it on stub builds") CI did not detect the clash because these two commits were merged at the same time. In case anyone is interested, the CI "fix" to prevent this type of race is a GitHub feature called "merge queue" (resp. "merge train" in Gitlab, "commit queue" in the older Chrome infrastructure, etc.) It would be a heavy lift, overkill for the small size and concurrency of the sof git repo and how rarely these accidents happen (a couple times/year) Signed-off-by: Marc Herbert <[email protected]>
f5c97a5
to
3fdf70f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 100% not sure if the ability to compile real and non-real smart-amp together in the same build, can cause problems in some case. Previously this was not possible due to build time error, but with this change, one can build such an image and the UUID will be the same. This is good for a build test, but may cause weird'ish errors on more complicated functional checks when/if the same uuid is used. Update: The real smart-amp uuids are different, so not an issue.
Approving as I still am pretty confident this will work.
Another approach would be to make a Kconfig depends for smart_amp_tests so that they could not be enabled if the a real smart-amp is enabled in the build.
Thanks for fixing up my half bake |
Thanks for fixing this :) I wanted to send a patch on Friday but couldn't understand exactly what names should I use. |
Avoids conflicts with the "real" smart_amp.c when the "stub" compilation check enables everything and compiles everything.
Also makes
git grep smart_thing
a bit more convenient in some cases.Only the IPC3 sample clashed because the real code does not use MODULE_ADAPTER(). Pre-emptively rename the IPC4 sample too for consistency and in case the real code changes its mind later.
Only global symbols are renamed; no need to git churn private symbols.
Fixes commit ba2cfe3 ("app/stub*.conf: add
CONFIG_SAMPLE_SMART_AMP=y") which clashed with commit d4d0a0c ("smart_amp: fix code and re-enable it on stub builds")
CI did not detect the clash because these two commits were merged at the same time.
In case anyone is interested, the CI "fix" to prevent this type of race is a GitHub feature called "merge queue" (resp. "merge train" in Gitlab, "commit queue" in the older Chrome infrastructure, etc.) It would be a heavy lift, overkill for the small size and concurrency of the sof git repo and how rarely these accidents happen (a couple times/year)