Skip to content

Conversation

@EgorBo
Copy link
Member

@EgorBo EgorBo commented Nov 22, 2019

Crashes on mono with interpreter (IsDynamicCodeCompiled is false). Does this test make any sense? There is already https://github.com/EgorBo/runtime/blob/93ad80eb64aabc2df2d93a136c2f86b73f590b87/src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeFeatureTests.cs#L20-L29

or I should wrap the test with some check (e.g. IsCoreCLR or !isMono etc)

@stephentoub
Copy link
Member

Crashes on mono

Crashes? Or the test just fails?

If it crashes, that should be fixed in mono.

Once #118 is merged, the same attributes should be usable to disable this on mono (right, @safern?)

{
Assert.True(RuntimeFeature.IsDynamicCodeSupported);
Assert.True(RuntimeFeature.IsDynamicCodeCompiled);
}
Copy link
Member

Choose a reason for hiding this comment

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

We shouldn't delete this. We can make it coreclr-specific if it not correct on mono, or better yet, add the corresponding test for mono's results.

Copy link
Member

Choose a reason for hiding this comment

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

Depending on where and how Mono is used all of these combinations are valid, e.g. Desktop Mono returns true for both, but Xamarin.iOS returns false for both, except if the interpreter is enabled then IsDynamicCodeSupported is true and IsDynamicCodeCompiled is false.

I'd say we make this test CoreCLR specific for now.

Copy link
Member Author

@EgorBo EgorBo Nov 23, 2019

Choose a reason for hiding this comment

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

Yeah we currently don't have a C# API to detect current mode (is fullaot? is interp? etc) properly so I disabled the test for mono.

@akoeplinger
Copy link
Member

Crashes? Or the test just fails?

It fails.

@safern
Copy link
Member

safern commented Nov 25, 2019

Once #118 is merged, the same attributes should be usable to disable this on mono (right, @safern?)

Right, not exactly the same attribute, we added one specific for mono SkipOnMonoAttribute. I plan to submit a follow up PR to skip mono tests.

@akoeplinger
Copy link
Member

Does this PR need to wait until the new attribute is available or can we merge it as is?

@safern
Copy link
Member

safern commented Nov 26, 2019

Does this PR need to wait until the new attribute is available or can we merge it as is?

The new attributes should now be available. We got an arcade update yesterday.

So it would be nice to use them for this PR instead. Here is the PR that added them and it has examples on how to use them: dotnet/arcade#4231

@akoeplinger akoeplinger changed the title Remove DynamicCode_Jit test from System.Runtime.Tests Disable DynamicCode_Jit test from System.Runtime.Tests on Mono Nov 26, 2019
@akoeplinger akoeplinger merged commit dfcf884 into dotnet:master Nov 26, 2019
@MihaZupan
Copy link
Member

@akoeplinger looks like this is failing tests on all other PRs now due to the missing reason on SkipOnMono

@safern
Copy link
Member

safern commented Nov 27, 2019

I don't even understand how this build was green. That's really odd, but yeah reason is missing:

https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.XUnitExtensions/src/Attributes/SkipOnMonoAttribute.cs#L12

@safern
Copy link
Member

safern commented Nov 27, 2019

I created: #324

@akoeplinger
Copy link
Member

@safern so I checked the build results that are attached to 5f3f3c9 (the latest commit in this PR) and the build actually checked out e45b79d!

Look for the HEAD is now at 3fe34b79 Merge e45b79d26fcee9770842c9681e6907430b08aebc into bf88f146412d1e2d41779422337184a802f186c9 message in Checkout step.

This means it ran against a previous version of the code. Sounds like some weird AzDO bug, did you see this previously?

@EgorBo
Copy link
Member Author

EgorBo commented Nov 27, 2019

Oops. sorry, didn't notice the argument and wanted to test on CI and it somehow validated it.

@MihaZupan
Copy link
Member

I've opened a ticket on this CI behavior

@safern
Copy link
Member

safern commented Nov 27, 2019

I believe @jashook has mentioned this someday last week and that they let AzDo know already but I’ll let him confirm.

@EgorBo EgorBo deleted the remove-dynamic-test branch May 25, 2020 11:57
MichalStrehovsky pushed a commit to MichalStrehovsky/runtime that referenced this pull request Nov 4, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2020
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.

6 participants