provision/docker: use atomic operations on tests to prevent data races