[6.6] 9a96583bf Unbreak varnishtest expect_close

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


commit 9a96583bf3878b5ddeb69e252c1a53e5fcc4a018
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 dc286066a..78e7e880c 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -1496,7 +1496,7 @@ cmd_http_expect_close(CMD_ARGS)
 			    "Expected close: poll = %d, revents = 0x%x",
 			    i, fds[0].revents);
 		i = read(hp->sess->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