grep code for calls to threading routines. If any are found, fail the test, as your code has multi-threading bugs.
If it passes, expand your search to the parts of libraries you use, until it fails or (unlikely) is proven thread-safe (i.e. single-threaded).
Once you know you have threading bugs, the testing part of the job is done. All that remains is the small matter of finding and removing them...