Skip to content

[NativeAot] Start running 8 more libs tests #73283

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

Merged
merged 8 commits into from
Aug 5, 2022

Conversation

MichalStrehovsky
Copy link
Member

No description provided.

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

ghost commented Aug 3, 2022

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
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -222,6 +222,9 @@
<Compile Include="$(CommonTestPath)System\RandomDataGenerator.cs"
Link="Common\System\RandomDataGenerator.cs" />
</ItemGroup>
<ItemGroup>
Copy link
Contributor

@LakshanF LakshanF Aug 3, 2022

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
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
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.

Copy link
Member

@jkotas jkotas Aug 4, 2022

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
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -23,7 +23,8 @@ public static IEnumerable<object[]> KeyComponents()
yield return new object[] { "Http", "localhost", 80, "localhost-ssl", new Uri("http://localhost"), "domain1/userA", true };
}

[Theory, MemberData(nameof(KeyComponents))]
[ConditionalTheory(typeof(PlatformDetection), nameof(PlatformDetection.IsNotBuiltWithAggressiveTrimming))]
Copy link
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
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
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
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

Thanks

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -18,7 +19,7 @@ public NegotiateAuthenticationKerberosTest(ITestOutputHelper testOutputHelper)
_testOutputHelper = testOutputHelper;
}

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

@filipnavara filipnavara Aug 4, 2022

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
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
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
Member Author

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

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