[master] 2c0fed9 Check VSM_Open() return value.

Poul-Henning Kamp phk at FreeBSD.org
Sun Jun 11 23:52:06 CEST 2017


commit 2c0fed9ab5ebf235a8143e5dee806b057a4fd281
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun Jun 11 21:51:22 2017 +0000

    Check VSM_Open() return value.

diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 114713e..7e41d07 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -668,7 +668,7 @@ varnish_wait(struct varnish *v)
 
 	if (!vtc_error) {
 		/* Do a backend.list to log if child is still running */
-		varnish_ask_cli(v, "backend.list", &resp);
+		(void)varnish_ask_cli(v, "backend.list", &resp);
 	}
 
 	/* Then stop it */
@@ -845,7 +845,9 @@ varnish_vsc(struct varnish *v, const char *arg)
 	dp.arg = arg;
 	if (VSM_StillValid(v->vd, &v->mgt_arg_i) != VSM_valid) {
 		VSM_Close(v->vd);
-		VSM_Open(v->vd);
+		if (VSM_Open(v->vd) < 0)
+			vtc_fatal(v->vl, "Could not open VSM (%s)",
+			    VSM_Error(v->vd));
 	}
 
 	(void)VSC_Iter(v->vd, NULL, do_stat_dump_cb, &dp);



More information about the varnish-commit mailing list