Skip to content

Conversation

@jkoritzinsky
Copy link
Member

Like #120992, this PR works to remove the number of projects in the src/tests tree.

It removes project files for projects in the JIT/Regressions tree that have one source file and no references.

New merged runner projects are introduced to group the sources of the old projects by their DebugType and Optimize settings to preserve the interesting elements of the code.

Additionally, this PR removes a test that validates that we can find a Main method in an internal class (not a particularly useful test nowadays). It also moves a number of checks that cover the whole body of a test into a ConditionalFact.

This PR removes a little over 1000 project files from the JIT/Regression tree, reducing the number of projects in the src/tests tree by nearly 10%.

Part of the continuing effort to get us to a point where we don't need separate inner test builds and the cost of building src/tests multiple times is less than the cost of marshalling the bits from different jobs.

Copilot AI review requested due to automatic review settings October 24, 2025 21:10
@jkoritzinsky jkoritzinsky added test-enhancement Improvements of test source code area-Infrastructure labels Oct 24, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR consolidates JIT regression tests by removing over 1000 individual project files and merging test sources into wrapper assemblies based on their build configurations (DebugType and Optimize settings). The changes also include namespace updates to match test names, addition of OuterLoop attributes to test methods, and correction of a typo in the test wrapper generator.

  • Removal of standalone .csproj files for single-file tests without references
  • Introduction of merged runner projects grouping tests by build configuration
  • Namespace standardization to use test names instead of generic names like "Test" or "DefaultNamespace"

Reviewed Changes

Copilot reviewed 300 out of 2177 changed files in this pull request and generated no comments.

Show a summary per file
File Description
Multiple .csproj files Removed individual project files for tests being merged into wrapper assemblies
Multiple .cs test files Updated namespaces from generic names to specific test names (e.g., "Test" → "b45270")
Multiple .cs test files Added [OuterLoop] attribute to test methods with CLRTestPriority=1
b16102.cs Deleted test file validating Main method discovery in internal class
b41391.csproj, b37598.csproj, b36472.csproj, b16423.csproj Added CoreCLRTestLibrary project reference
Multiple .cs files using TestLibrary Simplified TestLibrary.PlatformDetection references to PlatformDetection with using directive
XUnitWrapperGenerator.cs Fixed typo in property name: "IsTailcallStress" → "IsTailCallStress"

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@jkoritzinsky
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@EgorBo EgorBo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to me unless someone from @dotnet/jit-contrib has objections

@jkoritzinsky jkoritzinsky enabled auto-merge (squash) November 7, 2025 00:46
@jkoritzinsky
Copy link
Member Author

/ba-g win-arm64 timeouts from when the queue was down.

@jkoritzinsky jkoritzinsky merged commit 4f905a8 into dotnet:main Nov 7, 2025
120 of 127 checks passed
@jkoritzinsky jkoritzinsky deleted the jit-regression-test-merge branch November 7, 2025 00:47
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Nov 12, 2025
Test merging in dotnet#121078 caused us to start compiling this test again. We were not compiling it because more than 64k fields hits CodeView limitations in LF_STRUCTURE/LF_CLASS (can't have more than 65534 _introduced fields_). We assert and crash compilation.

CoreCLR has it's own limitation of 65535 fields, including inherited, but not counting `object.m_pEEType` (that doesn't exist in CoreCLR CoreLib).

This changes the test to not have a class with > 65535 introduced fields. This avoids the CodeView assert. We still don't generate correct CodeView for bigger classes. Not sure if it's worth adding blocking. We could block loading such types but 65534 is an odd number and CodeView is an odd reason.
MichalStrehovsky added a commit that referenced this pull request Nov 12, 2025
Test merging in #121078 caused us to start compiling this test again. We
were not compiling it because more than 64k fields hits CodeView
limitations in LF_STRUCTURE/LF_CLASS (can't have more than 65534
_introduced fields_). We assert and crash compilation.

CoreCLR has it's own limitation of 65535 fields, including inherited,
but not counting `object.m_pEEType` (that doesn't exist in CoreCLR
CoreLib).

This changes the test to not have a class with > 65534 introduced
fields. This avoids the CodeView assert. We still don't generate correct
CodeView for bigger classes. Not sure if it's worth adding blocking. We
could block loading such types but 65534 is an odd number and CodeView
is an odd reason.

Cc @dotnet/ilc-contrib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure test-enhancement Improvements of test source code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants