Skip to content
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][ios] System.Diagnostics.Debug.Tests fail when processed with ILStrip #87740

Open
kotlarmilos opened this issue Jun 18, 2023 · 4 comments
Assignees
Labels
area-Codegen-AOT-mono disabled-test The test is disabled in source code against the issue os-ios Apple iOS
Milestone

Comments

@kotlarmilos
Copy link
Member

kotlarmilos commented Jun 18, 2023

Description

Trace and debug listeners processed with ILStrip result in unexpected behavior in System.Diagnostics.Debug.Tests.

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=311276&view=results

[16:07:44.5399050] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 15) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: 6, format: "G", expected: "C, D")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5406360] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5406680]    Exception messages: Assert.Equal() Failure
[16:07:44.5406750]           ↓ (pos 0)
[16:07:44.5406810] Expected: C, D
[16:07:44.5406880] Actual:   6
[16:07:44.5406970] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5407200]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5407250]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5407290]    Execution time: 0.0000894
[16:07:44.5407710] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 16) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: 6, format: "G", expected: "C, D")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5407780] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5407830]    Exception messages: Assert.Equal() Failure
[16:07:44.5407860]           ↓ (pos 0)
[16:07:44.5407900] Expected: C, D
[16:07:44.5407940] Actual:   6
[16:07:44.5408000] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5408060]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5408110]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5408150]    Execution time: 0.0000287
[16:07:44.5408430] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 17) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: 1048575, format: "G", expected: "B, A")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5408520] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5408610]    Exception messages: Assert.Equal() Failure
[16:07:44.5408690]           ↓ (pos 0)
[16:07:44.5408930] Expected: B, A
[16:07:44.5408990] Actual:   1048575
[16:07:44.5409060] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5409130]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5409200]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5409250]    Execution time: 0.0000238
[16:07:44.5409400] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 18) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: -1, format: "G", expected: "B, C")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5409460] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5409520]    Exception messages: Assert.Equal() Failure
[16:07:44.5409580]           ↓ (pos 0)
[16:07:44.5409640] Expected: B, C
[16:07:44.5409690] Actual:   -1
[16:07:44.5409750] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5409800]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5409850]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5409880]    Execution time: 0.0000225
[16:07:44.5409940] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 19) 	[FAIL] System.Reflection.Tests.ModuleTests.CustomAttributes   Test name: System.Reflection.Tests.ModuleTests.CustomAttributes
[16:07:44.5409990]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5410280] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5410350] Expected: True
[16:07:44.5410420] Actual:   False   Exception stack traces:    at System.Reflection.Tests.ModuleTests.CustomAttributes()
[16:07:44.5410480]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5410550] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5410740]    Execution time: 0.000313
[16:07:44.5410800] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 20) 	[FAIL] System.Reflection.Tests.MethodBodyTests.Test_MethodBody_ExceptionHandlingClause   Test name: System.Reflection.Tests.MethodBodyTests.Test_MethodBody_ExceptionHandlingClause
[16:07:44.5410860] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5410900]    Exception messages: Assert.True() Failure
[16:07:44.5410950] Expected: True
[16:07:44.5411050] Actual:   False   Exception stack traces:    at System.Reflection.Tests.MethodBodyTests.Test_MethodBody_ExceptionHandlingClause()
[16:07:44.5411120] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5411170]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5411220]    Execution time: 0.0001779
[16:07:44.5411300] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 21) 	[FAIL] System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest   Test name: System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest(propertyName: "PropertyNonNullable", readState: NotNull, writeState: NotNull, type: typeof(System.Reflection.Tests.NullabilityInfoContextTests))   Test case: System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest
[16:07:44.5411340]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5411390] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.Equal() Failure
[16:07:44.5411430] Expected: NotNull
[16:07:44.5411530] Actual:   Nullable   Exception stack traces:    at System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest(String propertyName, NullabilityState readState, NullabilityState writeState, Type type)
[16:07:44.5411580] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5411620]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5411660]    Execution time: 0.000095
[16:07:44.5411730] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 22) 	[FAIL] System.Reflection.Tests.NullabilityInfoContextTests.EventTest   Test name: System.Reflection.Tests.NullabilityInfoContextTests.EventTest(eventName: "EventUnknown", readState: Unknown, writeState: Unknown, type: typeof(System.EventHandler))   Test case: System.Reflection.Tests.NullabilityInfoContextTests.EventTest
[16:07:44.5411780]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5411820]    Exception messages: Assert.Equal() Failure
[16:07:44.5411860] Expected: Unknown
[16:07:44.5411990] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] Actual:   Nullable   Exception stack traces:    at System.Reflection.Tests.NullabilityInfoContextTests.EventTest(String eventName, NullabilityState readState, NullabilityState writeState, Type type)
[16:07:44.5412050] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5412110]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5412160]    Execution time: 0.0000934
[16:07:44.5412270] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898] 23) 	[FAIL] System.Reflection.Tests.NullabilityInfoContextTests.EventTest   Test name: System.Reflection.Tests.NullabilityInfoContextTests.EventTest(eventName: "EventNotNull", readState: NotNull, writeState: NotNull, type: typeof(System.EventHandler))   Test case: System.Reflection.Tests.NullabilityInfoContextTests.EventTest
[16:07:44.5412320]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5412390]    Exception messages: Assert.Equal() Failure
[16:07:44.5412440] Expected: NotNull
[16:07:44.5412500] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898] Actual:   Nullable   Exception stack traces:    at System.Reflection.Tests.NullabilityInfoContextTests.EventTest(String eventName, NullabilityState readState, NullabilityState writeState, Type type)
[16:07:44.5412540] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
@ghost
Copy link

