[master] d851560 When varnishtest is invoked with -l/-L, don't delete VMOD shared objects.

Geoff Simmons geoff at uplex.de
Thu Apr 20 15:32:06 CEST 2017


commit d8515607dd98234ba42619e73e7a18e0e9648157
Author: Geoff Simmons <geoff at uplex.de>
Date:   Thu Apr 20 15:29:53 2017 +0200

    When varnishtest is invoked with -l/-L, don't delete VMOD shared objects.

diff --git a/bin/varnishtest/tests/m00008.vtc b/bin/varnishtest/tests/m00008.vtc
index abeffb9..849ba4e 100644
--- a/bin/varnishtest/tests/m00008.vtc
+++ b/bin/varnishtest/tests/m00008.vtc
@@ -47,6 +47,10 @@ varnish v1 -errvcl {Malformed VMOD std} {
 # Check creation and cleanup of copied shared objects for VMODs
 shell "test -e ./v1/vmod_cache/_vmod_std.*"
 
+# In case varnishtest was invoked with -L or -l, in which case the
+# bit is switched on.
+varnish v1 -cliok "param.set debug -vmod_so_keep"
+
 varnish v1 -stop
 varnish v1 -cleanup
 shell -err "test -e ./v1/vmod_cache/_vmod_std.*"
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 1f6a38f..55f601a 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -418,8 +418,10 @@ varnish_launch(struct varnish *v)
 	VSB_cat(vsb, VSB_data(params_vsb));
 	if (vtc_witness)
 		VSB_cat(vsb, " -p debug=+witness");
-	if (leave_temp)
+	if (leave_temp) {
 		VSB_cat(vsb, " -p debug=+vsm_keep");
+		VSB_cat(vsb, " -p debug=+vmod_so_keep");
+        }
 	VSB_printf(vsb, " -l 2m,1m,-");
 	VSB_printf(vsb, " -p auto_restart=off");
 	VSB_printf(vsb, " -p syslog_cli_traffic=off");



More information about the varnish-commit mailing list