Skip to content

[NativeAot] Start running 8 more libs tests#73283

Merged
MichalStrehovsky merged 8 commits into
dotnet:mainfrom
MichalStrehovsky:moretests5
Aug 5, 2022
Merged

[NativeAot] Start running 8 more libs tests#73283
MichalStrehovsky merged 8 commits into
dotnet:mainfrom
MichalStrehovsky:moretests5

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

No description provided.

@ghost ghost added the area-Meta label Aug 3, 2022
@ghost ghost assigned MichalStrehovsky Aug 3, 2022
@ghost

ghost commented Aug 3, 2022

Copy link
Copy Markdown

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

Issue Details

null

Author: MichalStrehovsky
Assignees: -
Labels:

area-Meta

Milestone: -

@MichalStrehovsky

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

<Compile Include="$(CommonTestPath)System\RandomDataGenerator.cs"
Link="Common\System\RandomDataGenerator.cs" />
</ItemGroup>
<ItemGroup>

@LakshanF LakshanF Aug 3, 2022

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As you suggested, I had to add an rd.xml file to preserve UnicodeCategory for the other Globalization project test and it looks like there are similar failures with this project

Comment on lines +36 to +37
if (string.Empty.Length > 0)
limiterType = Type.GetType("System.Threading.RateLimiting.DefaultPartitionedRateLimiter`2, System.Threading.RateLimiting");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if (string.Empty.Length > 0)
limiterType = Type.GetType("System.Threading.RateLimiting.DefaultPartitionedRateLimiter`2, System.Threading.RateLimiting");
var expectedLimiterType = Type.GetType("System.Threading.RateLimiting.DefaultPartitionedRateLimiter`2, System.Threading.RateLimiting");
Assert.Equal(expectedLimiterType, limiterType);

We can validate the assumptions as part of the test.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That would still not fix the dataflow analysis because the analysis doesn't understand limiterType is now same as expectedLimiterType. I'm becoming allergic to these kinds of tests because it has been the same issues for 3 weeks now.

@jkotas jkotas Aug 4, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I understand that it would not help dataflow analysis, but it would eagerly catch cases where somebody renames the type that is used as internal implementation detail.

@MichalStrehovsky

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

}

[Theory, MemberData(nameof(KeyComponents))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBuiltWithAggressiveTrimming))]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It would be better to replace the insane expensive way to get the type using Linq by just calling GetType.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There's also dynamic keyword below that wasn't obvious to me why it was added. I assume there's a reason and not just whoever wrote it doesn't know what they're doing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I assume there's a reason and not just whoever wrote it doesn't know what they're doing.

I do not think there is a reason. This whole method was clearly written by somebody who did not know what they were doing.

@MichalStrehovsky

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@MichalStrehovsky

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

}

[Fact]
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]

@filipnavara filipnavara Aug 4, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Different fix in #73362 (f0bd0bf).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Feel free to cherry-pick that commit, or I can rebase my PR if this gets merged.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks! Merged your change and I'll back out this part.

@MichalStrehovsky

Copy link
Copy Markdown
Member Author

/azp run runtime-extra-platforms

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky MichalStrehovsky merged commit 5cdb322 into dotnet:main Aug 5, 2022
@MichalStrehovsky MichalStrehovsky deleted the moretests5 branch August 5, 2022 04:34
@ghost ghost locked as resolved and limited conversation to collaborators Sep 4, 2022
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.

5 participants