Update CONTRIBUTING.md with proper LOOM test invocation #6515
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.
Loom tests currently fail when
LOOM_MAX_PREEMPTION
is set to 1. Specifically,yield_calls_park_before_scheduling_again
across all schedulers (current thread, multi thread, multi thread alt).For example:
Although the test consistently fails with this invocation (tried on my Mac and Linux using the repo's main branch), it's not failing on CI.
When looking into how we invoke loom in CI, I noticed we pass LOOM_MAX_PREEMPTIONS=2 (e.g. https://github.com/tokio-rs/tokio/actions/runs/8814945156/job/24195889256). This env var change makes the test pass.
Motivation
Loom tests fail when following the contribution guide on the main branch, despite them succeeding in CI. This is confusing for new comers like me!
Solution
This change updates the sample invocation provided in the contributing guide to match what we do in CI to ensure all loom tests pass.