Skip to content

[mono][ios] System.Diagnostics.Debug.Tests fail when processed with ILStrip #87740

Description

@kotlarmilos

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions