Make valgrind tests more robust by adding --wait=1 to vgdb invocation
On my setup some valgrind tests failed somewhat reliably because
the target remote | vgdb command couldn't find the vgdb-pipe files
because valgrind startup hadn't finished yet.
I tried to fix this by replacing the "Memcheck, a memory error detector"
match to "TO DEBUG THIS PROCESS USING GDB: start GDB like this" which is
right before valgrind creates the vgdb-pipe files. But even that didn't
guarantee that the vgdb-pipe files were there (maybe valgrind should
print that text after it has created them?). But also not all tests
use --vgdb-error=0, so the text isn't always printed.
To make the tests reliable I added --wait=1 to the vgdb invocation.
That tells vgdb to try to find the vgdb-pipe files, and if they aren't
there yet, to wait 1 second and try again.
gdb/testsuite/ChangeLog:
* lib/valgrind.exp (vgdb_start): Add --wait=1 to vgdbcmd.