mpk: enable more tests#7376
Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom Oct 26, 2023
Merged
Conversation
This adds a Wasmtime-level test checking that, when MPK is available on the system, an MPK-configured memory pool obeys the same invariants as other memory pool configurations (e.g., `guards_present` for normal allocation, `guards_present_pooling` for non-MPK pooling allocation). It also fixes a bug. A previous commit had updated the validation logic of `MemoryPool` to check that the memory plan's bound would be reached before the next slot of the same stripe. But `MemoryPool::allocate` has some "double-check" logic that was triggered by this test. It now matches the logic in `MemoryPool::validate`.
Some Wasmtime tests rely on specific limits to the memory pool. When MPK is enabled, these tests fail because MPK splits access to the pool slices among different stores. This change does not yet enable MPK, though locally I run with MPK enabled. With this commit and MPK enabled locally, all Wasmtime tests now pass.
alexcrichton
approved these changes
Oct 26, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See the commit messages for more details, but in summary:
With this change,
ci/run-tests.shruns locally on an MPK-enabled machine with MPK turned on. There is more work to be done before MPK can be turned on by default (see #7119) but this helps.