Skip to content

MonoInterp/Minijit win-x64: COM interop (SafeArray/Variant/struct reverse-pinvoke) test failures #129581

Description

@pavelsavara

Summary

The COM/marshalling interop tests listed below fail on the Mono Minijit, windows-x64 runtime-test leg (DOTNET_RUNTIME_VARIANT=minijit). They were first observed on the emsdk-upgrade PR #129299, but Minijit does not use LLVM, so these failures are independent of the emsdk/LLVM toolchain bump and appear to be pre-existing Mono win-x64 interop gaps. They are disabled with [ActiveIssue(..., TestRuntimes.Mono)] referencing this issue (originally bucketed under #84398, now split out).

Configuration

Failures

1. SafeArray multidimensional marshalling — NullReferenceException

src/tests/Interop/ArrayMarshalling/SafeArray/SafeArrayTest.cs:

  • SafeArrayMarshallingTest.MultidimensionalIntArray
  • SafeArrayMarshallingTest.MultidimensionalBoolArray
  • SafeArrayMarshallingTest.MultidimensionalStringArray
  • SafeArrayMarshallingTest.MultidimensionalStringArrayRoundTrip
18:25:57.224 Running test: global::SafeArrayMarshallingTest.MultidimensionalIntArray()
System.NullReferenceException: Object reference not set to an instance of an object
   at SafeArrayMarshallingTest.MultidimensionalIntArray()
   at Program.<<Main>$>g__TestExecutor1|0_2(StreamWriter tempLogSw, StreamWriter statsCsvSw, <>c__DisplayClass0_0&)
18:25:57.298 Failed test: global::SafeArrayMarshallingTest.MultidimensionalIntArray()

(The ...IntArrayRoundTrip and ...BoolArrayRoundTrip variants pass; the four listed above throw NullReferenceException.)

2. Variant marshalling — MarshalDirectiveException: Marshalling of type object is not implemented

Test assemblies VariantTest, VariantTestBuiltInComDisabled, VariantTestComWrappers (entry points in src/tests/Interop/PInvoke/Variant/VariantTest.BuiltInCom.cs and VariantTest.ComWrappers.cs):

18:25:57.426 Running test: Interop\PInvoke\Variant\VariantTest\VariantTest.dll
Built-in COM Disabled?: False
Test failed: System.Runtime.InteropServices.MarshalDirectiveException: Marshalling of type object is not implemented
   at Test_VariantTest.TestByValue(Boolean hasComSupport)
   at Test_VariantTest.TestEntryPoint()
Xunit.Sdk.EqualException: Assert.Equal() Failure: Values differ
Expected: 100
Actual:   101

3. DelegatePInvoke (struct by-ref, Cdecl) — Assert.True() failure

src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/DelegatePInvoke/DelegatePInvokeTest.cs
(Interop\StructMarshalling\ReversePInvoke\MarshalExpStruct\DelegatePInvoke\DelegatePInvokeTest):

Delegate,Pinvoke,By Ref,Cdecl
Calling Get_MarshalStructAsParam_AsExpByRefINNER2_Cdecl_FuncPtr...
Test Failure: Xunit.Sdk.TrueException: Assert.True() Failure
Expected: True
...
Expected: 100
Actual: 101
END EXECUTION - FAILED

4. ReversePInvoke (struct by-ref, Cdecl) — wrong callback result

src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalExpStruct/ReversePInvokeManaged/ReversePInvokeTest.cs
(Interop\StructMarshalling\ReversePInvoke\MarshalExpStruct\ReversePInvokeManaged\ReversePInvokeTest):

Reverse,Pinvoke,By Ref,Cdecl
        FAILED! TestMethod_DoCallBack_MarshalStructByRef_INNER2_Cdecl did not receive result as expected.
        The Actual is...
        INNER2.f1 = 77
        INNER2.f2 = 77
...
Xunit.Sdk.TrueException
Expected: 100
Actual: 101

Disabled in

All marked [ActiveIssue("https://github.com/dotnet/runtime/issues/<this-issue>", TestRuntimes.Mono)] on PR #129299.

Note

This issue body was generated with the assistance of GitHub Copilot.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions