rust/tests/coverage
2024-11-08 20:43:08 +11:00
..
attr coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
auxiliary coverage: Regression test for inlining into an uninstrumented crate 2024-11-02 23:20:14 +11:00
branch coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
condition coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
mcdc coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
abort.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
abort.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
abort.rs
assert_not.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
assert_not.coverage
assert_not.rs
assert-ne.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
assert-ne.coverage
assert-ne.rs
assert.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
assert.coverage
assert.rs
async2.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
async2.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
async2.rs coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
async_block.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
async_block.coverage coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
async_block.rs coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
async_closure.cov-map Dont ICE when computing coverage of synthetic async closure body 2024-10-18 20:14:02 +11:00
async_closure.coverage Dont ICE when computing coverage of synthetic async closure body 2024-10-18 20:14:02 +11:00
async_closure.rs Dont ICE when computing coverage of synthetic async closure body 2024-10-18 20:14:02 +11:00
async.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
async.coverage coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
async.rs coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
await_ready.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
await_ready.coverage coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
await_ready.rs coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
bad_counter_ids.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
bad_counter_ids.coverage
bad_counter_ids.rs
bench.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
bench.coverage
bench.rs
closure_bug.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure_bug.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure_bug.rs
closure_macro_async.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
closure_macro_async.coverage coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
closure_macro_async.rs coverage: Extract executor::block_on from several async coverage tests 2024-09-10 16:08:36 +10:00
closure_macro.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
closure_macro.coverage
closure_macro.rs
closure_unit_return.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
closure_unit_return.coverage
closure_unit_return.rs
closure.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
closure.rs
color.coverage Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
color.rs Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
conditions.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
conditions.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
conditions.rs
continue.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
continue.coverage
continue.rs
coroutine.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
coroutine.coverage
coroutine.rs
coverage_attr_closure.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
coverage_attr_closure.coverage
coverage_attr_closure.rs
dead_code.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
dead_code.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
dead_code.rs
drop_trait.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
drop_trait.coverage
drop_trait.rs
fn_sig_into_try.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
fn_sig_into_try.coverage
fn_sig_into_try.rs
generics.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
generics.coverage
generics.rs
holes.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
holes.coverage coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
holes.rs coverage: Test for handling of nested item spans 2024-07-08 20:24:15 +10:00
if_else.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
if_else.coverage
if_else.rs
if_not.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
if_not.coverage
if_not.rs
if.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
if.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
if.rs
ignore_map.coverage Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
ignore_map.rs Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
ignore_run.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
ignore_run.rs Simplify the directives for ignoring coverage-test modes 2024-10-08 22:51:53 +11:00
inline_mixed.rs coverage: Regression test for inlining into an uninstrumented crate 2024-11-02 23:20:14 +11:00
inline-dead.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
inline-dead.coverage
inline-dead.rs
inline.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
inline.coverage
inline.rs
inner_items.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
inner_items.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
inner_items.rs
issue-83601.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-83601.coverage
issue-83601.rs
issue-84561.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-84561.coverage
issue-84561.rs
issue-85461.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-85461.coverage
issue-85461.rs
issue-93054.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
issue-93054.coverage
issue-93054.rs
lazy_boolean.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
lazy_boolean.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
lazy_boolean.rs
let_else_loop.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
let_else_loop.coverage
let_else_loop.rs
long_and_wide.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
long_and_wide.coverage
long_and_wide.rs
loop_break_value.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
loop_break_value.coverage
loop_break_value.rs
loop-break.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
loop-break.coverage
loop-break.rs
loops_branches.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
loops_branches.coverage
loops_branches.rs
macro_in_closure.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
macro_in_closure.coverage
macro_in_closure.rs
macro_name_span.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
macro_name_span.coverage
macro_name_span.rs
match_or_pattern.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
match_or_pattern.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
match_or_pattern.rs
nested_loops.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
nested_loops.coverage
nested_loops.rs
no_cov_crate.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
no_cov_crate.coverage coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
no_cov_crate.rs
no_spans_if_not.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
no_spans_if_not.coverage
no_spans_if_not.rs
no_spans.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
no_spans.coverage
no_spans.rs
overflow.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
overflow.coverage
overflow.rs
panic_unwind.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
panic_unwind.coverage
panic_unwind.rs
partial_eq.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
partial_eq.coverage
partial_eq.rs
README.md
simple_loop.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_loop.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_loop.rs
simple_match.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_match.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
simple_match.rs
sort_groups.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
sort_groups.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
sort_groups.rs
test_harness.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
test_harness.coverage
test_harness.rs
tight_inf_loop.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
tight_inf_loop.coverage
tight_inf_loop.rs
trivial.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
trivial.coverage
trivial.rs
try_error_result.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
try_error_result.coverage
try_error_result.rs
unicode.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
unicode.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
unicode.rs
unreachable.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
unreachable.coverage
unreachable.rs
unused_mod.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
unused_mod.coverage
unused_mod.rs
unused.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
unused.coverage
unused.rs
uses_crate.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
uses_crate.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
uses_crate.rs
uses_inline_crate.cov-map coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
uses_inline_crate.coverage coverage: Restrict empty-span expansion to only cover { and } 2024-11-08 20:43:08 +11:00
uses_inline_crate.rs
while_early_ret.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
while_early_ret.coverage
while_early_ret.rs
while.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
while.coverage
while.rs
yield.cov-map coverage: Include the highest counter ID seen in .cov-map dumps 2024-10-11 21:04:37 +11:00
yield.coverage
yield.rs

The tests in this directory are shared by two different test modes, and can be run in multiple different ways:

  • ./x.py test coverage-map (compiles to LLVM IR and checks coverage mappings)
  • ./x.py test coverage-run (runs a test binary and checks its coverage report)
  • ./x.py test coverage (runs both coverage-map and coverage-run)

Maintenance note

These tests can be sensitive to small changes in MIR spans or MIR control flow, especially in HIR-to-MIR lowering or MIR optimizations.

If you haven't touched the coverage code directly, and the tests still pass in coverage-run mode, then it should usually be OK to just re-bless the mappings as necessary with ./x.py test coverage-map --bless, without worrying too much about the exact changes.