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.Tests #34748

Open
MaximLipnin opened this issue Apr 9, 2020 · 3 comments
Open
Labels
area-Interop-mono disabled-test The test is disabled in source code against the issue os-windows runtime-mono specific to the Mono runtime
Milestone

Comments

@MaximLipnin
Copy link
Contributor

A lot of System.Runtime.InteropServices.Tests tests fail on windows.

The example of CI output :

System.Runtime.InteropServices.Tests.ReleaseComObjectTests.ReleaseComObject_NonComObject_ThrowsArgumentException [FAIL]
    Assert.Throws() Failure
    Expected: typeof(System.ArgumentException)
    Actual:   typeof(System.PlatformNotSupportedException): COM Interop is not supported on this platform.
    ---- System.PlatformNotSupportedException : COM Interop is not supported on this platform.
    Stack Trace:
    /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs(201,0): at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
    /_/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseComObjectTests.cs(29,0): at System.Runtime.InteropServices.Tests.ReleaseComObjectTests.<>c.<ReleaseComObject_NonComObject_ThrowsArgumentException>b__2_0()
    ----- Inner Stack Trace -----
    /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs(201,0): at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
    /_/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseComObjectTests.cs(29,0): at System.Runtime.InteropServices.Tests.ReleaseComObjectTests.<>c.<ReleaseComObject_NonComObject_ThrowsArgumentException>b__2_0()
System.Runtime.InteropServices.Tests.ReleaseComObjectTests.ReleaseComObject_NullObject_ThrowsNullReferenceException [FAIL]
    Assert.Throws() Failure
    Expected: typeof(System.NullReferenceException)
    Actual:   typeof(System.PlatformNotSupportedException): COM Interop is not supported on this platform.
    ---- System.PlatformNotSupportedException : COM Interop is not supported on this platform.
    Stack Trace:
    /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs(201,0): at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
    /_/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseComObjectTests.cs(22,0): at System.Runtime.InteropServices.Tests.ReleaseComObjectTests.<>c.<ReleaseComObject_NullObject_ThrowsNullReferenceException>b__1_0()
    ----- Inner Stack Trace -----
    /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs(201,0): at System.Runtime.InteropServices.Marshal.ReleaseComObject(Object o)
    /_/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/ReleaseComObjectTests.cs(22,0): at System.Runtime.InteropServices.Tests.ReleaseComObjectTests.<>c.<ReleaseComObject_NullObject_ThrowsNullReferenceException>b__1_0()
cant resolve internal call to "System.Runtime.InteropServices.Tests.Common.ComImportObject::.ctor" (tested without signature also)

Your mono runtime and class libraries are out of sync.
The out of sync library is: C:\h\w\9EB608BF\w\AA6F0948\e\System.Runtime.InteropServices.Tests.dll

When you update one from git you need to update, compile and install
the other too.
Do not report this as a bug unless you're sure you have updated correctly:
you probably have a broken mono install.
If you see other errors or faults after this message they are probably related
and you need to fix your mono install first.
* Assertion: should not be reached at F:\workspace\_work\1\s\src\mono\mono\metadata\marshal.c:3513

System.Runtime.InteropServices.Tests.FinalReleaseComObjectTests.FinalReleaseComObject_NullObject_ThrowsArgumentNullException [FAIL]
    Assert.Throws() Failure
    Expected: typeof(System.ArgumentNullException)
    Actual:   typeof(System.PlatformNotSupportedException): COM Interop is not supported on this platform.
    ---- System.PlatformNotSupportedException : COM Interop is not supported on this platform.
    Stack Trace:
    /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs(61,0): at System.Runtime.InteropServices.Marshal.FinalReleaseComObject(Object o)
cant resolve internal call to "System.Runtime.InteropServices.Tests.Common.ComImportObject::.ctor" (tested without signature also)
    /_/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/FinalReleaseComObjectTests.cs(22,0): at System.Runtime.InteropServices.Tests.FinalReleaseComObjectTests.<>c.<FinalReleaseComObject_NullObject_ThrowsArgumentNullException>b__1_0()
    ----- Inner Stack Trace -----

Your mono runtime and class libraries are out of sync.
The out of sync library is: C:\h\w\9EB608BF\w\AA6F0948\e\System.Runtime.InteropServices.Tests.dll

When you update one from git you need to update, compile and install
the other too.
Do not report this as a bug unless you're sure you have updated correctly:
you probably have a broken mono install.
If you see other errors or faults after this message they are probably related
and you need to fix your mono install first.
* Assertion: should not be reached at F:\workspace\_work\1\s\src\mono\mono\metadata\marshal.c:3513

    /_/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NoCom.cs(61,0): at System.Runtime.InteropServices.Marshal.FinalReleaseComObject(Object o)
    /_/src/libraries/System.Runtime.InteropServices/tests/System/Runtime/InteropServices/Marshal/FinalReleaseComObjectTests.cs(22,0): at System.Runtime.InteropServices.Tests.FinalReleaseComObjectTests.<>c.<FinalReleaseComObject_NullObject_ThrowsArgumentNullException>b__1_0()

The failing tests will be mark with ActiveIssue in #32592.

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Runtime.InteropServices untriaged New issue has not been triaged by the area owner labels Apr 9, 2020
@danmoseley
Copy link
Member

@MaximLipnin is COM Interop is not supported on this platform expected - doesn't Mono support COM interop?

@MaximLipnin
Copy link
Contributor Author

@danmosemsft Thanks for taking a look. I'm not sure about Mono's support in this case. What I can do in such cases is to track down possible reason, but because the number of disabled tests/classes/namespaces that I need to check within my work for removing rsp files is quite big, it can take long time to investigate. So I just file a tracking issue which someone with broader knowledge can take a look at and decide what to do.

cc/ @steveisok @marek-safar

@SamMonoRT
Copy link
Member

Moving to 7.0.0

@SamMonoRT SamMonoRT modified the milestones: 6.0.0, 7.0.0 Aug 4, 2021
@marek-safar marek-safar modified the milestones: 7.0.0, 8.0.0 Jul 27, 2022
@marek-safar marek-safar modified the milestones: 8.0.0, Future Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Interop-mono disabled-test The test is disabled in source code against the issue os-windows runtime-mono specific to the Mono runtime
Projects
Status: No status
Development

No branches or pull requests

7 participants