[master] edd4ebe Fail if compilation failed and -errvcl was not set

Federico G. Schwindt fgsch at lodoss.net
Tue Sep 13 19:57:11 CEST 2016


commit edd4ebe293a26b5e78528ef151e4a01d875f960c
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Tue Sep 13 18:51:52 2016 +0100

    Fail if compilation failed and -errvcl was not set

diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index eaf91f4..9a0d6ee 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -739,6 +739,11 @@ varnish_vcl(struct varnish *v, const char *vcl, int fail, char **resp)
 		AZ(VSB_finish(vsb));
 		u = varnish_ask_cli(v, VSB_data(vsb), NULL);
 		assert(u == CLIS_OK);
+	} else if (!fail) {
+		VSB_destroy(&vsb);
+		vtc_log(v->vl, 0,
+		    "VCL compilation failed expected success");
+		return;
 	} else {
 		vtc_log(v->vl, 2, "VCL compilation failed (as expected)");
 	}



More information about the varnish-commit mailing list