Add contributor-only Shuttle lock tests#370
Conversation
Keep the default parking_lot backend and runtime behavior unchanged. Add a Shuttle-specific parking shim for model-checking the internal lock, expose it through a dedicated feature-gated test target, and cover reader/writer contention plus downgrade wakeups. Document the supported contributor workflow and add a separate CI job for the stable Shuttle test command.
|
I wonder if it wouldn't make more sense for this to be a wrapper within the shuttle project? Oh, I see someone has submitted exactly that: awslabs/shuttle#279 |
|
@eggyal should we cancel this PR then? |
|
awslabs/shuttle#279 and this PR does different things. This PR allows DashMap itself to be tested with Shuttle. awslabs/shuttle#279 is meant for users of DashMap to be able to run their application with Shuttle by just swapping their import in their Regarding this PR: |
|
@sarsko i was just wondering how could DashMap be tested with shuttle. I use Shuttle for my own code and wanted to expand to DashMap and I found that thread talking about it. |
Summary
This adds contributor-only Shuttle model-checking for DashMap's internal lock without changing the default runtime path.
What changed
parking_lot_corebackend as the default build/runtime behaviorshuttle-gated parking shim insrc/lock.rsfor model checking the lock under Shuttle[[test]]target withrequired-features = ["shuttle"]cargo test --features shuttle --test shuttledowngrade()wakeup behaviorTradeoffs
shuttlestill exists as a Cargo feature because the alternate lock backend needs conditional compilation in library code, but the intended surface is contributor-only rather than a supported end-user modecargo test --features shuttleremains intentionally unsupported; onlycargo test --features shuttle --test shuttleis documented and exercised in CIVerification
cargo fmt --allcargo clippy --all-targets --features all -- -D warningscargo testRUSTUP_TOOLCHAIN=stable cargo test --features shuttle --test shuttle