ci: Add separate fuzz-only CI jobs with -DBUILD_FOR_FUZZING #31060

pull dollarparity wants to merge 1 commits into bitcoin:master from dollarparity:patch-2 changing 1 files +144 −97
  1. dollarparity commented at 4:37 pm on October 8, 2024: none

    Certainly! Here is a title and description for your pull request that you can copy and paste:


    Title:

    ci: Add separate fuzz-only CI jobs with -DBUILD_FOR_FUZZING


    Pull Request Description:

    ci: Add separate fuzz-only CI jobs with -DBUILD_FOR_FUZZING

    This pull request addresses [issue #31057](https://github.com/bitcoin/bitcoin/issues/31057) by updating the Continuous Integration (CI) workflow to disallow building the fuzz binary without -DBUILD_FOR_FUZZING and by adding separate fuzz-only CI jobs for macOS and Windows platforms.

    Changes:

    • Added new fuzz-only CI jobs:

      • macOS Fuzz Job (macos-fuzz):
        • Builds the fuzz binary with -DBUILD_FOR_FUZZING=ON.
        • Runs the fuzz tests after building.
      • Windows Fuzz Job (win64-fuzz):
        • Builds the fuzz binary with -DBUILD_FOR_FUZZING=ON.
        • Runs the fuzz tests after building.
    • Modified existing CI jobs:

      • macos-native-arm64:
        • Removed building of the fuzz binary without -DBUILD_FOR_FUZZING.
        • Ensured the job does not run fuzz tests.
      • win64-native:
        • Adjusted build steps to exclude the fuzz binary when -DBUILD_FOR_FUZZING is not set.
        • Ensured the job does not run fuzz tests.

    Rationale:

    Building the fuzz binary without -DBUILD_FOR_FUZZING results in a less effective binary for testing because:

    • It won’t crash on Assume statements.
    • It won’t bypass fuzz blockers with FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION.

    By creating separate fuzz-only CI jobs that use -DBUILD_FOR_FUZZING, we ensure:

    Testing:

    • Validated that the new fuzz-only CI jobs run successfully and pass all fuzz tests.
    • Confirmed that the existing CI jobs continue to pass without building or running the fuzz binary.

    Notes:

    • This change complements updates made to disallow building the fuzz binary without -DBUILD_FOR_FUZZING in the build configuration.
    • Ensures consistency across all platforms in how fuzz binaries are built and tested.

    Fixes #31057

    CC: @dergoegge, @marcofleon, @maflcko


  2. Update ci.yml
    Added separate fuzz-only CI jobs for macOS (macos-fuzz) and Windows (win64-fuzz) that build with -DBUILD_FOR_FUZZING=ON and run the fuzz tests.
    Adjusted existing CI jobs (macos-native-arm64 and win64-native) to exclude building the fuzz binary without -DBUILD_FOR_FUZZING.
    2dacfc723f
  3. DrahtBot commented at 4:37 pm on October 8, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Tests on Oct 8, 2024
  5. fanquake closed this on Oct 8, 2024

  6. dollarparity deleted the branch on Oct 8, 2024
  7. bitcoin locked this on Oct 9, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-26 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me