ghost commented Jun 18, 2023

Tagging subscribers to 'os-ios': @steveisok, @akoeplinger, @kotlarmilos
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

Library tests are on a device with IL stripping enabled during AOT compilation.

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=311276&view=results

[16:07:44.5381530] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] Failed tests:
[16:07:44.5382410] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 1) 	[FAIL] System.Runtime.CompilerServices.Tests.RuntimeHelpersTests.GetUninitializedObject_InvalidArguments_ThrowsException   Test name: System.Runtime.CompilerServices.Tests.RuntimeHelpersTests.GetUninitializedObject_InvalidArguments_ThrowsException(typeToInstantiate: typeof(System.ArgIterator), expectedExceptionType: typeof(System.NotSupportedException))   Test case: System.Runtime.CompilerServices.Tests.RuntimeHelpersTests.GetUninitializedObject_InvalidArguments_ThrowsException
[16:07:44.5382540] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5382650]    Exception messages: Assert.Throws() Failure
[16:07:44.5382720] Expected: typeof(System.NotSupportedException)
[16:07:44.5382860] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] Actual:   (No exception was thrown)   Exception stack traces:    at System.Runtime.CompilerServices.Tests.RuntimeHelpersTests.GetUninitializedObject_InvalidArguments_ThrowsException(Type typeToInstantiate, Type expectedExceptionType)
[16:07:44.5382940]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5383070] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5383150]    Execution time: 0.0002828
[16:07:44.5383220] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 2) 	[FAIL] System.Tests.GetCustomAttribute.PositiveTest2   Test name: System.Tests.GetCustomAttribute.PositiveTest2
[16:07:44.5383280]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5383350] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5383410] Expected: True
[16:07:44.5383480] Actual:   False   Exception stack traces:    at System.Tests.GetCustomAttribute.PositiveTest2()
[16:07:44.5383550]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5383650] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5383690]    Execution time: 0.0005645
[16:07:44.5383760] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 3) 	[FAIL] System.Tests.GetCustomAttribute.customAttributeCount   Test name: System.Tests.GetCustomAttribute.customAttributeCount
[16:07:44.5383840]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5384630] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.Equal() Failure
[16:07:44.5384980] Expected: 5
[16:07:44.5385200] Actual:   0   Exception stack traces:    at System.Tests.GetCustomAttribute.customAttributeCount()
[16:07:44.5385280]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5385360] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5385570]    Execution time: 0.0012582
[16:07:44.5385630] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 4) 	[FAIL] System.Tests.GetCustomAttribute.PositiveTest6   Test name: System.Tests.GetCustomAttribute.PositiveTest6
[16:07:44.5385830]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5386310] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5387010] Expected: True
[16:07:44.5387170] Actual:   False   Exception stack traces:    at System.Tests.GetCustomAttribute.PositiveTest6()
[16:07:44.5387270]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5387490] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5387800]    Execution time: 0.0001241
[16:07:44.5388060] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 5) 	[FAIL] System.Tests.GetCustomAttribute.PositiveTest1   Test name: System.Tests.GetCustomAttribute.PositiveTest1
[16:07:44.5388160]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5388240] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5388350] Expected: True
[16:07:44.5388420] Actual:   False   Exception stack traces:    at System.Tests.GetCustomAttribute.PositiveTest1()
[16:07:44.5388520]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5388570] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5388630]    Execution time: 0.0000337
[16:07:44.5388700] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 6) 	[FAIL] System.Tests.GetCustomAttribute.NegTest2   Test name: System.Tests.GetCustomAttribute.NegTest2
[16:07:44.5388790]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5388860] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.Throws() Failure
[16:07:44.5388920] Expected: typeof(System.Reflection.AmbiguousMatchException)
[16:07:44.5388990] Actual:   (No exception was thrown)   Exception stack traces:    at System.Tests.GetCustomAttribute.NegTest2()
[16:07:44.5389070]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5389220] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5389290]    Execution time: 0.0001105
[16:07:44.5389590] 2023-06-17 16:07:44.622 System.Runtime.Tests[50228:145586898] 7) 	[FAIL] System.Tests.GetCustomAttribute.PositiveTest5   Test name: System.Tests.GetCustomAttribute.PositiveTest5
[16:07:44.5389660]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5389710] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5389750] Expected: True
[16:07:44.5389810] Actual:   False   Exception stack traces:    at System.Tests.GetCustomAttribute.PositiveTest5()
[16:07:44.5389870]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5393010] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5393210]    Execution time: 0.0000576
[16:07:44.5393400] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 8) 	[FAIL] System.Tests.GetCustomAttribute.NegTest1   Test name: System.Tests.GetCustomAttribute.NegTest1
[16:07:44.5393520]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5393860] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.Throws() Failure
[16:07:44.5393990] Expected: typeof(System.Reflection.AmbiguousMatchException)
[16:07:44.5394080] Actual:   (No exception was thrown)   Exception stack traces:    at System.Tests.GetCustomAttribute.NegTest1()
[16:07:44.5394150]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5394220] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5394280]    Execution time: 0.0000927
[16:07:44.5394360] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 9) 	[FAIL] System.Tests.ArrayTests.CreateInstance_NotSupportedType_ThrowsNotSupportedException   Test name: System.Tests.ArrayTests.CreateInstance_NotSupportedType_ThrowsNotSupportedException(elementType: typeof(System.ArgIterator))   Test case: System.Tests.ArrayTests.CreateInstance_NotSupportedType_ThrowsNotSupportedException
[16:07:44.5394500]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5394570]    Exception messages: Assert.Throws() Failure
[16:07:44.5394630] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] Expected: typeof(System.NotSupportedException)
[16:07:44.5394690] Actual:   (No exception was thrown)   Exception stack traces:    at System.Tests.ArrayTests.CreateInstance_NotSupportedType_ThrowsNotSupportedException(Type elementType)
[16:07:44.5394750] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5394790]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5394830]    Execution time: 0.0000746
[16:07:44.5394990] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 10) 	[FAIL] System.Runtime.CompilerServices.Tests.MethodImplAttributeTests.AggressiveOptimizationTest   Test name: System.Runtime.CompilerServices.Tests.MethodImplAttributeTests.AggressiveOptimizationTest
[16:07:44.5395070] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5395110]    Exception messages: Assert.Equal() Failure
[16:07:44.5395150] Expected: AggressiveOptimization
[16:07:44.5395210] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] Actual:   520   Exception stack traces:    at System.Runtime.CompilerServices.Tests.MethodImplAttributeTests.AggressiveOptimizationTest()
[16:07:44.5395250]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5395300]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5395340]    Execution time: 0.0005066
[16:07:44.5395430] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 11) 	[FAIL] System.Text.Tests.CompositeFormatTests.DebuggerDisplay_ShowsFormat   Test name: System.Text.Tests.CompositeFormatTests.DebuggerDisplay_ShowsFormat
[16:07:44.5395490] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5395550]    Exception messages: System.InvalidOperationException : Expected one DebuggerDisplayAttribute on System.Text.CompositeFormat.   Exception stack traces:    at System.Diagnostics.DebuggerAttributes.ValidateDebuggerDisplayReferences(Object obj)
[16:07:44.5395640] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Text.Tests.CompositeFormatTests.DebuggerDisplay_ShowsFormat()
[16:07:44.5395690]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5395740]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5395780] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Execution time: 0.0002337
[16:07:44.5395840] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 12) 	[FAIL] System.Reflection.Tests.MethodBaseTests.TestMethodBody   Test name: System.Reflection.Tests.MethodBaseTests.TestMethodBody
[16:07:44.5395880]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5395930] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5395970] Expected: True
[16:07:44.5396020] Actual:   False   Exception stack traces:    at System.Reflection.Tests.MethodBaseTests.TestMethodBody()
[16:07:44.5396060]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5396160] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5396210]    Execution time: 0.0002241
[16:07:44.5396270] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 13) 	[FAIL] System.Tests.TypeTests.TestIsByRefLike   Test name: System.Tests.TypeTests.TestIsByRefLike(type: typeof(System.ArgIterator), expected: True)   Test case: System.Tests.TypeTests.TestIsByRefLike
[16:07:44.5396330] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5396370]    Exception messages: Assert.Equal() Failure
[16:07:44.5396400] Expected: True
[16:07:44.5396450] Actual:   False   Exception stack traces:    at System.Tests.TypeTests.TestIsByRefLike(Type type, Boolean expected)
[16:07:44.5396500] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5396740]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5396800]    Execution time: 0.0000773
[16:07:44.5397520] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 14) 	[FAIL] System.Tests.TypeTests.MakeArrayType_ByRef_ThrowsTypeLoadException   Test name: System.Tests.TypeTests.MakeArrayType_ByRef_ThrowsTypeLoadException(t: typeof(System.ArgIterator))   Test case: System.Tests.TypeTests.MakeArrayType_ByRef_ThrowsTypeLoadException
[16:07:44.5397670]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5397740]    Exception messages: Assert.Throws() Failure
[16:07:44.5397780] Expected: typeof(System.TypeLoadException)
[16:07:44.5397860] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] Actual:   (No exception was thrown)   Exception stack traces:    at System.Tests.TypeTests.MakeArrayType_ByRef_ThrowsTypeLoadException(Type t)
[16:07:44.5397930]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5398210] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5398300]    Execution time: 0.0000485
[16:07:44.5399050] 2023-06-17 16:07:44.623 System.Runtime.Tests[50228:145586898] 15) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: 6, format: "G", expected: "C, D")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5406360] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5406680]    Exception messages: Assert.Equal() Failure
[16:07:44.5406750]           ↓ (pos 0)
[16:07:44.5406810] Expected: C, D
[16:07:44.5406880] Actual:   6
[16:07:44.5406970] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5407200]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5407250]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5407290]    Execution time: 0.0000894
[16:07:44.5407710] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 16) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: 6, format: "G", expected: "C, D")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5407780] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5407830]    Exception messages: Assert.Equal() Failure
[16:07:44.5407860]           ↓ (pos 0)
[16:07:44.5407900] Expected: C, D
[16:07:44.5407940] Actual:   6
[16:07:44.5408000] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5408060]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5408110]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5408150]    Execution time: 0.0000287
[16:07:44.5408430] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 17) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: 1048575, format: "G", expected: "B, A")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5408520] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5408610]    Exception messages: Assert.Equal() Failure
[16:07:44.5408690]           ↓ (pos 0)
[16:07:44.5408930] Expected: B, A
[16:07:44.5408990] Actual:   1048575
[16:07:44.5409060] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5409130]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5409200]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5409250]    Execution time: 0.0000238
[16:07:44.5409400] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 18) 	[FAIL] System.Tests.EnumTests.ToString_Format   Test name: System.Tests.EnumTests.ToString_Format(e: -1, format: "G", expected: "B, C")   Test case: System.Tests.EnumTests.ToString_Format
[16:07:44.5409460] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5409520]    Exception messages: Assert.Equal() Failure
[16:07:44.5409580]           ↓ (pos 0)
[16:07:44.5409640] Expected: B, C
[16:07:44.5409690] Actual:   -1
[16:07:44.5409750] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]           ↑ (pos 0)   Exception stack traces:    at System.Tests.EnumTests.ToString_Format(Enum e, String format, String expected)
[16:07:44.5409800]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5409850]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5409880]    Execution time: 0.0000225
[16:07:44.5409940] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 19) 	[FAIL] System.Reflection.Tests.ModuleTests.CustomAttributes   Test name: System.Reflection.Tests.ModuleTests.CustomAttributes
[16:07:44.5409990]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5410280] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.True() Failure
[16:07:44.5410350] Expected: True
[16:07:44.5410420] Actual:   False   Exception stack traces:    at System.Reflection.Tests.ModuleTests.CustomAttributes()
[16:07:44.5410480]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5410550] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5410740]    Execution time: 0.000313
[16:07:44.5410800] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 20) 	[FAIL] System.Reflection.Tests.MethodBodyTests.Test_MethodBody_ExceptionHandlingClause   Test name: System.Reflection.Tests.MethodBodyTests.Test_MethodBody_ExceptionHandlingClause
[16:07:44.5410860] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5410900]    Exception messages: Assert.True() Failure
[16:07:44.5410950] Expected: True
[16:07:44.5411050] Actual:   False   Exception stack traces:    at System.Reflection.Tests.MethodBodyTests.Test_MethodBody_ExceptionHandlingClause()
[16:07:44.5411120] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5411170]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5411220]    Execution time: 0.0001779
[16:07:44.5411300] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 21) 	[FAIL] System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest   Test name: System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest(propertyName: "PropertyNonNullable", readState: NotNull, writeState: NotNull, type: typeof(System.Reflection.Tests.NullabilityInfoContextTests))   Test case: System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest
[16:07:44.5411340]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5411390] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    Exception messages: Assert.Equal() Failure
[16:07:44.5411430] Expected: NotNull
[16:07:44.5411530] Actual:   Nullable   Exception stack traces:    at System.Reflection.Tests.NullabilityInfoContextTests.PropertyTest(String propertyName, NullabilityState readState, NullabilityState writeState, Type type)
[16:07:44.5411580] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5411620]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5411660]    Execution time: 0.000095
[16:07:44.5411730] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] 22) 	[FAIL] System.Reflection.Tests.NullabilityInfoContextTests.EventTest   Test name: System.Reflection.Tests.NullabilityInfoContextTests.EventTest(eventName: "EventUnknown", readState: Unknown, writeState: Unknown, type: typeof(System.EventHandler))   Test case: System.Reflection.Tests.NullabilityInfoContextTests.EventTest
[16:07:44.5411780]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5411820]    Exception messages: Assert.Equal() Failure
[16:07:44.5411860] Expected: Unknown
[16:07:44.5411990] 2023-06-17 16:07:44.624 System.Runtime.Tests[50228:145586898] Actual:   Nullable   Exception stack traces:    at System.Reflection.Tests.NullabilityInfoContextTests.EventTest(String eventName, NullabilityState readState, NullabilityState writeState, Type type)
[16:07:44.5412050] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
[16:07:44.5412110]    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
[16:07:44.5412160]    Execution time: 0.0000934
[16:07:44.5412270] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898] 23) 	[FAIL] System.Reflection.Tests.NullabilityInfoContextTests.EventTest   Test name: System.Reflection.Tests.NullabilityInfoContextTests.EventTest(eventName: "EventNotNull", readState: NotNull, writeState: NotNull, type: typeof(System.EventHandler))   Test case: System.Reflection.Tests.NullabilityInfoContextTests.EventTest
[16:07:44.5412320]    Assembly:  [System.Runtime.Tests, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
[16:07:44.5412390]    Exception messages: Assert.Equal() Failure
[16:07:44.5412440] Expected: NotNull
[16:07:44.5412500] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898] Actual:   Nullable   Exception stack traces:    at System.Reflection.Tests.NullabilityInfoContextTests.EventTest(String eventName, NullabilityState readState, NullabilityState writeState, Type type)
[16:07:44.5412540] 2023-06-17 16:07:44.625 System.Runtime.Tests[50228:145586898]    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, IntPtr* args)
Author: kotlarmilos
Assignees: -
Labels:

