-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[mono] Re-enable tests that call MakeGenericType with non-RuntimeType arguments #64344
Conversation
… arguments Fixes dotnet#32743 The actual fix was in dotnet#58014
Tagging subscribers to this area: @dotnet/area-extensions-logging |
Replaces #64195 |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Some failures on wasm and tvOS. In both cases it looks like the tests probably need to be disabled. Wasm example. Looks like it's trying to find an assembly in the file system, which won't work:
tvOS example.
|
The wasm ones are failing to get the assembly location with |
`Microsoft.Extensions.Logging.Generators.Tests.LoggerMessageGeneratorEmitterTests.*` `Microsoft.Extensions.Logging.Generators.Tests.LoggerMessageGeneratorParserTests.*` .. failing like: ``` [18:09:38] fail: [FAIL] Microsoft.Extensions.Logging.Generators.Tests.LoggerMessageGeneratorParserTests.NotPartial [18:09:38] info: System.ArgumentException : Empty path name is not legal. (Parameter 'path') [18:09:38] info: at System.IO.Strategies.FileStreamHelpers.ValidateArguments(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) [18:09:38] info: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize) [18:09:38] info: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [18:09:38] info: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) [18:09:38] info: at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) [18:09:38] info: at Roslyn.Utilities.StandardFileSystem.OpenFile(String filePath, FileMode mode, FileAccess access, FileShare share) [18:09:38] info: at Roslyn.Utilities.CommonCompilerFileSystemExtensions.OpenFileWithNormalizedException(ICommonCompilerFileSystem fileSystem, String filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) [18:09:38] info: at Microsoft.CodeAnalysis.MetadataReference.CreateFromFile(String path, MetadataReferenceProperties properties, DocumentationProvider documentation) [18:09:38] info: at SourceGenerators.Tests.RoslynTestUtils.CreateTestProject(IEnumerable`1 references, Boolean includeBaseReferences) [18:09:38] info: at SourceGenerators.Tests.RoslynTestUtils.RunGenerator(ISourceGenerator generator, IEnumerable`1 references, IEnumerable`1 sources, Boolean includeBaseReferences, CancellationToken cancellationToken) [18:09:38] info: at Microsoft.Extensions.Logging.Generators.Tests.LoggerMessageGeneratorParserTests.RunGenerator(String code, Boolean wrap, Boolean inNamespace, Boolean includeBaseReferences, Boolean includeLoggingReferences, CancellationToken cancellationToken) [18:09:38] info: at Microsoft.Extensions.Logging.Generators.Tests.LoggerMessageGeneratorParserTests.NotPartial() [18:09:38] info: --- End of stack trace from previous location --- ``` .. due to dotnet#52062 .
`System.ComponentModel.Composition.Registration.Tests.RegistrationBuilderTests.ExplicitGenericExportInRegistrationBuilder` `System.ComponentModel.Composition.Registration.Tests.RegistrationBuilderTests.ExplicitGenericArity2ExportInRegistrationBuilder` `System.ComponentModel.Composition.Registration.Tests.RegistrationBuilderTests.GenericBaseClassExportInRegistrationBuilder` `System.ComponentModel.Composition.Registration.Tests.RegistrationBuilderTests.GenericInterfaceExportInRegistrationBuilder` `System.ComponentModel.Composition.Registration.Tests.RegistrationBuilderTests.ShouldSucceed` .. failing due to dotnet#32743 .
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
@@ -45,7 +45,7 @@ public DiscoveredCatalog() | |||
} | |||
|
|||
[Fact] | |||
[ActiveIssue("https://github.com/dotnet/runtime/issues/32743", TestRuntimes.Mono)] | |||
[ActiveIssue("https://github.com/dotnet/runtime/issues/32743", TestPlatforms.tvOS)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@radical I don't think this is an ActiveIssue. (or at least 32743 is misleading). I don't think we can support MakeGenericType for non-RuntimeType types in FullAOT (without interpreter fallback).
I think this should be [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotMonoAot))]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, this is not tvOS specific. Using RuntimeFeature.IsDynamicCode
or whatever flag NativeAOT uses would be better
/cc @jkotas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's
public static bool IsReflectionEmitSupported => RuntimeFeature.IsDynamicCodeSupported; |
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsReflectionEmitSupported)]
Which brings up the question: do we run these tests with NativeAOT? I would expect them to fail there, too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which brings up the question: do we run these tests with NativeAOT?
Not yet. @MichalStrehovsky is working on increasing the test coverage for NativeAOT.
…hat don't support it
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
Failures are #64389 |
The re-enabled
Perhaps, it's being tracked in #34582 |
…LoggerMessageGeneratorEmitterTests with ActiveIssue (#64436) Addresses #64344 (comment) ... and skips System.Reflection.Emit.Tests.ModuleBuilderDefineInitializedData.DefineInitializedData_EnsureAlignmentIsMinimumNeededForUseOfCreateSpan test which requires reflection emit and fails on tvOS arm64 leg.
Partially fixes #32743
The actual fix was in #58014
Some of the re-enabled tests failed on wasm due to #52062, so those have been disabled here.