Skip to content

Conversation

@qinsoon
Copy link
Member

@qinsoon qinsoon commented Oct 24, 2025

This PR made some changes to MockVM to allow us to run GC in the tests.

  • Add features mock_test_side_metadata and mock_test_header_metadata. We only test with mock_test_side_metadata (as some plans don't run with header metadata).
  • No longer use lock for the MockVM instance (otherwise it will cause deadlock when we reentry MockVM)
  • Statically initialize a MMTK instance for mock tests.
  • Mock tests now use mock_api to create a mutator. This registers the mutator to mock VM, and can be blocked for GC.
  • Mock tests now properly initialize GC threads, and handle panics in GC threads.
  • Minor changes to print more information for mmap failures.

@qinsoon qinsoon added the PR-extended-testing Run extended tests for the pull request label Oct 27, 2025
@qinsoon qinsoon requested a review from wks October 27, 2025 02:45
@qinsoon qinsoon marked this pull request as ready for review October 27, 2025 02:46
@wks
Copy link
Collaborator

wks commented Oct 27, 2025

std::sync::ReentrantLock is an unstable feature. But a third-party crate parking_lot has an implementation of ReentrantMutex. If that is helpful, we can add the parking_lot as a dependency when the mock_test feature is enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-extended-testing Run extended tests for the pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants