Skip to content

PYTHON-4232 Add Fuzzing Tests - #38

Open
blink1073 wants to merge 14 commits into
mainfrom
PYTHON-4232
Open

blink1073 wants to merge 14 commits into
mainfrom
PYTHON-4232

Conversation

@blink1073

@blink1073 blink1073 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

PYTHON-4232

Changes in this PR

Adds coverage-guided fuzz tests for bson: each target checks that the C extension and pure-Python implementations agree on arbitrary input, with committed reproducers for known bugs. Runs on every PR plus a daily Evergreen task; no driver source is changed.

Test Plan

  • just lint, just lint-manual, and just typing pass.
  • Both Evergreen runner paths verified locally; a deliberately broken target fails as expected.
  • An Evergreen patch build will confirm real atheris execution (not runnable on local hardware).

Checklist

Checklist for Author

  • Did you update the changelog (if necessary)? Internal test infrastructure only, no user-facing change.
  • Is there test coverage? This PR adds the fuzz tests themselves and changes no driver source.
  • Is any followup work tracked in a JIRA ticket? If so, add link(s). (PYTHON-6169)

Checklist for Reviewer

  • Does the title of the PR reference a JIRA Ticket?
  • Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
  • Is all relevant documentation (README or docstring) updated?

mongodb-drivers-pr-bot Bot and others added 3 commits October 15, 2026 05:11
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Iris <58442094+sleepyStick@users.noreply.github.com>
Adds atheris-based fuzz targets for bson that run the C extension and
pure-Python implementations on arbitrary input and compare their
results.  Known-bug reproducers in fuzz/regression/ run on every PR;
a nightly Evergreen task runs time-boxed discovery fuzzing against a
seed corpus built at setup time from the vendored BSON spec corpus.
No driver source is changed.
Comment thread fuzz/build_corpus.py Outdated
Comment thread .gitignore
Comment thread AGENTS.md Outdated
Comment thread fuzz/fuzz_decode.py Outdated
Comment thread fuzz/fuzz_decode.py Outdated
Comment thread CONTRIBUTING.md Outdated

This branch has not been deployed

No deployments
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.

1 participant