Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverage: Explicitly test the coverage maps produced by codegen/LLVM #114843

Merged
merged 3 commits into from
Sep 5, 2023

Commits on Sep 5, 2023

  1. Configuration menu
    Copy the full SHA
    1367104 View commit details
    Browse the repository at this point in the history
  2. Add test suite coverage-map to test coverage mappings emitted by LLVM

    We compile each test file to LLVM IR assembly, and then pass that IR to a
    dedicated program that can decode LLVM coverage maps and print them in a more
    human-readable format. We can then check that output against known-good
    snapshots.
    
    This test suite has some advantages over the existing `run-coverage` tests:
    
    - We can test coverage instrumentation without needing to run target binaries.
    
    - We can observe subtle improvements/regressions in the underlying coverage
    mappings that don't make a visible difference to coverage reports.
    Zalathar committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    004db47 View commit details
    Browse the repository at this point in the history
  3. Copy most of tests/run-coverage into tests/coverage-map/status-quo

    The output of these tests is too complicated to comfortably verify by hand, but
    we can still use them to observe changes to the underlying mappings produced by
    codegen/LLVM.
    
    If these tests fail due to non-coverage changes (e.g. in HIR-to-MIR lowering or
    MIR optimizations), it should usually be OK to just `--bless` them, as long as
    the `run-coverage` test suite still works.
    Zalathar committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    3141177 View commit details
    Browse the repository at this point in the history