a test for how memory barriers works