-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 tests for remaining TerminatorKinds and async, improve Assert #79109
Merged
Commits on Dec 3, 2020
-
Coverage tests for remaining TerminatorKinds and async, improve Assert
Tested and validate results for panic unwind, panic abort, assert!() macro, TerminatorKind::Assert (for example, numeric overflow), and async/await. Implemented a previous documented idea to change Assert handling to be the same as FalseUnwind and Goto, so it doesn't get its own BasicCoverageBlock anymore. This changed a couple of coverage regions, but I validated those changes are not any worse than the prior results, and probably help assure some consistency (even if some people might disagree with how the code region is consistently computed). Fixed issue with async/await. AggregateKind::Generator needs to be handled like AggregateKind::Closure; coverage span for the outer async function should not "cover" the async body, which is actually executed in a separate "closure" MIR.
Configuration menu - View commit details
-
Copy full SHA for c45ee4b - Browse repository at this point
Copy the full SHA c45ee4bView commit details -
Removed -base from run-make-fulldeps/coverage-*-base
In preparation for removing the -deadcode variants
Configuration menu - View commit details
-
Copy full SHA for f6c9c1a - Browse repository at this point
Copy the full SHA f6c9c1aView commit details -
Fixes multiple issue with counters, with simplification Includes a change to the implicit else span in ast_lowering, so coverage of the implicit else no longer spans the `then` block. Adds coverage for unused closures and async function bodies. Fixes: rust-lang#78542 Adding unreachable regions for known MIR missing from coverage map Cleaned up PR commits, and removed link-dead-code requirement and tests Coverage no longer depends on Issue rust-lang#76038 (`-C link-dead-code` is no longer needed or enforced, so MSVC can use the same tests as Linux and MacOS now) Restrict adding unreachable regions to covered files Improved the code that adds coverage for uncalled functions (with MIR but not-codegenned) to avoid generating coverage in files not already included in the files with covered functions. Resolved last known issue requiring --emit llvm-ir workaround Fixed bugs in how unreachable code spans were added.
Configuration menu - View commit details
-
Copy full SHA for def932c - Browse repository at this point
Copy the full SHA def932cView commit details -
Addressed feedback from 2020-12-01
Added one more test (two files) showing coverage of generics and unused functions across crates. Created and referenced new Issues, as requested. Added comments. Added a note about the possible effects of compiler options on LLVM coverage maps.
Configuration menu - View commit details
-
Copy full SHA for d96f351 - Browse repository at this point
Copy the full SHA d96f351View commit details -
Configuration menu - View commit details
-
Copy full SHA for b0c140a - Browse repository at this point
Copy the full SHA b0c140aView commit details -
Fixed cross-crate generic call test to compile lib and bin separately
The original test produced a single crate with two mods, which was not the goal of the test.
Configuration menu - View commit details
-
Copy full SHA for f101fd8 - Browse repository at this point
Copy the full SHA f101fd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for dc4bd90 - Browse repository at this point
Copy the full SHA dc4bd90View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.