If socat is slow and qemu-img is fast then qemu-img opens the socket before socat creates it, resulting in a test failure. --- tests/test-single.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/tests/test-single.sh b/tests/test-single.sh index 9dc462b..fdcfc62 100755 --- a/tests/test-single.sh +++ b/tests/test-single.sh @@ -65,4 +65,16 @@ cleanup () } trap cleanup INT QUIT TERM EXIT ERR +# Wait for socat to start up and create the socket. +for i in `seq 1 10`; do + if test -S single.sock; then + break + fi + sleep 1 +done +if ! test -S single.sock; then + echo "$0: socket was not created" + exit 1 +fi + qemu-img info nbd:unix:single.sock -- 2.16.2 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs