[master] 04b93a7 Make the -syntax setting local to each command.

Poul-Henning Kamp phk at FreeBSD.org
Mon Feb 5 10:26:14 UTC 2018


commit 04b93a77f995a05683a8c9aaa65ef75c8696db09
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Feb 5 10:07:42 2018 +0000

    Make the -syntax setting local to each command.
    
    We want it to be very explicit when non-default VCL versions
    are used in test-cases.

diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 1b0934a..0917a49 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -303,8 +303,6 @@ varnish_new(const char *name)
 
 	REPLACE(v->jail, "");
 
-	v->syntax = 4.0;
-
 	v->vl = vtc_logopen(name);
 	AN(v->vl);
 
@@ -1016,7 +1014,7 @@ varnish_expect(const struct varnish *v, char * const *av)
  *         Stop the child process.
  *
  * \-syntax
- *         Set the VCL syntax level (default: 4.0)
+ *         Set the VCL syntax level for this command (default: 4.0)
  *
  * \-wait
  *         Wait for that instance to terminate.
@@ -1089,6 +1087,7 @@ cmd_varnish(CMD_ARGS)
 	if (v == NULL)
 		v = varnish_new(av[0]);
 	av++;
+	v->syntax = 4.0;
 
 	for (; *av != NULL; av++) {
 		if (vtc_error)


More information about the varnish-commit mailing list