Add tests for pthread primitives inducing synchronization #2271
Labels
A-concurrency
Area: affects our concurrency (multi-thread) support
A-data-race
Area: data race detector
A-tests
Area: affects our test suite or CI
C-enhancement
Category: a PR with an enhancement or an issue tracking an accepted enhancement
Basically, something similar to #2270 for pthread mutex, rwlock, and condvar (but we can use deterministic scheduling by disabling preemption). Commenting out any of the
validate_lock_release
,validate_lock_release_shared
,validate_lock_acquire
insrc/sync.rs
should give a data race error in some test, and that does not currently happen, at least not for rwlock and condvar -- I assume that's because the standard library has some atomic variables on its own here that induce extra synchronization. So we probably need tests that directly talk to these APIs. (Also note that the pthread primitives are not even used on Linux any more, only on macOS.)The text was updated successfully, but these errors were encountered: