Skip to content

[mono] Tests failed on windows: System.Runtime.InteropServices.Tests #34748

@MaximLipnin

Description

@MaximLipnin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions