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] Tests failed on windows: System.Runtime.InteropServices.WindowsRuntime.Tests #34749

Closed
MaximLipnin opened this issue Apr 9, 2020 · 3 comments · Fixed by #36715
Closed
Labels
area-VM-meta-mono os-windows runtime-mono specific to the Mono runtime untriaged New issue has not been triaged by the area owner

Comments

@MaximLipnin
Copy link
Contributor

MaximLipnin commented Apr 9, 2020

System.Runtime.InteropServices.WindowsRuntime.Tests tests fail on windows mostly with System.PlatformNotSupportedException : Operation is not supported on this platform.

The following tests classes/methods will be marked with ActiveIssue in #32592:

  • System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests
  • System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTests
  • System.Runtime.InteropServices.WindowsRuntime.Tests.WindowsRuntimeMarshalTests
  • System.Runtime.InteropServices.WindowsRuntime.Tests.InterfaceImplementedInVersionAttributeTests.Ctor_DefaultInterface

The example of the output with the stack traces:

System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.Ctor_NonDelegateType_ThrowsInvalidOperationException [FAIL]
Assert.Throws() Failure
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.PlatformNotSupportedException): Operation is not supported on this platform.
---- System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(22,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.<>c.<Ctor_NonDelegateType_ThrowsInvalidOperationException>b__1_0()
    ----- Inner Stack Trace -----
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(22,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.<>c.<Ctor_NonDelegateType_ThrowsInvalidOperationException>b__1_0()
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.InvocationList_SetDelegate_GetReturnsExpected [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(171,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.InvocationList_SetDelegate_GetReturnsExpected()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_Null_ReturnsZeroToken [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(68,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_Null_ReturnsZeroToken()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_SingleInvocationList_AddsSingleDelegateToInvocationList [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(29,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_SingleInvocationList_AddsSingleDelegateToInvocationList()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Assert.Throws() Failure
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.GetOrCreateEventRegistrationTokenTable_NonDelegateType_ThrowsInvalidOperationException [FAIL]
Expected: typeof(System.InvalidOperationException)
Actual:   typeof(System.PlatformNotSupportedException): Operation is not supported on this platform.
---- System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(154,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.<>c__DisplayClass12_0.<GetOrCreateEventRegistrationTokenTable_NonDelegateType_ThrowsInvalidOperationException>b__0()
    ----- Inner Stack Trace -----
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(154,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.<>c__DisplayClass12_0.<GetOrCreateEventRegistrationTokenTable_NonDelegateType_ThrowsInvalidOperationException>b__0()
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_NullDelegate_Nop [FAIL]
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(130,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_NullDelegate_Nop()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_Token_RemovesFromTable [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(80,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_Token_RemovesFromTable()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_MultipleTimes_RemovesSingleDelegateFromTable [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(115,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_MultipleTimes_RemovesSingleDelegateFromTable()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_Delegate_RemovesFromTable [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(97,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.RemoveEventHandler_Delegate_RemovesFromTable()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.GetOrCreateEventRegistrationTokenTable_NullTable_ReturnsNewTable [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(138,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.GetOrCreateEventRegistrationTokenTable_NullTable_ReturnsNewTable()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_MultipleTimes_AddsEachDelegateToInvocationList [FAIL]
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(54,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_MultipleTimes_AddsEachDelegateToInvocationList()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_MultipleInvocationList_AddsAllDelegateToInvocationLists [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(43,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.AddEventHandler_MultipleInvocationList_AddsAllDelegateToInvocationLists()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.GetOrCreateEventRegistrationTokenTable_NonNullTable_ReturnsEventTable [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(145,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.GetOrCreateEventRegistrationTokenTable_NonNullTable_ReturnsEventTable()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.InvocationList_SetNull_GetReturnsNull [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(160,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.InvocationList_SetNull_GetReturnsNull()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.Ctor_Default [FAIL]
System.PlatformNotSupportedException : Operation is not supported on this platform.
Stack Trace:
    _\src\libraries\System.Runtime.InteropServices.WindowsRuntime\tests\System\Runtime\InteropServices\WindowsRuntime\EventRegistrationTokenTableTests.cs(15,0): at System.Runtime.InteropServices.WindowsRuntime.Tests.EventRegistrationTokenTableTests.Ctor_Default()
    _\src\mono\netcore\System.Private.CoreLib\src\System\Reflection\RuntimeMethodInfo.cs(359,0): at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
@danmoseley
Copy link
Member

@MaximLipnin could you please add sample callstacks in issues like this where there's an exception message? That would show where this exception is coming from.

Perhaps public static bool IsWinRTSupported => IsWindows && IsNotWindows7; should also exclude Mono; but interestingly, this attribute is actually applied on very few tests. So it would be too to know what is throwing here.

@MaximLipnin
Copy link
Contributor Author

@danmosemsft I've updated the PR description with the example of the output.

@jkoritzinsky
Copy link
Member

These tests will be deleted as part of #36715

@jkoritzinsky jkoritzinsky linked a pull request May 22, 2020 that will close this issue
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-VM-meta-mono os-windows runtime-mono specific to the Mono runtime untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants