[HSA-682 Test] Fix a race condition in the test suite for GDB