Repository navigation
V11.0.0/double digits chore - #8
gimlichael wants to merge 10 commits into
Conversation
…t-coverage#2062) --- updated-dependencies: - dependency-name: dotnet-reportgenerator-globaltool dependency-version: 5.5.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…overlet-coverage#2061) Bumps [danielpalme/ReportGenerator-GitHub-Action](https://github.com/danielpalme/reportgenerator-github-action) from 5.5.11 to 5.5.12. - [Release notes](https://github.com/danielpalme/reportgenerator-github-action/releases) - [Commits](danielpalme/ReportGenerator-GitHub-Action@5.5.11...5.5.12) --- updated-dependencies: - dependency-name: danielpalme/ReportGenerator-GitHub-Action dependency-version: 5.5.12 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.38.2 to 4.39.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v4.38.2...v4.39.1) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.39.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
….2 (coverlet-coverage#2066) --- updated-dependencies: - dependency-name: Microsoft.Testing.Extensions.AzureDevOpsReport dependency-version: 2.5.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…double-digits-chore
* Prevent invalid IL from branch trampolines Detect unsafe exception-handler boundaries and fall back to inline instrumentation. Preserve original `TryStart` boundaries to avoid invalid loop and `try/finally` IL. Add issue coverlet-coverage#2058 regression coverage, sample control-flow methods, and JIT-preparation validation with diagnostic IL output. * Fix EH boundaries for instrumented loop back-edges Update exception-handler boundary rewriting so `TryStart` follows inserted branch-target instructions, preserving intra-try back-edges in optimized `do/while` loops. Add Issue 2058 release-instrumentation coverage and a `try/finally` loop regression sample. * Prevent invalid IL near handler starts Add ILVerify 10.0.14 as a local tool and recommend it for IL investigations. Track instructions immediately preceding exception-handler `TryStart` offsets and skip unsafe taken-branch counter injection when trampolines are unavailable, preserving inline fallback for other cases. * use runtime specific dotnet tool versions * Fix path for dotnet-tools.json copy script * Fix branch instrumentation near EH boundaries Use local branch trampolines when standard trampolines are unavailable before exception-handler boundaries. Refactor branch candidate registration, track local trampoline redirections, and preserve branch hit tracking across netstandard2.0. Extend Issue 2058 coverage tests to verify both branch paths and filter recorded branch entries with LINQ. * Iterate instrumentation over original IL Process the pre-instrumentation instruction snapshot with a stable index instead of traversing the mutable instruction list. Remove manual index adjustments so injected instructions cannot alter iteration or cause original instructions to be skipped or processed incorrectly. Preserve target mapping and instruction-target replacement after instrumentation.
…ge#2069) * Narrow Dynamic Exclude Filters for Loaded Assemblies * Allow hyphen for assembly names
…double-digits-chore
[Medium impact] The changes affect coverage instrumentation and assembly selection in Coverlet runs. The PR appears safe to merge, with a non-blocking gap in tests for executed coverage counts.
|
| Assert.NotEmpty(branches); | ||
| Assert.Contains(branches, b => b.Path == 0); | ||
| Assert.Contains(branches, b => b.Path == 1); |
There was a problem hiding this comment.
Wrong coverage passes these tests
The new tests prepare the methods for JIT compilation but never run them. AssertMethodHasBothBranchPaths only checks that some branches in the method have Path 0 and 1. It would still pass if the new local trampoline skipped a counter or one conditional lost a path.
Keep these checks for invalid IL, and add a bounded companion sample that runs both outcomes and checks each conditional's branch and line hit counts.
Knowledge Base Used: Core coverage tests
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/coverlet.core.coverage.tests/Coverage/CoverageTests.Issue2058.cs
Line: 75-77
Comment:
**Wrong coverage passes these tests**
The new tests prepare the methods for JIT compilation but never run them. `AssertMethodHasBothBranchPaths` only checks that some branches in the method have `Path` 0 and 1. It would still pass if the new local trampoline skipped a counter or one conditional lost a path.
Keep these checks for invalid IL, and add a bounded companion sample that runs both outcomes and checks each conditional's branch and line hit counts.
**Knowledge Base Used:** [Core coverage tests](https://app.greptile.com/-/switch-tenant?tenant=geekle&next=%2Fcustom-context%2Fknowledge-base%2Fcodebeltnet%2Fcoverlet%2F-%2Fdocs%2Fcore-coverage-tests.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
This pull request brings in the reviewed upstream changes from
coverlet-coverage/coverletthat fix exception-handler instrumentation and dynamic exclude filtering, updates the Microsoft Testing Platform dependency to 2.5.2, and records the synchronization in the fork's documentation.Exception-handler instrumentation:
Dynamic exclude filters:
MSS.Tools.xUnitfrom excluding a system under test such asMSS.Tools.MarkdownDependency updates:
Documentation and release notes:
UPSTREAM.mdrecords the reviewed upstream tip, the disposition of each incoming commit, and the validation performed for this operation