[6.0] 6e27d4dee Unbreak varnishtest expect_close

Martin Blix Grydeland martin at varnish-software.com
Tue Jul 13 10:06:08 UTC 2021


commit 6e27d4dee58e0f3e63c014464cd663b6985e8c53
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Tue Jun 22 11:47:45 2021 +0200

    Unbreak varnishtest expect_close
    
    The change to VTCP_Check() in 58a21da7736295e674ebb7e8ae9eee9529c083b0
    broke expect_close in varnishtest.

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index da4747872..0ea454a83 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -1553,7 +1553,7 @@ cmd_http_expect_close(CMD_ARGS)
 			    "Expected close: poll = %d, revents = 0x%x",
 			    i, fds[0].revents);
 		i = read(hp->fd, &c, 1);
-		if (VTCP_Check(i))
+		if (i <= 0 && VTCP_Check(i))
 			break;
 		if (i == 1 && vct_islws(c))
 			continue;


More information about the varnish-commit mailing list