google / oss-fuzz

OSS-Fuzz - continuous fuzzing for open source software.
https://google.github.io/oss-fuzz
Apache License 2.0
10.12k stars 2.15k forks source link

sound-open-firmware: SOF integration has bitrotten. Revive it. #12135

Open andyross opened 4 days ago

andyross commented 4 days ago

This doesn't get as much attention as it should, fixups to recover oss-fuzz output:

  1. The Zephyr SDK 0.16.1 probably still works from a year ago, but the fetch URL scheme changed so we'll never know. Implement some horrible hackery to extract the "latest" version of the SDK at docker time so (absent more changes to the releases URLs) we stay current.

  2. The build.sh was my original hack with manual kconfig settings, which have skewed vs. the app as it evolved and don't build anymore. SOF has fuzzing implemented as a first class tool now (and even run it in their CI), so just use the official script which we can rely on being maintained.

github-actions[bot] commented 4 days ago

andyross is either the primary contact or is in the CCs list of projects/sound-open-firmware.
andyross has previously contributed to projects/sound-open-firmware. The previous PR was #10385

andyross commented 4 days ago

Can't add reviewers in foreign projects. @cujomalainey @marc-hb will want to take a look

andyross commented 4 days ago

Also someone in oss-fuzz will need to explain the CI failure reporting "Please add an "apt-get update" before "apt-get install". Otherwise, a cached and outdated RUN layer may lead to install failures.". There's literally an apt-get update on the previous line... ?

cujomalainey commented 4 days ago

Also someone in oss-fuzz will need to explain the CI failure reporting "Please add an "apt-get update" before "apt-get install". Otherwise, a cached and outdated RUN layer may lead to install failures.". There's literally an apt-get update on the previous line... ?

Maybe try doing it all on one line to silence it

maflcko commented 3 days ago

Also someone in oss-fuzz will need to explain the CI failure reporting "Please add an "apt-get update" before "apt-get install". Otherwise, a cached and outdated RUN layer may lead to install failures.". There's literally an apt-get update on the previous line... ?

Maybe try doing it all on one line to silence it

Yes, each RUN is a different layer, so a different cache. Normally this works fine, but depending on the setup this may cache outdated IP addresses and packages, possibly leading to build failures at some point in the future.

andyross commented 3 days ago

Yes, each RUN is a different layer, so a different cache.

Ah, got it. You mean the docker checkpoint gets cached between the two lines, so the update isn't current at the time of the upgrade. Yeah, that's non-obvious for folks who aren't using docker regularly, maybe rework the CI failure to "Please add an "apt-get update" in the same RUN command before an "apt-get upgrade" to ensure they are synchronized" or somesuch?

Will fix.

maflcko commented 3 days ago

rework the CI failure to "Please add an "apt-get update" in the same RUN command before an "apt-get upgrade" to ensure they are synchronized" or somesuch?

Sounds good. You can just submit a pull request against infra/presubmit.py in this repo to change the CI print statement.

andyross commented 3 days ago

Updated per comments. I ended up moving the SDK fetch into a separate script to avoid the voodoo.