[master] 79bf4f812 Retire the varnishtest -W option

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 30 14:54:06 UTC 2019


commit 79bf4f812d29d78a4e9c592e625df974821963a4
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Sep 30 07:52:49 2019 +0200

    Retire the varnishtest -W option
    
    The same can be achieved with `varnishtest -p debug=+witness`, already
    used by `make witness`.

diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h
index e1f167daa..ab218abce 100644
--- a/bin/varnishtest/vtc.h
+++ b/bin/varnishtest/vtc.h
@@ -81,7 +81,6 @@ extern unsigned vtc_maxdur;
 extern char *vmod_path;
 extern struct vsb *params_vsb;
 extern int leave_temp;
-extern int vtc_witness;
 extern int ign_unknown_macro;
 
 void init_server(void);
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index ac21b1000..a2c346067 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -106,7 +106,6 @@ static char *cwd = NULL;
 char *vmod_path = NULL;
 struct vsb *params_vsb = NULL;
 int leave_temp;
-int vtc_witness = 0;
 static struct vsb *cbvsb;
 static int bad_backend_fd;
 
@@ -189,7 +188,6 @@ usage(void)
 	fprintf(stderr, FMT, "-q", "Quiet mode: report only failures");
 	fprintf(stderr, FMT, "-t duration", "Time tests out after this long");
 	fprintf(stderr, FMT, "-v", "Verbose mode: always report test log");
-	fprintf(stderr, FMT, "-W", "Enable the witness facility for locking");
 	exit(1);
 }
 
@@ -748,9 +746,6 @@ main(int argc, char * const *argv)
 			if (vtc_verbosity < 2)
 				vtc_verbosity++;
 			break;
-		case 'W':
-			vtc_witness++;
-			break;
 		default:
 			usage();
 		}
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index f0d6d7bdc..24ffab467 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -411,8 +411,6 @@ varnish_launch(struct varnish *v)
 	VSB_printf(vsb, " exec varnishd %s -d -n %s",
 	    v->jail, v->workdir);
 	VSB_cat(vsb, VSB_data(params_vsb));
-	if (vtc_witness)
-		VSB_cat(vsb, " -p debug=+witness");
 	if (leave_temp) {
 		VSB_cat(vsb, " -p debug=+vcl_keep");
 		VSB_cat(vsb, " -p debug=+vmod_so_keep");
diff --git a/doc/changes.rst b/doc/changes.rst
index 44873d77c..fdc03d521 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -42,6 +42,9 @@ NEXT (2020-03-15)
   they are delimited by "double quotes". This was applied to ``SessError``
   and ``Backend_health``.
 
+* The option ``varnishtest -W`` is gone, the same can be achieved with
+  ``varnishtest -p debug=+witness``.
+
 ================================
 Varnish Cache 6.3.0 (2019-09-15)
 ================================
diff --git a/doc/sphinx/reference/varnishtest.rst b/doc/sphinx/reference/varnishtest.rst
index b6133d70c..5cd180949 100644
--- a/doc/sphinx/reference/varnishtest.rst
+++ b/doc/sphinx/reference/varnishtest.rst
@@ -15,7 +15,7 @@ Test program for Varnish
 SYNOPSIS
 ========
 
-varnishtest [-hikLlqvW] [-b size] [-D name=val] [-j jobs] [-n iter] [-t duration] file [file ...]
+varnishtest [-hikLlqv] [-b size] [-D name=val] [-j jobs] [-n iter] [-t duration] file [file ...]
 
 DESCRIPTION
 ===========
@@ -56,8 +56,6 @@ The following options are available:
 
 -v               Verbose mode: always report test log
 
--W               Enable the witness facility for locking
-
 file             File to use as a script
 
 


More information about the varnish-commit mailing list