Commit 562f866a authored by Dridi Boukelmoune's avatar Dridi Boukelmoune

vtc: Use the vtc_feature param in the test suite

Better diff with the --word-diff --word-diff-regex=. options.
parent d651ec04
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}"; }
......
......@@ -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
}
......@@ -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 {
......
......@@ -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;
......
......@@ -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{
......
......@@ -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;
......
......@@ -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"
......
......@@ -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
......
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";
}
......
......@@ -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{
......
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}";
......
......@@ -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);
}
......
......@@ -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 {
......
......@@ -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
......
......@@ -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 }
}
......
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)
......
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}"; }
......
......@@ -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;
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment