Skip to content

[wasm-split] Make mutable/immutable versions of tests - #9062

Merged
aheejin merged 3 commits into
mainfrom
wasm_split_transitive_global_two_tests
Sep 1, 2026
Merged

[wasm-split] Make mutable/immutable versions of tests#9062
aheejin merged 3 commits into
mainfrom
wasm_split_transitive_global_two_tests

Conversation

@aheejin

@aheejin aheejin commented Aug 31, 2026

Copy link
Copy Markdown
Member

A follow-up PR will move immutable globals to secondary modules when possible, and it will make the test expectations of transitive-globals-multi.wast different for mutable and immutable globals. Creating a new test in that PR will make it different to see what changes in that PR. So this PR duplicates the test to make mutable and immutable versions. Note that $f can't be converted to mutable because it is used in a global.get.

This also adds mutable/immutable versions of globals to split-module-items.wast.

`update_lit_checks.py` doesn't always work well with wasm-split. For
example, for some tests, the test CHECK lines are mixed like this after
running it:
```wast
;; PRIMARY: ...
;; SECONDARY: ....
;; PRIMARY: ...
;; SECONDARY: ...
```

A follow-up PR will change these two test files' CHECK lines to be mixed
when using `update_lit_checks.py`, and making them not use in that PR
will make it hard to see what actually change in that PR. To make the
next PR's diff tidy, this makes a few tests not use the auto-updating
script.

This also adds `-all` to `transtiive-globals-multi.wast` to be
consistent with other `transitive-globals*.wast` tests.
A follow-up PR will move immutable globals to secondary modules when
possible, and it will make the test expectations of
`transitive-globals-multi.wast` different for mutable and immutable
globals. Creating a new test in that PR will make it different to see
what changes in that PR. So this PR duplicates the test to make mutable
and immutable versions. Note that `$f` can't be converted to mutable
because it is used in a `global.get`.

This also adds mutable/immutable versions of globals to
`split-module-items.wast`.
@aheejin
aheejin requested a review from tlively August 31, 2026 22:41
@aheejin
aheejin requested a review from a team as a code owner August 31, 2026 22:41
Base automatically changed from wasm_split_test_no_auto to main August 31, 2026 23:18
@aheejin
aheejin merged commit 6531a98 into main Sep 1, 2026
16 checks passed
@aheejin
aheejin deleted the wasm_split_transitive_global_two_tests branch September 1, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants