[sdb] Fix race condition on test program that would cause a hang when running on wrench.