A test framework for verifying concurrency anomalies

this can go after changing 559.