Skip to content

platform/posix: Unbreak fuzzer support - #9107

Merged
kv2019i merged 1 commit into
thesofproject:mainfrom
andyross:fuzz-unbreak
May 9, 2024
Merged

kv2019i merged 1 commit into
thesofproject:mainfrom
andyross:fuzz-unbreak

Conversation

@andyross

@andyross andyross commented May 7, 2024

Copy link
Copy Markdown
Contributor

Upstream Zephyr moved the LLVM fuzzer entry point out of the arch layer and made it an app responsibility, so we broke. Add back the support here that got removed.

Fixes #9101

@andyross

andyross commented May 7, 2024

Copy link
Copy Markdown
Contributor Author

Put this together in a rush, please review carefully. Not complicated, just code motion.

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @andyross , that was quick! I think the sof/scripts/fuzz.sh needs updates to use the renamed Kconfig options (now defined on SOF side).

@marc-hb

marc-hb commented May 7, 2024

Copy link
Copy Markdown
Collaborator

I think the sof/scripts/fuzz.sh needs updates to use the renamed Kconfig options (now defined on SOF side).

Yes, @andyross please try sof/scripts/fuzz.sh [-h]. Since you already have all the dependencies installed, it must work out of the box. It's a very simple script; there is no "CI secret" here.

@andyross

andyross commented May 7, 2024

Copy link
Copy Markdown
Contributor Author

Heh, indeed. The fuzz.sh delta was sitting un-git-added in my tree still. Oops.

@andyross

andyross commented May 7, 2024

Copy link
Copy Markdown
Contributor Author

(Oh, and the checkpatch whine isn't really fixable: the symbols in question don't appear in Zephyr headers, they're still whitebox entry points in the native_posix arch. In the medium term we'll need to move to "native_sim", which is evolved architecture, and it has a better specified API.)

@kv2019i kv2019i left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks, looks good now! The previously passing CI checks now pass, so expectation is the remaining checks will pass as well (as the fuzz changes won't affect the on-device SOF tests).

@kv2019i

kv2019i commented May 8, 2024

Copy link
Copy Markdown
Collaborator

@andyross Can you rebase, there's a small conflict with in CMakeLists.txt as one of the posix platform files was removed in another PR today. We need to get clean run of the CI to merge, but I checked the faiiling case and it's a fail in "16_00_TestSdwTransferLoopback" test case, so cannot possibly be related to your PR. If the case fails after rebase, I'll ping our CI folks to check.

@lgirdwood lgirdwood left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @andyross
@marc-hb btw - do we have a build test to build POSIX Zephyr + SOF in CI ?

@kv2019i

kv2019i commented May 8, 2024

Copy link
Copy Markdown
Collaborator

@lgirdwood wrote:

Thanks @andyross @marc-hb btw - do we have a build test to build POSIX Zephyr + SOF in CI ?

Yes, that's how this was discovered -> https://github.com/thesofproject/sof/actions/runs/8972185189/job/24639608648?pr=9098 when doing a Zephyr update

Upstream Zephyr moved the LLVM fuzzer entry point out of the arch
layer and made it an app responsibility, so we broke.  Add back the
support here that got removed.

Fixes thesofproject#9101

Signed-off-by: Andy Ross <andyross@google.com>
@andyross

andyross commented May 8, 2024

Copy link
Copy Markdown
Contributor Author

Rebased.

@kv2019i

kv2019i commented May 9, 2024

Copy link
Copy Markdown
Collaborator

And the tests now pass as expected, merging!

@kv2019i
kv2019i merged commit e7f76ee into thesofproject:main May 9, 2024
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.

[BUG] IPC3/4 fuzzer build broken with Zephyr PR 71378

4 participants