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

Convert the Remaining Legacy Tests to the Merged Wrapper Model #98469

Merged
merged 15 commits into from
Mar 18, 2024
Merged

Convert the Remaining Legacy Tests to the Merged Wrapper Model #98469

merged 15 commits into from
Mar 18, 2024

Conversation

ivdiazsa
Copy link
Member

@ivdiazsa ivdiazsa commented Feb 14, 2024

@ivdiazsa ivdiazsa added this to the 9.0.0 milestone Feb 14, 2024
@ghost ghost assigned ivdiazsa Feb 14, 2024
@ghost
Copy link

ghost commented Feb 14, 2024

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details

This PR intends to finish the efforts of the Test Consolidation Project. We are aiming to have our entire coreclr test system use the merged wrappers. The previous efforts are detailed in their respective PR's:

This is still a Work In Progress.

Author: ivdiazsa
Assignees: -
Labels:

area-Infrastructure-coreclr

Milestone: 9.0.0

{
Delegates.Run();
Devirtualization.Run();
// Generics.Run();
Copy link
Member

Choose a reason for hiding this comment

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

Seems like a functional change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh if you mean having Generics.Run() commented out, that's just temporarily. I was running into some build issues but I wanted to test in CI for a more complete feedback. It will be restored before moving this PR from "Draft" to "Ready for Review".

@ivdiazsa
Copy link
Member Author

/azp run runtime-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

feasible to migrate them, at least for the time being.
@ivdiazsa ivdiazsa marked this pull request as ready for review March 6, 2024 17:09
@ivdiazsa
Copy link
Member Author

ivdiazsa commented Mar 6, 2024

@jkoritzinsky Besides reenabling that Generics.Run() I commented out, the test consolidation PR is ready for review 😄

@ivdiazsa
Copy link
Member Author

ivdiazsa commented Mar 6, 2024

/azp run runtime-coreclr outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivdiazsa
Copy link
Member Author

ivdiazsa commented Mar 6, 2024

/azp run runtime-coreclr outerloop

Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

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

LGTM, just a few comments

Comment on lines +5 to +15
<!-- Due to the nature of the MultiModule tests, it is unfeasible to convert
them to the Merged Wrapper system.

The main idea of these ones is that we pre-NativeAOT the whole framework,
then NativeAOT each assembly separately, and then link them all together
at the end using the native linker.

So, when we try using the Merged Wrapper system, nothing ends up producing
the code for xunit.assert, as its assembly is not in the actual framework.
-->
<MergedWrapperProjectReference Remove="SmokeTests/MultiModule/*.csproj" />
Copy link
Member

Choose a reason for hiding this comment

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

If we mark the MultiModule tests as "RequiresProcessIsolation", then we shouldn't be getting warnings here. My guess is that I never hooked up the MSBuild logic for the "out of process" tests to exclude them as inputs to ILC. If you want to fix in this this PR, you can. Otherwise, can you file a follow-up issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

I can confirm that adding <RequiresProcessIsolation> removes the warnings from this test. So, just to confirm, the follow-up issue is to write the necessary logic to exclude out-of-process tests from being inputs to ILC. Is this accurate?

Copy link
Member

Choose a reason for hiding this comment

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

Yep!

<!-- Shouldn't need this: https://github.com/dotnet/linker/issues/2618 -->
<NoWarn>$(NoWarn);IL2050</NoWarn>

<RequiresProcessIsolation>true</RequiresProcessIsolation>
Copy link
Member

Choose a reason for hiding this comment

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

For tests that are legitimately marked as RequiresProcessIsolation due to something in the test, we should add comments explaining why so when we come around and clean up some of them in the future, we know which ones need to stay.

Suggested change
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<!-- Registers a global ComWrappers instance for marshalling -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>

<CLRTestPriority>0</CLRTestPriority>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<StartupHookSupport>true</StartupHookSupport>
<NoWarn>$(NoWarn);IL2026</NoWarn>
<RequiresProcessIsolation>true</RequiresProcessIsolation>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<RequiresProcessIsolation>true</RequiresProcessIsolation>
<!-- Uses a custom test environment variable -->
<RequiresProcessIsolation>true</RequiresProcessIsolation>

@ivdiazsa ivdiazsa merged commit 41c6057 into dotnet:main Mar 18, 2024
70 of 72 checks passed
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Mar 20, 2024
dotnet#98469 deleted this line. The test is generating half a dozen of these warnings, so put it back.
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Mar 20, 2024
dotnet#98469 regressed a development scenario around passing command line arguments to this test. Command line argument can selectively choose one test to run. This is extremely useful when there’s test failures. The test does a ton of things and ability to zoom in is useful.

Alternatively, we could put the test on the non-merged plan, same way we left nativeaot\SmokeTests\ControlFlowGuard on the non-merged plan (I assume for the same reason because it uses command line arguments?). I would prefer that solution but made a PR for the other approach because if I understand it correctly, we don't want to leave tests like that.
MichalStrehovsky added a commit that referenced this pull request Mar 20, 2024
#98469 deleted this line. The test is generating half a dozen of these warnings, so put it back.
MichalStrehovsky added a commit to MichalStrehovsky/runtime that referenced this pull request Mar 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants