The procedure to find an unused port is susceptible to a TOCTOU failure. Change port finding in order to avoid this. Also use 'expect' to interact with the server process since we now use the server's output to determine whether a port is in use. * binutils/testsuite/binutils-all/debuginfod.exp: Improve port selection.