Stream: git-wasmtime

Topic: wasmtime / issue #7576 mpk: allow forcing MPK during tests


view this post on Zulip Wasmtime GitHub notifications bot (Nov 22 2023 at 22:47):

alexcrichton commented on issue #7576:

My first reaction to this is that this isn't where I'd like to see an env var being tested. I think currently for example WASMTIME_TEST_NO_HOG_MEMORY is only checked in test binaries, never in Wasmtime runtime code. Ideally we'd do the same here and only change test-related code to check this env var. That being said I can see how that's not easy to do since there isn't one location where all the Engines are created.

Perhaps just the wast tests and maybe a few others could get mpk force-enabled with this env var though? Get some broad coverage but not necessarily 100%. Another option would be RUSTFLAGS with --cfg force_mpk or something like that

view this post on Zulip Wasmtime GitHub notifications bot (Nov 27 2023 at 23:24):

abrown commented on issue #7576:

My first reaction to this is that this isn't where I'd like to see an env var being tested.

Makes sense. The commit I just pushed, 3d2102a, limits the use of this variable to the wast tests and the 30 uses of small_pool_config. Forcing MPK in tests that use small_pool_config is not _too_ useful: they only really have one memory slot so we don't check the multiple slices. But it may exercise a few more of the MPK code paths. In any case, the wast tests _are_ useful: any time in the past I've tested an incorrect implementation of MPK, the wast tests have had some failures.


Last updated: Nov 22 2024 at 16:03 UTC