Stream: git-wasmtime

Topic: wasmtime / PR #10750 winch(aarch64): Run wast test in CI


view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 22:35):

saulecabrera requested fitzgen for a review on PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 22:35):

saulecabrera opened PR #10750 from saulecabrera:winch-aarch64-run-more-tests to bytecodealliance:main:

Closes https://github.com/bytecodealliance/wasmtime/issues/9566

This commit takes inspiration from
https://github.com/bytecodealliance/wasmtime/pull/10738/files

During the 2025-05-07 Cranelift meeting we discussed potential avenues to start running wast tests for winch-aarch64. One potential idea was to declare an allowlist of tests that should be exectued and potentially ignore everyhing else. Although that idea works, I decided to diverge a bit from it, in favor of introducing a very strict classification of the state of tests for aarch64, namely, in this commit tests are classified as:

This approach is probably more verbose than the one discussed in the meeting, however, I think it's easier to have a global view of that status for aarch64 and potentially other backends in the future.

@alexcrichton curious to see what do you think.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 22:35):

saulecabrera requested wasmtime-core-reviewers for a review on PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 22:37):

saulecabrera updated PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 22:47):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 22:47):

alexcrichton created PR review comment:

Could the platform-independent tests, the ones that fail on all platforms, be deduplicated between here and x64?

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 23:20):

saulecabrera updated PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 23:20):

saulecabrera created PR review comment:

Sure, yeah. Added that in https://github.com/bytecodealliance/wasmtime/pull/10750/commits/0d4784bc61f6b7a5350b2e91d0ec7df85880cae3

view this post on Zulip Wasmtime GitHub notifications bot (May 07 2025 at 23:20):

saulecabrera submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 01:05):

github-actions[bot] commented on PR #10750:

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 15:30):

saulecabrera commented on PR #10750:

The failure in CI happens because wasmtime_test_util::wast::Compiler::should_fail gets invoked from wasmtime_test macro, and as far as I understand, #[cfg(target_arch="...")] in macro code will resolve to the host, not to the target, which ends up returning true for should_fail, but since we're cross compiling (aarch64 -> x64), in reality the test passes and the #[should_panic] predicate is not met.

Prior to this change this was not an issue, since we were only taking x64 into account for Winch.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 15:30):

saulecabrera edited a comment on PR #10750:

The failure in CI happens because wasmtime_test_util::wast::Compiler::should_fail gets invoked from the wasmtime_test macro, and as far as I understand, #[cfg(target_arch="...")] in macro code will resolve to the host, not to the target, which ends up returning true for should_fail, but since we're cross compiling (aarch64 -> x64), in reality the test passes and the #[should_panic] predicate is not met.

Prior to this change this was not an issue, since we were only taking x64 into account for Winch.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 15:50):

alexcrichton commented on PR #10750:

Bah I was afraid of this happening at some point...

Could we perhaps delay this to happening at runtime? We've got the two structures there at test-run-time so we should be able to run the same code. I'd prefer to not catch panics so it means though that all tests would have to return Result<()> and the runtime result of should_fail would result in expecting an error or not, however.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 16:33):

saulecabrera commented on PR #10750:

Yeah, I'll try that. I remember we had discussed this, I just wasn't sure if there was a strong preference regarding catching panics.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 16:35):

alexcrichton commented on PR #10750:

Personally I'd say I have a weak preference, if that's the best solution maintenance-wise I'd go with catching panics

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 18:40):

saulecabrera updated PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 18:41):

saulecabrera updated PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 18:42):

saulecabrera commented on PR #10750:

Ok, ended up going with emitting the call to Compiler::should_fail at runtime. Would you mind taking another look?

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 22:59):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2025 at 22:59):

alexcrichton created PR review comment:

Could this use result.unwrap() to print the error on failure?

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 12:46):

saulecabrera updated PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 13:06):

saulecabrera updated PR #10750.

view this post on Zulip Wasmtime GitHub notifications bot (May 09 2025 at 13:43):

saulecabrera merged PR #10750.


Last updated: Dec 06 2025 at 06:05 UTC