This test was timing out on the bots occasionally, so I was poking around at it. I didn't see any obvious reason why it would stall, but it had a slightly odd way of rendezvousing the two test threads, and it also finished by running the inferior to completion, even though that wasn't relevant to the test at hand.
So I took the opportunity to modernize the test, and clean up these aspects of it. In order to do that I had to make run_to_source_breakpoint accept the case where the breakpoint it was setting had more than one thread hit the created breakpoint. So this diff also has the modifications to pass an "only_one_thread" parameter if you want to allow more than one thread stopping at the candidate breakpoint. The function still returns only one thread, since the vast majority of uses will require only one thread, and it's easy to find the threads stopped at a breakpoint if you need that.