Make libssl interop server/client tests less flaky by ensuring the
authoranton <anton@openbsd.org>
Wed, 18 Oct 2023 19:14:32 +0000 (19:14 +0000)
committeranton <anton@openbsd.org>
Wed, 18 Oct 2023 19:14:32 +0000 (19:14 +0000)
server has terminated before examining the outcome.

regress/lib/libssl/interop/Makefile.inc

index ed5fe26..4a66390 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.8 2020/12/17 00:51:11 bluhm Exp $
+# $OpenBSD: Makefile.inc,v 1.9 2023/10/18 19:14:32 anton Exp $
 
 .PATH:                 ${.CURDIR}/..
 
@@ -23,6 +23,8 @@ run-self-client-server: client server 127.0.0.1.crt
        LD_LIBRARY_PATH=${LD_LIBRARY_PATH} \
            ./client >client-self.out \
            `sed -n 's/listen sock: //p' server-self.out`
+       # wait for server to terminate
+       -sed -n 's/listen sock: //p' server-self.out | xargs nc 2>/dev/null
        # check that the client run successfully to the end
        grep -q '^success$$' client-self.out
        # client must have read server greeting