fix(fuzz): fall back to fs operator so fuzz targets produce real coverage#7723
Open
tonghuaroot wants to merge 4 commits into
Open
fix(fuzz): fall back to fs operator so fuzz targets produce real coverage#7723tonghuaroot wants to merge 4 commits into
tonghuaroot wants to merge 4 commits into
Conversation
erickguan
reviewed
Jun 10, 2026
| log = { workspace = true } | ||
| logforth = { workspace = true } | ||
| opendal = { path = "..", features = ["tests"] } | ||
| opendal = { path = "..", features = ["tests", "services-fs"] } |
Member
There was a problem hiding this comment.
Good find! Do we need a fallback since we could always exit 1 and warn the user in fuzzer test? Because a test failure will force us to check CI status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #7722.
Rationale for this change
All OSS-Fuzz targets exit immediately when
OPENDAL_TESTis unset becauseinit_test_service()returnsNone. OSS-Fuzz never sets this variable, so coverage has been stuck at 0.26% (harness startup only) since integration.What changes are included in this PR?
fuzz_reader.rs/fuzz_writer.rs: replace theif let Some(op)early-return with aLazyLock<Operator>that falls back to a localFsoperator in a temp directory when no test service is configured.fuzz/Cargo.toml: enableservices-fsfeature so the fallback compiles.fuzz_path.rstarget: feeds arbitrary strings as paths throughwrite/stat/list/copy/rename/delete— already found a real bug (fix(services/fs): preserve backslash in filenames on Unix during list #7721) within 2 minutes of running.Are there any user-facing changes?
No. Changes are limited to the
core/fuzz/directory which is only used bycargo fuzzand OSS-Fuzz.AI Usage Statement
Claude was used for assistance with fuzz target development.