[master] 40373a39f vtc_varnish: Proper VSL status check

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jun 10 13:42:07 UTC 2024


commit 40373a39f7556ae57db5195ff033f7b37dda4733
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue Jul 4 18:17:57 2023 +0200

    vtc_varnish: Proper VSL status check

diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index bc42a6dde..6f8223859 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -204,7 +204,7 @@ varnishlog_thread(void *priv)
 	struct VSL_cursor *c;
 	enum VSL_tag_e tag;
 	uint64_t vxid;
-	unsigned len;
+	unsigned len, vs;
 	const char *tagname, *data;
 	int type, i, opt;
 	struct vsb *vsb = NULL;
@@ -271,7 +271,8 @@ varnishlog_thread(void *priv)
 		if (i == 0) {
 			/* Nothing to do but wait */
 			v->vsl_idle++;
-			if (!(VSM_Status(vsm) & VSM_WRK_RUNNING)) {
+			vs = VSM_Status(vsm) & VSM_WRK_MASK;
+			if ((vs & ~VSM_WRK_CHANGED) != VSM_WRK_RUNNING) {
 				/* Abandoned - try reconnect */
 				VSL_DeleteCursor(c);
 				c = NULL;


More information about the varnish-commit mailing list