tests: Reduce chance of race condition in logging tests

The race conditions happens 100% of the time when running the test suite on
armel and armhf.