area-Codegen-AOT-mono, os-ios

Milestone: Future

@akoeplinger
Copy link
Member

@kotlarmilos this might have been fixed by #87923, would you mind trying to enable ILStrip again?

@kotlarmilos
Copy link
Member Author

Thanks, I will check it out.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 28, 2023
@kotlarmilos kotlarmilos modified the milestones: Future, 8.0.0 Jul 13, 2023
@kotlarmilos kotlarmilos modified the milestones: 8.0.0, 9.0.0 Jul 25, 2023
@kotlarmilos kotlarmilos self-assigned this Sep 11, 2023
@kotlarmilos
Copy link
Member Author

kotlarmilos commented Sep 11, 2023

Initial attempt was made in #88167. Additional tests have to be resolved:

  • Missing spaces from Debug.Indent() calls
  • BadImageFormatException: Read out of bounds

@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 11, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Dec 19, 2023
@kotlarmilos kotlarmilos changed the title [mono][ios] Library tests failing on device with IL stripping enabled during AOT compilation [mono][ios] System.Diagnostics.Debug.Tests fail when processed with ILStrip Jan 16, 2024
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jan 16, 2024
@kotlarmilos kotlarmilos added the disabled-test The test is disabled in source code against the issue label Feb 9, 2024
@kotlarmilos kotlarmilos modified the milestones: 9.0.0, Future Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-AOT-mono disabled-test The test is disabled in source code against the issue os-ios Apple iOS
Projects
None yet
Development

No branches or pull requests

2 participants