[master] 562f866a0 vtc: Use the vtc_feature param in the test suite

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jun 27 13:38:07 UTC 2022


commit 562f866a08523c0fc2d6e99cec9f5127f728660e
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue May 31 08:28:47 2022 +0200

    vtc: Use the vtc_feature param in the test suite
    
    Better diff with the --word-diff --word-diff-regex=. options.

diff --git a/bin/varnishtest/tests/b00025.vtc b/bin/varnishtest/tests/b00025.vtc
index 1d23c7172..606277dbd 100644
--- a/bin/varnishtest/tests/b00025.vtc
+++ b/bin/varnishtest/tests/b00025.vtc
@@ -1,6 +1,6 @@
 varnishtest "more backends"
 
-varnish v1 -arg "-p vcc_err_unref=off" -vcl {
+varnish v1 -arg "-p vcc_feature=-err_unref" -vcl {
 	backend d0 { .host = "${bad_backend}"; }
 	backend d1 { .host = "${bad_backend}"; }
 	backend d2 { .host = "${bad_backend}"; }
diff --git a/bin/varnishtest/tests/b00058.vtc b/bin/varnishtest/tests/b00058.vtc
index c794fa6e9..ba09916af 100644
--- a/bin/varnishtest/tests/b00058.vtc
+++ b/bin/varnishtest/tests/b00058.vtc
@@ -2,11 +2,11 @@ varnishtest "Test backend definition documentation examples"
 
 feature cmd {getent hosts localhost && getent services http}
 
-varnish v1 -arg "-p vcc_err_unref=off" -vcl {
+varnish v1 -arg "-p vcc_feature=-err_unref" -vcl {
 	backend b1 {.host = "127.0.0.1";}
 	backend b2 {.host = "[::1]:8080";}
 	backend b3 {.host = "localhost:8081";}
 	backend b4 {.host = "localhost:http";}
 	backend b5 {.host = "127.0.0.1";.port = "8081";}
 	backend b6 {.host = "127.0.0.1";.port = "http";}
-}
\ No newline at end of file
+}
diff --git a/bin/varnishtest/tests/c00052.vtc b/bin/varnishtest/tests/c00052.vtc
index 6453a8095..30a21c8eb 100644
--- a/bin/varnishtest/tests/c00052.vtc
+++ b/bin/varnishtest/tests/c00052.vtc
@@ -7,13 +7,13 @@ server s1 {
 
 varnish v1
 
-varnish v1 -cliok "param.set vcc_allow_inline_c true"
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c"
 
 varnish v1 -vcl+backend {
 	C{ /*...*/ }C
 }
 
-varnish v1 -cliok "param.set vcc_allow_inline_c false"
+varnish v1 -cliok "param.set vcc_feature -allow_inline_c"
 
 varnish v1 -errvcl {Inline-C not allowed} {
 	backend default {
@@ -31,7 +31,7 @@ varnish v1 -errvcl {Inline-C not allowed} {
 	}
 }
 
-varnish v1 -cliok "param.set vcc_allow_inline_c true"
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c"
 
 varnish v1 -vcl+backend {
 	sub vcl_recv {
diff --git a/bin/varnishtest/tests/c00053.vtc b/bin/varnishtest/tests/c00053.vtc
index 20a5f1854..cf1c4a35a 100644
--- a/bin/varnishtest/tests/c00053.vtc
+++ b/bin/varnishtest/tests/c00053.vtc
@@ -11,7 +11,7 @@ varnish v1 -vcl+backend {
 	include "${tmpdir}/_.c00053";
 }
 
-varnish v1 -cliok "param.set vcc_unsafe_path off"
+varnish v1 -cliok "param.set vcc_feature -unsafe_path"
 
 varnish v1 -errvcl {' is unsafe} {
 	backend default { .host = "${s1_sock}"; }
@@ -28,7 +28,7 @@ shell "rm -f ${tmpdir}/_.c00053"
 
 # Testing of include +glob
 
-varnish v1 -cliok "param.set vcc_unsafe_path on"
+varnish v1 -cliok "param.set vcc_feature +unsafe_path"
 
 varnish v1 -errvcl "glob pattern matched no files." {
 	vcl 4.0;
diff --git a/bin/varnishtest/tests/c00057.vtc b/bin/varnishtest/tests/c00057.vtc
index db3919572..15e8ad74e 100644
--- a/bin/varnishtest/tests/c00057.vtc
+++ b/bin/varnishtest/tests/c00057.vtc
@@ -11,7 +11,7 @@ server s1 {
 
 varnish v1 \
 	-arg "-p feature=+no_coredump" \
-	-arg "-p vcc_allow_inline_c=true" \
+	-arg "-p vcc_feature=+allow_inline_c" \
 	-arg "-p thread_pool_stack=128k" \
 	-vcl+backend {
 	C{
@@ -66,7 +66,7 @@ varnish v1 -expectexit 0x40
 
 varnish v2 \
 	-arg "-p feature=+no_coredump" \
-	-arg "-p vcc_allow_inline_c=true" \
+	-arg "-p vcc_feature=+allow_inline_c" \
 	-vcl+backend {
 
 	C{
diff --git a/bin/varnishtest/tests/m00000.vtc b/bin/varnishtest/tests/m00000.vtc
index 694d1559d..dc674c3ae 100644
--- a/bin/varnishtest/tests/m00000.vtc
+++ b/bin/varnishtest/tests/m00000.vtc
@@ -157,7 +157,7 @@ varnish v1 -errvcl {Failed initialization} {
 	}
 }
 
-varnish v1 -cliok "param.set vcc_allow_inline_c on"
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c"
 varnish v1 -vcl {
 	import vtc;
 
diff --git a/bin/varnishtest/tests/m00008.vtc b/bin/varnishtest/tests/m00008.vtc
index d6e9aa37e..c61f23e81 100644
--- a/bin/varnishtest/tests/m00008.vtc
+++ b/bin/varnishtest/tests/m00008.vtc
@@ -29,7 +29,7 @@ varnish v1 -vcl+backend {
 	import std;
 }
 
-varnish v1 -cliok "param.set vcc_unsafe_path off"
+varnish v1 -cliok "param.set vcc_feature -unsafe_path"
 
 varnish v1 -errvcl {'import ... from path ...' is unsafe.} {
 	backend default { .host = "${s1_sock}"; }
@@ -43,7 +43,7 @@ varnish v1 -vcl+backend {
 	import std;
 }
 
-varnish v1 -cliok "param.set vcc_unsafe_path on"
+varnish v1 -cliok "param.set vcc_feature +unsafe_path"
 
 varnish v1 -cliok "param.set vmod_path /nowhere:/else"
 
diff --git a/bin/varnishtest/tests/r00742.vtc b/bin/varnishtest/tests/r00742.vtc
index ea3461090..9a7e233a0 100644
--- a/bin/varnishtest/tests/r00742.vtc
+++ b/bin/varnishtest/tests/r00742.vtc
@@ -5,7 +5,7 @@ server s1 {
 	txresp
 } -start
 
-varnish v1 -cliok "param.set vcc_allow_inline_c true" -vcl+backend {
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c" -vcl+backend {
 	C{
 	#include <stdio.h>
 	}C
diff --git a/bin/varnishtest/tests/r00911.vtc b/bin/varnishtest/tests/r00911.vtc
index 7f87421c9..e01d7db03 100644
--- a/bin/varnishtest/tests/r00911.vtc
+++ b/bin/varnishtest/tests/r00911.vtc
@@ -1,4 +1,4 @@
-varnishtest "vcc_err_unref should also cover subs"
+varnishtest "vcc_feature::err_unref should also cover subs"
 
 server s1 {
 	rxreq
@@ -6,7 +6,7 @@ server s1 {
 	txresp -body "foobar"
 } -start
 
-varnish v1 -arg "-p vcc_err_unref=false" -vcl+backend {
+varnish v1 -arg "-p vcc_feature=-err_unref" -vcl+backend {
 	sub foobar {
 		set req.http.foobar = "foobar";
 	}
diff --git a/bin/varnishtest/tests/r01406.vtc b/bin/varnishtest/tests/r01406.vtc
index d4c3de428..1d090201b 100644
--- a/bin/varnishtest/tests/r01406.vtc
+++ b/bin/varnishtest/tests/r01406.vtc
@@ -5,7 +5,7 @@ server s1 {
 	txresp
 } -start
 
-varnish v1 -arg "-p vcc_allow_inline_c=true" -vcl+backend {
+varnish v1 -arg "-p vcc_feature=+allow_inline_c" -vcl+backend {
 	import std ;
 
 	C{
diff --git a/bin/varnishtest/tests/r01504.vtc b/bin/varnishtest/tests/r01504.vtc
index da4d92c61..e93a8f783 100644
--- a/bin/varnishtest/tests/r01504.vtc
+++ b/bin/varnishtest/tests/r01504.vtc
@@ -1,6 +1,6 @@
 varnishtest "unreferenced or null acls"
 
-varnish v1 -arg "-p vcc_err_unref=off" -vcl {
+varnish v1 -arg "-p vcc_feature=-err_unref" -vcl {
 	import vtc;
 	backend s1 {
 		.host = "${bad_backend}";
diff --git a/bin/varnishtest/tests/r01562.vtc b/bin/varnishtest/tests/r01562.vtc
index 1f455dda8..050fc5cc5 100644
--- a/bin/varnishtest/tests/r01562.vtc
+++ b/bin/varnishtest/tests/r01562.vtc
@@ -12,7 +12,7 @@ server s2 {
 	txresp -status 200 -hdr "Foo: Foo" -body "56"
 } -start
 
-varnish v1 -cliok "param.set vcc_allow_inline_c true" -vcl+backend {
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c" -vcl+backend {
 	sub vcl_recv {
 		return (pass);
 	}
diff --git a/bin/varnishtest/tests/r02976.vtc b/bin/varnishtest/tests/r02976.vtc
index e03383069..713d2864a 100644
--- a/bin/varnishtest/tests/r02976.vtc
+++ b/bin/varnishtest/tests/r02976.vtc
@@ -9,7 +9,7 @@ server s1 -repeat 5 { # probe requests
 	txresp
 } -start
 
-varnish v1 -cliok {param.set vcc_err_unref off}
+varnish v1 -cliok {param.set vcc_feature -err_unref}
 
 varnish v1 -vcl {
 	backend b1 {
diff --git a/bin/varnishtest/tests/r03159.vtc b/bin/varnishtest/tests/r03159.vtc
index f13aaaf0d..66085f189 100644
--- a/bin/varnishtest/tests/r03159.vtc
+++ b/bin/varnishtest/tests/r03159.vtc
@@ -12,7 +12,7 @@ shell {
 
 process p1 -winsz 100 80 -log {
 	varnishd -F -n "${tmpdir}/t" -a "${tmpdir}/sock" \
-	    -p vcc_err_unref=off -f "${tmpdir}/unref.vcl" \
+	    -p vcc_feature=-err_unref -f "${tmpdir}/unref.vcl" \
 	    -l 2m 2>&1
 } -start
 
diff --git a/bin/varnishtest/tests/v00019.vtc b/bin/varnishtest/tests/v00019.vtc
index 0d3bd6960..24a23b51f 100644
--- a/bin/varnishtest/tests/v00019.vtc
+++ b/bin/varnishtest/tests/v00019.vtc
@@ -28,7 +28,7 @@ varnish v1 -errvcl {Unterminated string, starting at} {
 	"
 }
 
-varnish v1 -cliok "param.set vcc_allow_inline_c true" -vcl {
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c" -vcl {
 	backend b { .host = "${localhost}"; }
 	sub vcl_recv { C{ int i; (void)i; }C }
 }
diff --git a/bin/varnishtest/tests/v00020.vtc b/bin/varnishtest/tests/v00020.vtc
index a5b37eed3..96c318c57 100644
--- a/bin/varnishtest/tests/v00020.vtc
+++ b/bin/varnishtest/tests/v00020.vtc
@@ -1,6 +1,6 @@
 varnishtest "VCL compiler coverage test: vcc_parse.c & vcc_expr.c"
 
-varnish v1 -cliok "param.set vcc_allow_inline_c true" -vcl {
+varnish v1 -cliok "param.set vcc_feature +allow_inline_c" -vcl {
 	backend b { .host = "${localhost}"; }
 	C{
 	#include <stdio.h>
@@ -310,7 +310,7 @@ varnish v1 -errvcl {Not available in subroutine 'vcl_recv'.} {
 	}
 }
 
-varnish v1 -cliok "param.set vcc_err_unref off"
+varnish v1 -cliok "param.set vcc_feature -err_unref"
 
 varnish v1 -errvcl {Impossible Subroutine} {
 	backend b { .host = "127.0.0.1"; }
@@ -319,7 +319,7 @@ varnish v1 -errvcl {Impossible Subroutine} {
 	}
 }
 
-varnish v1 -cliok "param.set vcc_err_unref on"
+varnish v1 -cliok "param.set vcc_feature +err_unref"
 
 varnish v1 -errvcl {
 ('<vcl.inline>' Line 4 Pos 44) -- (Pos 49)
diff --git a/bin/varnishtest/tests/v00031.vtc b/bin/varnishtest/tests/v00031.vtc
index 902d4fa51..f9858540b 100644
--- a/bin/varnishtest/tests/v00031.vtc
+++ b/bin/varnishtest/tests/v00031.vtc
@@ -1,18 +1,18 @@
-varnishtest "param vcc_err_unref"
+varnishtest "param vcc_feature::err_unref"
 
 varnish v1 -errvcl {Unused backend c, defined:} {
 	backend b { .host = "${localhost}"; }
 	backend c { .host = "${localhost}"; }
 }
 
-varnish v1 -cliok "param.set vcc_err_unref false"
+varnish v1 -cliok "param.set vcc_feature -err_unref"
 
 varnish v1 -vcl {
 	backend b { .host = "${localhost}"; }
 	backend c { .host = "${localhost}"; }
 }
 
-varnish v1 -cliok "param.set vcc_err_unref true"
+varnish v1 -cliok "param.set vcc_feature +err_unref"
 
 varnish v1 -errvcl {Unused backend c, defined:} {
 	backend b { .host = "${localhost}"; }
diff --git a/bin/varnishtest/tests/v00060.vtc b/bin/varnishtest/tests/v00060.vtc
index c01abc809..2a8c07344 100644
--- a/bin/varnishtest/tests/v00060.vtc
+++ b/bin/varnishtest/tests/v00060.vtc
@@ -44,7 +44,7 @@ client c1 {
 	expect resp.status == 503
 } -run
 
-varnish v1 -cliok "param.set vcc_err_unref off"
+varnish v1 -cliok "param.set vcc_feature -err_unref"
 varnish v1 -vcl {
 	backend bad { .host = "${bad_backend}"; }
 	backend nil none;
diff --git a/vmod/tests/blob_b00011.vtc b/vmod/tests/blob_b00011.vtc
index cc6ba8b08..7ba9973ae 100644
--- a/vmod/tests/blob_b00011.vtc
+++ b/vmod/tests/blob_b00011.vtc
@@ -5,7 +5,7 @@ varnishtest "VMOD blob workspace overflow conditions"
 # Since not all of them may be called by all VCLs we also need to ensure this
 # will not result in a compilation failure.
 
-varnish v1 -cliok "param.set vcc_err_unref off"
+varnish v1 -cliok "param.set vcc_feature -err_unref"
 varnish v1 -cliok "param.set debug +syncvsl"
 
 shell {


More information about the varnish-commit mailing list