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

[wasm] Missing support for building native libraries as part of tests #64127

Open
radical opened this issue Jan 21, 2022 · 10 comments
Open

[wasm] Missing support for building native libraries as part of tests #64127

radical opened this issue Jan 21, 2022 · 10 comments
Labels
arch-wasm WebAssembly architecture area-Interop-mono disabled-test The test is disabled in source code against the issue
Milestone

Comments

@radical
Copy link
Member

radical commented Jan 21, 2022

[wasm] New interop DisabledRuntimeMarshalling* tests failing

Build, and Log:

Interop/DisabledRuntimeMarshalling/DisabledRuntimeMarshalling_NativeAssemblyDisabled/DisabledRuntimeMarshalling_NativeAssemblyDisabled.sh 
...
      System.DllNotFoundException: DisabledRuntimeMarshallingNative
         at DisabledRuntimeMarshalling.PInvokeAssemblyMarshallingDisabled.DelegatesFromExternalAssembly.StructWithDefaultNonBlittableFields_DoesNotMarshal()
         at Program.<Main>$(String[] args)
      Expected: 100
      Actual: 101
...
DisabledRuntimeMarshalling_Disabled_NativeTypeInAssembly/DisabledRuntimeMarshalling_Disabled_NativeTypeInAssembly.sh
DisabledRuntimeMarshalling_Disabled_NativeTypeInAssembly_ro/DisabledRuntimeMarshalling_Disabled_NativeTypeInAssembly_ro.sh [FAIL]
DisabledRuntimeMarshalling_Disabled_NativeAssemblyEnabled/DisabledRuntimeMarshalling_Disabled_NativeAssemblyEnabled.sh
DisabledRuntimeMarshalling_Disabled_NativeAssemblyDisabled/DisabledRuntimeMarshalling_Disabled_NativeAssemblyDisabled.sh

The test was added in #63320

@dotnet-issue-labeler dotnet-issue-labeler bot added area-Interop-coreclr untriaged New issue has not been triaged by the area owner labels Jan 21, 2022
@radical radical added arch-wasm WebAssembly architecture blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' and removed area-Interop-coreclr untriaged New issue has not been triaged by the area owner labels Jan 21, 2022
@ghost
Copy link

ghost commented Jan 21, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Build, and Log:

...
      System.DllNotFoundException: DisabledRuntimeMarshallingNative
         at DisabledRuntimeMarshalling.PInvokeAssemblyMarshallingDisabled.DelegatesFromExternalAssembly.StructWithDefaultNonBlittableFields_DoesNotMarshal()
         at Program.<Main>$(String[] args)
      Expected: 100
      Actual: 101
...

The test was added in #63320

Author: radical
Assignees: -
Labels:

arch-wasm, blocking-clean-ci

Milestone: -

@radical radical changed the title [wasm] New interop test DisabledRuntimeMarshalling_NativeAssemblyDisabled.sh failing on CI [wasm] New interop DisabledRuntimeMarshalling* tests failing Jan 21, 2022
radical added a commit to radical/runtime that referenced this issue Jan 21, 2022
@radical radical added the disabled-test The test is disabled in source code against the issue label Jan 21, 2022
@jkoritzinsky
Copy link
Member

This test fails for the same reason on Wasm as many of the other interop tests: We don’t have the test build configured to support native library building or references for any of the “mobile” platforms or wasm.

@danmoseley danmoseley removed the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Apr 22, 2022
@danmoseley
Copy link
Member

test was disabled, so removing 'blocking-clean-ci'

@radical radical changed the title [wasm] New interop DisabledRuntimeMarshalling* tests failing [wasm] Missing support for building native libraries as part of tests May 25, 2022
@radical
Copy link
Member Author

radical commented May 26, 2022

update: I got the native code to compile for the runtime tests. Now, these need to be linked in to each of the test assemblies, which will need relinking dotnet.wasm, adding to the build time.

@radical
Copy link
Member Author

radical commented May 26, 2022

I'm able to relink now, with some changes to WasmTestRunner.proj, which fails with:

/workspaces/runtime/artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root/build/WasmApp.Native.targets(286,5):
error : Parameter types of pinvoke callback method 'System.Boolean CheckStructWithShortAndBoolManaged(DisabledRuntimeMarshallingNative+StructWithShortAndBool, System.Int16, System.Boolean)' needs to be blittable. 
[/workspaces/runtime/artifacts/tests/coreclr/Browser.wasm.Release/Tests/Core_Root/wasm-test-runner/WasmTestRunner.proj]

@lewing
Copy link
Member

lewing commented Jul 12, 2023

@radical what is the status of this one?

@radical
Copy link
Member Author

radical commented Jul 25, 2023

@radical what is the status of this one?

This is incomplete, and won't be finished for 8.0 .

@fanyang-mono
Copy link
Member

This prevented a newly added test for nested struct with PInvoke from running with wasm. Furthermore, this issue appears to extend to all PInvoke tests on the WASM platform, serving as a significant obstacle in the comprehensive testing of PInvoke functionality for WASM.

@lewing
Copy link
Member

lewing commented Feb 21, 2024

@jeffschwMSFT @steveisok thoughts on where this should land?

@steveisok
Copy link
Member

@jeffschwMSFT @steveisok thoughts on where this should land?

On balance, I think it should stay on your team. My reasoning is that the test infra is so specialized, you'll have to be involved regardless.

@lewing lewing modified the milestones: 9.0.0, Future Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-wasm WebAssembly architecture area-Interop-mono disabled-test The test is disabled in source code against the issue
Projects
Status: No status
Development

No branches or pull requests

6 participants