[wasm] Add comments with linker fixes made for running aot tests in (#52006)
authorAnkit Jain <radical@gmail.com>
Tue, 1 Jun 2021 16:33:22 +0000 (12:33 -0400)
committerGitHub <noreply@github.com>
Tue, 1 Jun 2021 16:33:22 +0000 (12:33 -0400)
eng/testing/ILLinkDescriptors/ILLink.Descriptors.Serialization.xml
src/libraries/Microsoft.Extensions.Logging/tests/ILLink.Descriptors.xml
src/libraries/System.Reflection.MetadataLoadContext/tests/ILLink.Descriptors.xml
src/libraries/System.Reflection/tests/ILLink.Descriptors.xml
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/System.Text.Json.Tests.csproj

index 275c376..f40ef3c 100644 (file)
@@ -3,6 +3,8 @@
     <type fullname="System.Xml.Linq.XElement" />
   </assembly>
   <assembly fullname="System.Private.DataContractSerialization">
+
+   <!-- Issue: https://github.com/dotnet/runtime/issues/50730 -->
    <type fullname="System.Runtime.Serialization.KeyValuePairAdapter`2" />
   </assembly>
 </linker>
index e726c3e..eb67ab2 100644 (file)
@@ -1,5 +1,22 @@
 <linker>
   <assembly fullname="System.Diagnostics.TraceSource">
+      <!--
+      fail: [FAIL] Microsoft.Extensions.Logging.Test.TraceSourceLoggerTest.Log_Shoud_Add_Exception_To_Message_Whether_Formatter_Is_Null_Or_Not(shouldFormatterBeNull: True)
+        info: Castle.DynamicProxy.InvalidProxyConstructorArgumentsException : Can not instantiate proxy of class: System.Diagnostics.TraceListener.
+        info: Could not find a parameterless constructor.
+        info:    at Castle.DynamicProxy.ProxyGenerator.CreateClassProxyInstance(Type proxyType, List`1 proxyArguments, Type classToProxy, Object[] constructorArguments)
+        info:    at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors)
+        info:    at Moq.CastleProxyFactory.CreateProxy(Type mockType, IInterceptor interceptor, Type[] interfaces, Object[] arguments)
+        info:    at Moq.Mock`1[[System.Diagnostics.TraceListener, System.Diagnostics.TraceSource, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].InitializeInstance()
+        info:    at Moq.Mock`1[[System.Diagnostics.TraceListener, System.Diagnostics.TraceSource, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].OnGetObject()
+        info:    at Moq.Mock.get_Object()
+        info:    at Moq.Mock`1[[System.Diagnostics.TraceListener, System.Diagnostics.TraceSource, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].get_Object()
+        info:    at Microsoft.Extensions.Logging.Test.TraceSourceLoggerTest.<>c__DisplayClass2_0.<Log_Shoud_Add_Exception_To_Message_Whether_Formatter_Is_Null_Or_Not>b__0(ILoggingBuilder builder)
+        info:    at Microsoft.Extensions.DependencyInjection.LoggingServiceCollectionExtensions.AddLogging(IServiceCollection services, Action`1 configure)
+        info:    at Microsoft.Extensions.Logging.Test.TestLoggerBuilder.Create(Action`1 configure)
+        info:    at Microsoft.Extensions.Logging.Test.TraceSourceLoggerTest.Log_Shoud_Add_Exception_To_Message_Whether_Formatter_Is_Null_Or_Not(Boolean shouldFormatterBeNull)
+        info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
+      -->
     <type fullname="System.Diagnostics.TraceListener">
         <method signature="System.Void .ctor()" />
     </type>
index cf15f17..f42a20d 100644 (file)
@@ -1,3 +1,8 @@
 <linker>
+  <!--
+    System.Reflection.Tests.MetadataLoadContextTests.RelocatableAssembly load `mscorlib.dll` by name
+        `string mscorLibPath = Path.Combine(coreDirectory, "mscorlib.dll");`
+    Linker completely completely trims it out. So, preserve it explicitly.
+  -->
   <assembly fullname="mscorlib" />
 </linker>
index b36c80e..4e8f19b 100644 (file)
@@ -1,4 +1,15 @@
 <linker>
+  <!--
+ IList` implementation on `ArrayList` was getting trimmed
+
+```
+  fail: [FAIL] System.Reflection.Tests.TypeInfoTests.IsAssignable(type: typeof(System.Collections.IList), c: typeof(System.Collections.ArrayList), expected: True)
+  info: Assert.Equal() Failure
+  info: Expected: True
+  info: Actual:   False
+  info:    at System.Reflection.Tests.TypeInfoTests.IsAssignable(Type type, Type c, Boolean expected) in /Users/radical/dev/r3/src/libraries/System.Reflection/tests/TypeInfoTests.cs:line 580
+  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) in /Users/radical/dev/r3/src/mono/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.cs:line 378
+  -->
   <assembly fullname="System.Private.CoreLib">
     <type fullname="System.Collections.ArrayList" />
   </assembly>
index c922ce8..ee45bdc 100644 (file)
@@ -5,7 +5,8 @@
     <!-- SYSLIB0020: JsonSerializerOptions.IgnoreNullValues is obsolete -->
     <NoWarn>$(NoWarn);SYSLIB0020</NoWarn>
 
-    <!-- these tests depend on the pdb files -->
+    <!-- these tests depend on the pdb files. Causes test failures like:
+          [FAIL] System.Text.Json.Tests.DebuggerTests.DefaultJsonElement -->
     <DebuggerSupport Condition="'$(DebuggerSupport)' == '' and '$(TargetOS)' == 'Browser'">true</DebuggerSupport>
     <WasmXHarnessArgs>$(WasmXHarnessArgs) --timeout=1800</WasmXHarnessArgs>
   </PropertyGroup>