Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
fuzz_repo
False Positive With a Refactor to Improve Effectivene…
…ss & Efficiency (#1317) Sorry for the churn on this test; filesystem I/O makes for slow feedback when trying to test locally. --- Anyway, the issues listed below are addressed in this PR by simplifying the test harness implementation. The result being significantly improved fuzzing coverage and slightly improved execution speed. Prior to the changes introduced here, the implementation of `fuzz_repo` had several issues: 1. `repo.stage()` was not called before the first `repo.do_commit()` call 2. When `repo.stage()` was eventually called, the argument it was passed was incorrect (a list of absolute paths instead of relative to the repo dir) causing a `ValueError` that broke the fuzzer runs. This was hidden during the initial local testing because of point 3 below. 3. Inefficient consumption of the fuzzer provided data resulted in the input bytes being exhausted early in the `TestOneInput` execution until the fuzzer was able to generate a corpus large enough to satisfy all of the `Consume*` calls. Other changes: - `EnhancedFuzzedDataProvider.ConsumeRandomString` now accepts an argument to optionally exclude unicode surrogates from the returned string (useful for places where they will always raise an exception like most filesystem operations.) - Adds new fuzzing engine recommended dictionary entries (now that the test is effective enough to generate recommendations.) Closes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69054
- Loading branch information