Hi, In the course of wiring the GCC testsuites for remote `riscv64-linux-gnu' testing with QEMU run in the system emulation mode as the target board I came across an instability in the Linux installation within QEMU or maybe the emulator itself that caused an SSH connection made to the target system for the purpose of running a test to get intermittently stuck forever. This in turn caused, unexpectedly, the test harness run on the host system to also hang indefinitely rather than time out and proceed with subsequent tests.
I was able to reproduce the problem reliably and investigate it by substituting the invocation of SSH with a small shell script that deliberately hangs and based on that came up with this small patch series to address the problem. With these patches applied I was able to run the whole suite of GCC testsuites (i.e. for all the frontends and all the target libraries) through to the end. In this second version of the series I have addressed some concerns raised in the course of the review of the original version. This version has been verified using the GDB testsuite with the `riscv64-linux-gnu' target and the `x86_64-linux-gnu' host. See the individual change descriptions for details. Maciej