diff --git a/INSTALL.rst b/INSTALL.rst index 890d309..57a1e9d 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -27,7 +27,7 @@ Installation The source tree is based on autotools to configure the building, and does also have the necessary bits in place to do functional unit tests -using the ``varnishtest`` tool. +using the ``vinyltest`` tool. For extended resolver functionality, `getdns`_ is required both during installation and at runtime. Before building, install `getdns`_ from @@ -39,16 +39,16 @@ At runtime, only the library itself is required, e.g.:: apt-get install libgetdns1 -Building requires the Varnish header files and uses pkg-config to find +Building requires the Vinyl header files and uses pkg-config to find the necessary paths. Usage:: ./bootstrap -If you have installed Varnish to a non-standard directory, call +If you have installed Vinyl to a non-standard directory, call ``bootstrap`` with ``PKG_CONFIG_PATH`` pointing to -the appropriate path. For instance, when varnishd configure was called +the appropriate path. For instance, when vinyld configure was called with ``--prefix=$PREFIX``, use :: @@ -56,7 +56,7 @@ with ``--prefix=$PREFIX``, use export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig export ACLOCAL_PATH=${PREFIX}/share/aclocal -The module will inherit its prefix from Varnish, unless you specify a +The module will inherit its prefix from Vinyl, unless you specify a different ``--prefix`` when running the ``configure`` script for this module. @@ -68,7 +68,7 @@ Make targets: * make distcheck - run check and prepare a tarball of the vmod. If you build a dist tarball, you don't need any of the autotools, only -pkg-config and Varnish. You can build the module simply by running:: +pkg-config and Vinyl. You can build the module simply by running:: ./configure make @@ -117,4 +117,4 @@ repositories, but can be installed from EPEL7:: If you have problems or questions concerning the RPMs, post an issue to one of the source repository web sites, or contact -. +. diff --git a/Makefile.am b/Makefile.am index 45f68cb..1551257 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,10 @@ -ACLOCAL_AMFLAGS = -I m4 -I ${VARNISHAPI_DATAROOTDIR}/aclocal +ACLOCAL_AMFLAGS = -I m4 -I ${VINYLAPI_DATAROOTDIR}/aclocal DISTCHECK_CONFIGURE_FLAGS = RST2MAN=: SUBDIRS = src dist_doc_DATA = README.rst LICENSE + +coverage: + $(MAKE) $(AM_MAKEFLAGS) -C src coverage diff --git a/README.rst b/README.rst index 5b0c8e4..5ddac54 100644 --- a/README.rst +++ b/README.rst @@ -4,7 +4,7 @@ vmod_dynamic .. role:: ref(emphasis) -This branch is for **Vinyl-Cache** *after* Varnish-Cache release 8.0. +This branch is for **Vinyl Cache** *after* Varnish-Cache release 8.0. Use branch `8.0`_ with Varnish-Cache 8.0.x @@ -15,18 +15,18 @@ versions. .. _`CHANGES.rst`: CHANGES.rst -Note on Vinyl-Cache / Varnish-Cache +Note on Vinyl Cache / Varnish-Cache ----------------------------------- -.. _`Vinyl-Cache Announcement`: https://vinyl-cache.org/#years-old-and-it-is-time-to-get-serious-er +.. _`Vinyl Cache Announcement`: https://vinyl-cache.org/#years-old-and-it-is-time-to-get-serious-er For now, we use the new and old name somehow interchangably and neither the documentation nor the code have been fully updated. -See `Vinyl-Cache Announcement`_ for background. +See `Vinyl Cache Announcement`_ for background. ------------------------------- -Varnish dynamic backends module +Vinyl dynamic backends module ------------------------------- Intro / Typical Usage Example @@ -45,7 +45,7 @@ Domain Socket (UDS) looks like this:: listen tls_onloader mode tcp maxconn 1000 - bind /shared/varnish/tls_onloader.sock accept-proxy mode 777 + bind /shared/vinyl/tls_onloader.sock accept-proxy mode 777 balance roundrobin stick-table type ip size 100 stick on dst @@ -57,20 +57,20 @@ Domain Socket (UDS) looks like this:: In this snippet, ``/etc/ssl/certs/ca-bundle.crt`` should be replaced with a CA certificate bundle which you decide to trust. ``maxconn`` should be adjusted as -needed. ``/shared/varnish/`` has to be a path which is also available to -``varnishd`` (beware, for example, of systemd implicitly chrooting services). +needed. ``/shared/vinyl/`` has to be a path which is also available to +``vinyld`` (beware, for example, of systemd implicitly chrooting services). ``mode 777`` is a fail-safe choice, but not optimal from a security perspective. -Ideally, varnishd and haproxy should be added to the ``vcache`` group and have +Ideally, vinyld and haproxy should be added to the ``vcache`` group and have this mode set to ``770``. The stick table ``size`` and the number of repetitions of the ``server sXX`` line should roughly match the number of expected peers. **NB:** all of this is just broad advise for the purpose of this introduction, do your own research! -On the varnish end, the following VCL snippet configures a dynamic director +On the vinyl end, the following VCL snippet configures a dynamic director using the TLS onloader:: backend tls_onloader { - .path = "/shared/varnish/tls_onloader.sock"; + .path = "/shared/vinyl/tls_onloader.sock"; ## consider setting: # .connect_timeout = Xs; # .first_byte_timeout = Xs; @@ -97,7 +97,7 @@ Description .. _`getdns`: https://getdnsapi.net/ -This module provides a varnish director for dynamic creation of +This module provides a vinyl director for dynamic creation of backends based on calls to * the system's network address resolution service which, in turn, @@ -107,7 +107,7 @@ backends based on calls to * or more advanced DNS resolution where `getdns`_ is available. -While standard varnish backends defined in VCL may also be defined in +While standard vinyl backends defined in VCL may also be defined in terms of host names, changes of the name service information will only be picked up with a VCL reload. @@ -178,9 +178,9 @@ SEE ALSO * :ref:`vcl(7)` * :ref:`vsl(7)` * :ref:`vsl-query(7)` -* :ref:`varnish-cli(7)` -* :ref:`varnish-counters(7)` -* :ref:`varnishstat(1)` +* :ref:`vinyl-cli(7)` +* :ref:`vinyl-counters(7)` +* :ref:`vinylstat(1)` * :ref:`getaddrinfo(3)` * :ref:`nscd(8)` * :ref:`nsswitch.conf(5)` diff --git a/bootstrap b/bootstrap index 41fa8a3..0e7409f 100755 --- a/bootstrap +++ b/bootstrap @@ -3,23 +3,14 @@ set -e set -u -WORK_DIR=$(pwd) ROOT_DIR=$(dirname "$0") -cd "$ROOT_DIR" +pkg-config --exists --print-errors vinylapi -if ! command -v libtoolize >/dev/null -then - echo "libtoolize: command not found, falling back to glibtoolize" >&2 - alias libtoolize=glibtoolize -fi +VINYLAPI_DATAROOTDIR=$(pkg-config --variable=datarootdir vinylapi) +export VINYLAPI_DATAROOTDIR mkdir -p m4 -aclocal -libtoolize --copy --force -autoheader -automake --add-missing --copy --foreign -autoconf +autoreconf -i "$ROOT_DIR" -cd "$WORK_DIR" "$ROOT_DIR"/configure "$@" diff --git a/configure.ac b/configure.ac index d0006ca..28ca911 100644 --- a/configure.ac +++ b/configure.ac @@ -1,18 +1,35 @@ AC_PREREQ([2.68]) -AC_INIT([libvmod-dynamic], [trunk], [varnish-support@uplex.de], [vmod-dynamic]) +AC_INIT([libvmod-dynamic], [trunk], [vinyl-support@uplex.de], [vmod-dynamic]) AC_COPYRIGHT([Copyright 2024 UPLEX - Nils Goroll Systemoptimierung]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) +AC_CONFIG_SRCDIR([src/vmod_dynamic.vcc]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign parallel-tests]) +AM_INIT_AUTOMAKE([1.12 -Wall -Werror foreign parallel-tests]) AM_SILENT_RULES([yes]) AC_ARG_VAR([RST2MAN], [the program to build manuals from reStructuredText]) AC_CHECK_PROGS(RST2MAN, [rst2man rst2man.py]) -VARNISH_PREREQ([7.5.0]) -VARNISH_VMODS([dynamic]) +AC_ARG_WITH([lcov], + AS_HELP_STRING( + [--with-lcov=PATH], + [Location of lcov to generate coverage data (auto)]), + [LCOV="$withval"], + [AC_CHECK_PROGS(LCOV, [lcov], [])]) +AM_CONDITIONAL(HAVE_LCOV, [test -n "$LCOV"]) + +AC_ARG_WITH([genhtml], + AS_HELP_STRING( + [--with-genhtml=PATH], + [Location of genhtml to generate coverage reports (auto)]), + [GENHTML="$withval"], + [AC_CHECK_PROGS(GENHTML, [genhtml], [])]) +AM_CONDITIONAL(HAVE_GENHTML, [test -n "$GENHTML"]) + +VINYL_PREREQ([9.0.0]) +VINYL_VMODS([dynamic]) AM_PROG_AR @@ -44,7 +61,7 @@ AS_IF([test "x$with_getdns" != xno], ]) AC_CHECK_HEADERS([cache/cache.h], [], - [AC_MSG_ERROR([Missing \$VARNISHSRC development files.])], + [AC_MSG_ERROR([Missing \$VINYLSRC development files.])], [[#include ]]) AC_CONFIG_FILES([ @@ -72,7 +89,7 @@ AC_OUTPUT AS_ECHO(" ==== $PACKAGE_STRING ==== - varnish: $VARNISH_VERSION + vinyl: $VINYL_VERSION prefix: $prefix vmoddir: $vmoddir vcldir: $vcldir diff --git a/contrib/vtc/r81.vtc b/contrib/vtc/r81.vtc index d722a78..fa94004 100644 --- a/contrib/vtc/r81.vtc +++ b/contrib/vtc/r81.vtc @@ -1,4 +1,4 @@ -varnishtest "bug #81 Assertion error on dynamic_domain" +vtest "bug #81 Assertion error on dynamic_domain" # this test case is in the contrib/vtc directory because of the additional requirements # @@ -22,7 +22,7 @@ varnishtest "bug #81 Assertion error on dynamic_domain" # # 3. Start dnsmasq "dnsmasq -C /etc/dnsmasq.conf" -varnish v1 -vcl { +vinyl v1 -vcl { import ${vmod_dynamic}; backend dummy { .host = "${bad_backend}"; } diff --git a/src/Makefile.am b/src/Makefile.am index 5b99f60..2766253 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,10 @@ -AM_CFLAGS = $(VARNISHAPI_CFLAGS) $(GETDNS_CFLAGS) -Wall -Werror +AM_CFLAGS = $(VINYLAPI_CFLAGS) $(GETDNS_CFLAGS) -Wall -Werror # Modules vmod_LTLIBRARIES = libvmod_dynamic.la -libvmod_dynamic_la_LDFLAGS = $(VARNISHAPI_LIBS) $(GETDNS_LIBS) $(VMOD_LDFLAGS) +libvmod_dynamic_la_LDFLAGS = $(VINYLAPI_LIBS) $(GETDNS_LIBS) $(VMOD_LDFLAGS) libvmod_dynamic_la_SOURCES = \ vmod_dynamic.h \ @@ -49,13 +49,13 @@ $(srcdir)/vmod_resolver.stub.c: vcc_dynamic_if.h @BUILD_VMOD_DYNAMIC@ AM_TESTS_ENVIRONMENT = \ - PATH="$(abs_builddir):$(VARNISH_TEST_PATH):$(PATH)" \ - LD_LIBRARY_PATH="$(VARNISH_LIBRARY_PATH)" + PATH="$(abs_builddir):$(VINYL_TEST_PATH):$(PATH)" \ + LD_LIBRARY_PATH="$(VINYL_LIBRARY_PATH)" TEST_EXTENSIONS = .vtc -VTC_LOG_COMPILER = varnishtest -vl +VTC_LOG_COMPILER = vinyltest -vl AM_VTC_LOG_FLAGS = \ - -p vcl_path="$(abs_top_srcdir)/vcl:$(VARNISHAPI_VCLDIR)" \ - -p vmod_path="$(abs_builddir)/.libs:$(vmoddir):$(VARNISHAPI_VMODDIR)" + -p vcl_path="$(abs_top_srcdir)/vcl:$(VINYLAPI_VCLDIR)" \ + -p vmod_path="$(abs_builddir)/.libs:$(vmoddir):$(VINYLAPI_VMODDIR)" TESTS = \ @VTC_TESTS@ @@ -80,3 +80,43 @@ pdf-local: vmod_dynamic.pdf .rst.1: $(AM_V_GEN) $(RST2MAN) $< $@ + +# Code coverage + +GCOV_PREFIX ?= $(builddir)/coverage + +gcov: clean + $(AM_V_at)@mkdir -p $(GCOV_PREFIX) && chmod 777 -R $(GCOV_PREFIX) + $(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) CC=gcc \ + CFLAGS="${AM_CFLAGS} --coverage -fno-inline -g -O0" check + +# Set QUIET=-q for non-verbose builds, otherwise set to empty. +QUIET_0 = -q +QUIET_ = $(QUIET_@AM_DEFAULT_V@) +QUIET = $(QUIET_@AM_V@) + +coverage/lcov.info: gcov +if HAVE_LCOV + -$(AM_V_at)@cp -R $(GCOV_PREFIX)/.libs $(builddir) 2> /dev/null + $(AM_V_GEN) $(LCOV) $(QUIET) \ + -c -d $(builddir)/.libs -o $(GCOV_PREFIX)/lcov.info +else + @echo "=================================================" + @echo "You need lcov installed to generate coverage data" + @echo "=================================================" + @false +endif + +coverage: coverage/lcov.info +if HAVE_GENHTML + $(AM_V_GEN) $(GENHTML) $(QUIET) $(GCOV_PREFIX)/lcov.info \ + -o $(GCOV_PREFIX) +else + @echo "=======================================================" + @echo "You need genhtml installed to generate coverage reports" + @echo "=======================================================" + @false +endif + +clean-local: + @rm -rf $(GCOV_PREFIX) diff --git a/src/flint.sh b/src/flint.sh index 2a1daf1..9fdf726 100755 --- a/src/flint.sh +++ b/src/flint.sh @@ -6,19 +6,19 @@ if [ "x$1" = "x-ok" -a -f _.fl ] ; then exit 0 fi -if [ "x${VARNISHSRC}" = "x" ] ; then - echo >&2 VARNISHSRC needs to point to varnish-cache sources +if [ "x${VINYLSRC}" = "x" ] ; then + echo >&2 VINYLSRC needs to point to vinyl-cache sources exit 9 fi flexelint \ -D__FLEXELINT__ \ - ${VARNISHSRC}/flint.lnt \ + ${VINYLSRC}/flint.lnt \ flint.lnt \ -zero \ -I.. \ - -I${VARNISHSRC}/include \ - -I${VARNISHSRC}/bin/varnishd \ + -I${VINYLSRC}/include \ + -I${VINYLSRC}/bin/vinyld \ $(ls *.c | grep -v .stub) \ 2>&1 | tee _.fl diff --git a/src/vmod_dynamic.c b/src/vmod_dynamic.c index 281923a..4821b54 100644 --- a/src/vmod_dynamic.c +++ b/src/vmod_dynamic.c @@ -342,7 +342,7 @@ dom_resolve(VRT_CTX, VCL_BACKEND d) * runs outside the update thread in order to be able to * call pthread_join(). * - * other options: extra thread, pool_task (needs cache_varnishd.h) + * other options: extra thread, pool_task (needs cache_vinyld.h) */ if (VTAILQ_FIRST(&dom->obj->unref_domains)) dynamic_gc_expired(dom->obj); diff --git a/src/vmod_dynamic.man.rst b/src/vmod_dynamic.man.rst index 404eae4..965090e 100644 --- a/src/vmod_dynamic.man.rst +++ b/src/vmod_dynamic.man.rst @@ -10,9 +10,9 @@ vmod_dynamic ============ -------------------------------- -Varnish dynamic backends module -------------------------------- +----------------------------- +Vinyl dynamic backends module +----------------------------- :Manual section: 3 @@ -63,7 +63,7 @@ SYNOPSIS DESCRIPTION =========== -This module provides a varnish director for dynamic creation of +This module provides a vinyl director for dynamic creation of backends based on calls to * the system's network address resolution service which, in turn, @@ -73,7 +73,7 @@ backends based on calls to * or more advanced DNS resolution where `getdns`_ is available. -While standard varnish backends defined in VCL may also be defined in +While standard vinyl backends defined in VCL may also be defined in terms of host names, changes of the name service information will only be picked up with a VCL reload. @@ -136,7 +136,7 @@ With ``share = DIRECTOR``, the probe is not specific to any particular host. If the probe has the ``.request`` attribute set, it will be used as the probe request. Otherwise, if a ``host_header`` argument was given to `dynamic.director()`_, it will be used for the probe's -``Host`` header, otherwise Varnish-Cache core code will send the +``Host`` header, otherwise Vinyl-Cache core code will send the backend's IP Address as the ``Host`` header. Consider setting the ``initial`` attribute of probes at least as high @@ -211,7 +211,7 @@ STATISTICS Dynamic backends are created and deleted on demand and can be monitored just like VCL-defined backends. Their statistics will appear -in VSM-tools like ``varnishstat`` as:: +in VSM-tools like ``vinylstat`` as:: VBE...* @@ -242,9 +242,9 @@ with the event:: Not all logs belong to HTTP transactions, especially since DNS lookups happen in the background. In order to capture all logs from this module the simplest -way with varnishlog is the following:: +way with vinyllog is the following:: - varnishlog -g raw -q '* ~ vmod-dynamic' + vinyllog -g raw -q '* ~ vmod-dynamic' It displays any individual record that contains the string ``vmod-dynamic`` whether it belongs to a transaction or not. @@ -403,7 +403,7 @@ Parameters: Parameters to set attributes of backends - See varnish documentation for details + See vinyl documentation for details - *connect_timeout* (defaults to global *connect_timeout*) - *first_byte_timeout* (defaults to global *first_byte_timeout*) @@ -711,7 +711,7 @@ May only be called from ``vcl_init{}`` FULL EXAMPLE: BEHAVE LIKE SQUID =============================== -For illustrative purposes, here is an example to turn Varnish into a +For illustrative purposes, here is an example to turn Vinyl into a caching forward proxy for any host. This example is for http only, for https support, *via* support from the ``proxy_via_6`` branch is required. @@ -759,7 +759,7 @@ STATUS DETAILS ============== Status about dynamic backends can be queried using the -``backend.list`` :ref:`varnish-cli(7)` command. There are four +``backend.list`` :ref:`vinyl-cli(7)` command. There are four variants of the output, explained as examples with a vcl named ``vcl`` and a dynamic director named ``dyn`` with a probe definition, having resolved ``www.****.de`` (some actual domain hosted by Akamai). All @@ -838,7 +838,7 @@ examples are abbreviated. Shows detailed information in JSON format. The dynamic domain object contains as ``probe_details`` most properties of the dynamic - director VCL object. Note that, due to Varnish-Cache API + director VCL object. Note that, due to Vinyl-Cache API limitations, for ``probe`` and ``whitelist``, only a boolean value can be returned. The list of backends represents the active backends:: @@ -950,9 +950,9 @@ SEE ALSO * :ref:`vcl(7)` * :ref:`vsl(7)` * :ref:`vsl-query(7)` -* :ref:`varnish-cli(7)` -* :ref:`varnish-counters(7)` -* :ref:`varnishstat(1)` +* :ref:`vinyl-cli(7)` +* :ref:`vinyl-counters(7)` +* :ref:`vinylstat(1)` * :ref:`getaddrinfo(3)` * :ref:`nscd(8)` * :ref:`nsswitch.conf(5)` diff --git a/src/vmod_dynamic.vcc b/src/vmod_dynamic.vcc index 873e886..ab7bb9e 100644 --- a/src/vmod_dynamic.vcc +++ b/src/vmod_dynamic.vcc @@ -26,7 +26,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. -$Module dynamic 3 "Varnish dynamic backends module" +$Module dynamic 3 "Vinyl dynamic backends module" $ABI vrt .. role:: ref(emphasis) @@ -34,7 +34,7 @@ $ABI vrt DESCRIPTION =========== -This module provides a varnish director for dynamic creation of +This module provides a vinyl director for dynamic creation of backends based on calls to * the system's network address resolution service which, in turn, @@ -44,7 +44,7 @@ backends based on calls to * or more advanced DNS resolution where `getdns`_ is available. -While standard varnish backends defined in VCL may also be defined in +While standard vinyl backends defined in VCL may also be defined in terms of host names, changes of the name service information will only be picked up with a VCL reload. @@ -107,7 +107,7 @@ With ``share = DIRECTOR``, the probe is not specific to any particular host. If the probe has the ``.request`` attribute set, it will be used as the probe request. Otherwise, if a ``host_header`` argument was given to `dynamic.director()`_, it will be used for the probe's -``Host`` header, otherwise Varnish-Cache core code will send the +``Host`` header, otherwise Vinyl cache core code will send the backend's IP Address as the ``Host`` header. Consider setting the ``initial`` attribute of probes at least as high @@ -182,7 +182,7 @@ STATISTICS Dynamic backends are created and deleted on demand and can be monitored just like VCL-defined backends. Their statistics will appear -in VSM-tools like ``varnishstat`` as:: +in VSM-tools like ``vinylstat`` as:: VBE...* @@ -213,9 +213,9 @@ with the event:: Not all logs belong to HTTP transactions, especially since DNS lookups happen in the background. In order to capture all logs from this module the simplest -way with varnishlog is the following:: +way with vinyllog is the following:: - varnishlog -g raw -q '* ~ vmod-dynamic' + vinyllog -g raw -q '* ~ vmod-dynamic' It displays any individual record that contains the string ``vmod-dynamic`` whether it belongs to a transaction or not. @@ -368,7 +368,7 @@ Parameters: Parameters to set attributes of backends - See varnish documentation for details + See vinyl documentation for details - *connect_timeout* (defaults to global *connect_timeout*) - *first_byte_timeout* (defaults to global *first_byte_timeout*) @@ -607,7 +607,7 @@ May only be called from ``vcl_init{}`` FULL EXAMPLE: BEHAVE LIKE SQUID =============================== -For illustrative purposes, here is an example to turn Varnish into a +For illustrative purposes, here is an example to turn Vinyl into a caching forward proxy for any host. This example is for http only, for https support, *via* support from the ``proxy_via_6`` branch is required. @@ -655,7 +655,7 @@ STATUS DETAILS ============== Status about dynamic backends can be queried using the -``backend.list`` :ref:`varnish-cli(7)` command. There are four +``backend.list`` :ref:`vinyl-cli(7)` command. There are four variants of the output, explained as examples with a vcl named ``vcl`` and a dynamic director named ``dyn`` with a probe definition, having resolved ``www.****.de`` (some actual domain hosted by Akamai). All @@ -734,7 +734,7 @@ examples are abbreviated. Shows detailed information in JSON format. The dynamic domain object contains as ``probe_details`` most properties of the dynamic - director VCL object. Note that, due to Varnish-Cache API + director VCL object. Note that, due to Vinyl cache API limitations, for ``probe`` and ``whitelist``, only a boolean value can be returned. The list of backends represents the active backends:: @@ -846,9 +846,9 @@ SEE ALSO * :ref:`vcl(7)` * :ref:`vsl(7)` * :ref:`vsl-query(7)` -* :ref:`varnish-cli(7)` -* :ref:`varnish-counters(7)` -* :ref:`varnishstat(1)` +* :ref:`vinyl-cli(7)` +* :ref:`vinyl-counters(7)` +* :ref:`vinylstat(1)` * :ref:`getaddrinfo(3)` * :ref:`nscd(8)` * :ref:`nsswitch.conf(5)` diff --git a/src/vtc/admin_health.vtc b/src/vtc/admin_health.vtc index 178cd82..9f5bb58 100644 --- a/src/vtc/admin_health.vtc +++ b/src/vtc/admin_health.vtc @@ -1,9 +1,9 @@ -varnishtest "panic" +vtest "panic" server s1 { } -start -varnish v1 -vcl { +vinyl v1 -vcl { vcl 4.1; import std; import directors; @@ -18,4 +18,4 @@ varnish v1 -vcl { } } -start -varnish v1 -cliok "backend.set_health main(*) sick" +vinyl v1 -cliok "backend.set_health main(*) sick" diff --git a/src/vtc/layer.vtc b/src/vtc/layer.vtc index aba47f2..fb888a4 100644 --- a/src/vtc/layer.vtc +++ b/src/vtc/layer.vtc @@ -1,4 +1,4 @@ -varnishtest "Layering test" +vtest "Layering test" feature cmd "getent hosts localhost" @@ -11,7 +11,7 @@ server s1 { txresp } -start -varnish v1 -vcl {backend none none;} -start +vinyl v1 -vcl {backend none none;} -start shell { cat >${tmpdir}/layer.vcl <<-EOF @@ -56,11 +56,11 @@ logexpect l2 -v v1 -q "vxid == 1001" { expect * 1001 VCL_Log "Resolve: d1" } -start -varnish v1 -cliok "vcl.load vclX1 ${tmpdir}/layer.vcl" -varnish v1 -cliok "vcl.use vclX1" -varnish v1 -cliok "vcl.discard vcl1" +vinyl v1 -cliok "vcl.load vclX1 ${tmpdir}/layer.vcl" +vinyl v1 -cliok "vcl.use vclX1" +vinyl v1 -cliok "vcl.discard vcl1" -varnish v1 -cliok "backend.list" +vinyl v1 -cliok "backend.list" client c1 { txreq @@ -76,17 +76,17 @@ client c1 { expect resp.status == 200 } -run -varnish v1 -expect VBE.vclX1.d1(${s1_addr}:${s1_port}).req == 3 -varnish v1 -expect LCK.dynamic.director.creat > 0 -varnish v1 -expect LCK.dynamic.backend.creat > 0 +vinyl v1 -expect VBE.vclX1.d1(${s1_addr}:${s1_port}).req == 3 +vinyl v1 -expect LCK.dynamic.director.creat > 0 +vinyl v1 -expect LCK.dynamic.backend.creat > 0 logexpect l1 -wait logexpect l2 -wait # load as cold and discard -varnish v1 -cliok "vcl.load vclX2 ${tmpdir}/layer.vcl cold" -varnish v1 -cliok "vcl.discard vclX2" +vinyl v1 -cliok "vcl.load vclX2 ${tmpdir}/layer.vcl cold" +vinyl v1 -cliok "vcl.discard vclX2" -varnish v1 -vcl { backend none none; } -varnish v1 -cliok "vcl.discard vclX1" -varnish v1 -vsl_catchup +vinyl v1 -vcl { backend none none; } +vinyl v1 -cliok "vcl.discard vclX1" +vinyl v1 -vsl_catchup diff --git a/src/vtc/layer_probe.vtc b/src/vtc/layer_probe.vtc index 8de9267..3a9d2ba 100644 --- a/src/vtc/layer_probe.vtc +++ b/src/vtc/layer_probe.vtc @@ -1,8 +1,8 @@ -varnishtest "layered config with probe" +vtest "layered config with probe" # by delthas, from https://github.com/varnishcache/varnish-cache/issues/4189 -varnish v1 -vcl { +vinyl v1 -vcl { vcl 4.1; import std; import dynamic; diff --git a/src/vtc/layer_reload.vtc b/src/vtc/layer_reload.vtc index 90a33b0..3495c0c 100644 --- a/src/vtc/layer_reload.vtc +++ b/src/vtc/layer_reload.vtc @@ -1,4 +1,4 @@ -varnishtest "Reloading after creating backend in init" +vtest "Reloading after creating backend in init" feature cmd "getent hosts example.com" @@ -20,10 +20,10 @@ shell { EOF } -varnish v1 -cliok "vcl.load vcl1 ${tmpdir}/f1" -varnish v1 -cliok "vcl.use vcl1" -varnish v1 -cliok "start" +vinyl v1 -cliok "vcl.load vcl1 ${tmpdir}/f1" +vinyl v1 -cliok "vcl.use vcl1" +vinyl v1 -cliok "start" -varnish v1 -cliok "vcl.load vcl2 ${tmpdir}/f1" -varnish v1 -cliok "vcl.use vcl2" -varnish v1 -cliok "vcl.discard vcl1" +vinyl v1 -cliok "vcl.load vcl2 ${tmpdir}/f1" +vinyl v1 -cliok "vcl.use vcl2" +vinyl v1 -cliok "vcl.discard vcl1" diff --git a/src/vtc/nogetdns/resolver_init_error.vtc b/src/vtc/nogetdns/resolver_init_error.vtc index 9053ebf..1488901 100644 --- a/src/vtc/nogetdns/resolver_init_error.vtc +++ b/src/vtc/nogetdns/resolver_init_error.vtc @@ -1,8 +1,8 @@ -varnishtest "Error message if getdns support is missing but resolver used" +vtest "Error message if getdns support is missing but resolver used" -varnish v1 -vcl {backend none none;} -start +vinyl v1 -vcl {backend none none;} -start -varnish v1 -errvcl "dynamic.resolver() not available, vmod was built without getdns support" { +vinyl v1 -errvcl "dynamic.resolver() not available, vmod was built without getdns support" { import dynamic; backend none none; sub vcl_init { diff --git a/src/vtc/r00107.vtc b/src/vtc/r00107.vtc index 8fac0e6..cd9a8ea 100644 --- a/src/vtc/r00107.vtc +++ b/src/vtc/r00107.vtc @@ -1,4 +1,4 @@ -varnishtest "regression test issue #107 dom_release() from unref_domains" +vtest "regression test issue #107 dom_release() from unref_domains" feature cmd "getent hosts localhost www.localhost img.localhost" @@ -16,7 +16,7 @@ server s1 { txresp } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; sub vcl_init { @@ -45,6 +45,6 @@ client c1 { delay 1 -varnish v1 -vcl {backend proforma none;} +vinyl v1 -vcl {backend proforma none;} -varnish v1 -cliok "vcl.state vcl1 cold" +vinyl v1 -cliok "vcl.state vcl1 cold" diff --git a/src/vtc/resolver/resolver_basic.vtc b/src/vtc/resolver/resolver_basic.vtc index 9794df4..a70804e 100644 --- a/src/vtc/resolver/resolver_basic.vtc +++ b/src/vtc/resolver/resolver_basic.vtc @@ -1,6 +1,6 @@ -varnishtest "dynamic.resolver basic" +vtest "dynamic.resolver basic" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; diff --git a/src/vtc/resolver/resolver_resolver_cfg.vtc b/src/vtc/resolver/resolver_resolver_cfg.vtc index 38b59e3..0538e4f 100644 --- a/src/vtc/resolver/resolver_resolver_cfg.vtc +++ b/src/vtc/resolver/resolver_resolver_cfg.vtc @@ -1,6 +1,6 @@ -varnishtest "dynamic.resolver configuration" +vtest "dynamic.resolver configuration" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -74,7 +74,7 @@ client c1 { logexpect l1 -wait -varnish v1 -errvcl "tried to add namespace DNS twice" { +vinyl v1 -errvcl "tried to add namespace DNS twice" { import dynamic; backend proforma none; @@ -87,7 +87,7 @@ varnish v1 -errvcl "tried to add namespace DNS twice" { } } -varnish v1 -errvcl "tried to add transport UDP twice" { +vinyl v1 -errvcl "tried to add transport UDP twice" { import dynamic; backend proforma none; @@ -100,7 +100,7 @@ varnish v1 -errvcl "tried to add transport UDP twice" { } } -varnish v1 -errvcl "error 311 (A required parameter had an invalid value.)" { +vinyl v1 -errvcl "error 311 (A required parameter had an invalid value.)" { import dynamic; backend proforma none; diff --git a/src/vtc/resolver/resolver_test01.vtc b/src/vtc/resolver/resolver_test01.vtc index 1e550bb..9757c21 100644 --- a/src/vtc/resolver/resolver_test01.vtc +++ b/src/vtc/resolver/resolver_test01.vtc @@ -1,4 +1,4 @@ -varnishtest "Smoke test" +vtest "Smoke test" feature cmd "getent hosts vinyl-cache.org" @@ -7,7 +7,7 @@ server s1 { txresp } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; acl ipv4_only { "0.0.0.0"/0; } @@ -38,6 +38,6 @@ client c1 { expect resp.status == 200 } -run -varnish v1 -expect VBE.vcl1.d1(176.58.90.154:http).req == 1 -varnish v1 -expect LCK.dynamic.director.creat > 0 -varnish v1 -expect LCK.dynamic.backend.creat > 0 +vinyl v1 -expect VBE.vcl1.d1(176.58.90.154:http).req == 1 +vinyl v1 -expect LCK.dynamic.director.creat > 0 +vinyl v1 -expect LCK.dynamic.backend.creat > 0 diff --git a/src/vtc/service/service_basic-stub.vtc b/src/vtc/service/service_basic-stub.vtc index e8276b7..688517e 100644 --- a/src/vtc/service/service_basic-stub.vtc +++ b/src/vtc/service/service_basic-stub.vtc @@ -1,8 +1,8 @@ -varnishtest "service smoke test - save as basic.vtc, but stub resolver" +vtest "service smoke test - save as basic.vtc, but stub resolver" feature cmd {dig @b.root-servers.net. a.root-servers.net. >/dev/null} -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -39,7 +39,7 @@ varnish v1 -vcl { # vcl1 d1 _test._tcp.vmod-dynamic.uplex.de -> two-a.test.uplex.de.:81 priority 2 weight 25 ttl 3600 # vcl1 d1 _test._tcp.vmod-dynamic.uplex.de -> two-b.test.uplex.de.:82 priority 2 weight 50 ttl 3600 -varnish v1 -cli "backend.list" +vinyl v1 -cli "backend.list" # we do not care about failing backend requests here, we only care # about the right backend being used @@ -59,8 +59,8 @@ client c1 { # 6 d1(212.12.63.113:81) # 14 d1(212.12.63.113:82) -varnish v1 -cliok "backend.set_health *.d1(212.12.63.113:80) sick" -varnish v1 -cliok "debug.srandom" +vinyl v1 -cliok "backend.set_health *.d1(212.12.63.113:80) sick" +vinyl v1 -cliok "debug.srandom" client c2 { txreq @@ -125,7 +125,7 @@ client c2 { expect resp.http.backend == d1(212.12.63.113:82) } -run -varnish v1 -cliok "backend.set_health *.d1(212.12.63.113:81) sick" +vinyl v1 -cliok "backend.set_health *.d1(212.12.63.113:81) sick" client c2 -repeat 5 -keepalive { txreq @@ -133,7 +133,7 @@ client c2 -repeat 5 -keepalive { expect resp.http.backend == d1(212.12.63.113:82) } -varnish v1 -cliok "backend.set_health *.d1(212.12.63.113:80) healthy" +vinyl v1 -cliok "backend.set_health *.d1(212.12.63.113:80) healthy" client c2 { txreq rxresp diff --git a/src/vtc/service/service_basic.vtc b/src/vtc/service/service_basic.vtc index dbce548..0a1df23 100644 --- a/src/vtc/service/service_basic.vtc +++ b/src/vtc/service/service_basic.vtc @@ -1,8 +1,8 @@ -varnishtest "service smoke test" +vtest "service smoke test" feature cmd {dig @b.root-servers.net. a.root-servers.net. >/dev/null} -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -38,7 +38,7 @@ varnish v1 -vcl { # vcl1 d1 _test._tcp.vmod-dynamic.uplex.de -> two-a.test.uplex.de.:81 priority 2 weight 25 ttl 3600 # vcl1 d1 _test._tcp.vmod-dynamic.uplex.de -> two-b.test.uplex.de.:82 priority 2 weight 50 ttl 3600 -varnish v1 -cli "backend.list" +vinyl v1 -cli "backend.list" # we do not care about failing backend requests here, we only care # about the right backend being used @@ -58,8 +58,8 @@ client c1 { # 6 d1(212.12.63.113:81) # 14 d1(212.12.63.113:82) -varnish v1 -cliok "backend.set_health *.d1(212.12.63.113:80) sick" -varnish v1 -cliok "debug.srandom" +vinyl v1 -cliok "backend.set_health *.d1(212.12.63.113:80) sick" +vinyl v1 -cliok "debug.srandom" client c2 { txreq @@ -124,7 +124,7 @@ client c2 { expect resp.http.backend == d1(212.12.63.113:82) } -run -varnish v1 -cliok "backend.set_health *.d1(212.12.63.113:81) sick" +vinyl v1 -cliok "backend.set_health *.d1(212.12.63.113:81) sick" client c2 -repeat 5 -keepalive { txreq @@ -132,7 +132,7 @@ client c2 -repeat 5 -keepalive { expect resp.http.backend == d1(212.12.63.113:82) } -varnish v1 -cliok "backend.set_health *.d1(212.12.63.113:80) healthy" +vinyl v1 -cliok "backend.set_health *.d1(212.12.63.113:80) healthy" client c2 { txreq rxresp diff --git a/src/vtc/service/service_r51.vtc b/src/vtc/service/service_r51.vtc index 060f0b4..21b88cd 100644 --- a/src/vtc/service/service_r51.vtc +++ b/src/vtc/service/service_r51.vtc @@ -1,8 +1,8 @@ -varnishtest "bug #51 regression: port=0 in SRV record" +vtest "bug #51 regression: port=0 in SRV record" # depends on external DNS -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -34,7 +34,7 @@ varnish v1 -vcl { } } -start -varnish v1 -cli "backend.list" +vinyl v1 -cli "backend.list" client c1 { txreq diff --git a/src/vtc/stale_obj.vtc b/src/vtc/stale_obj.vtc index de2e439..c0a08b8 100644 --- a/src/vtc/stale_obj.vtc +++ b/src/vtc/stale_obj.vtc @@ -1,4 +1,4 @@ -varnishtest "#45 regression: std.healthy on stale object" +vtest "#45 regression: std.healthy on stale object" feature cmd "getent hosts localhost" @@ -12,7 +12,7 @@ server s1 { txresp } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; import std; @@ -61,6 +61,6 @@ client c1 { expect resp.http.ttl ~ {^-.*} } -run -varnish v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 -varnish v1 -expect LCK.dynamic.director.creat > 0 -varnish v1 -expect LCK.dynamic.backend.creat > 0 +vinyl v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 +vinyl v1 -expect LCK.dynamic.director.creat > 0 +vinyl v1 -expect LCK.dynamic.backend.creat > 0 diff --git a/src/vtc/test01.vtc b/src/vtc/test01.vtc index 3192661..8076ae8 100644 --- a/src/vtc/test01.vtc +++ b/src/vtc/test01.vtc @@ -1,4 +1,4 @@ -varnishtest "Smoke test" +vtest "Smoke test" feature cmd "getent hosts localhost" @@ -7,7 +7,7 @@ server s1 -keepalive -repeat 2 { txresp } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; sub vcl_init { @@ -31,18 +31,18 @@ client c1 { expect resp.status == 200 } -run -varnish v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 1 -varnish v1 -expect LCK.dynamic.director.creat > 0 -varnish v1 -expect LCK.dynamic.backend.creat > 0 -varnish v1 -cliok "backend.list" -varnish v1 -cliok "backend.list -p" -varnish v1 -cliok "backend.list -j" -varnish v1 -cliok "backend.list -jp" +vinyl v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 1 +vinyl v1 -expect LCK.dynamic.director.creat > 0 +vinyl v1 -expect LCK.dynamic.backend.creat > 0 +vinyl v1 -cliok "backend.list" +vinyl v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -j" +vinyl v1 -cliok "backend.list -jp" # cold/warm keeps backend in place -varnish v1 -vcl {backend foo none;} -varnish v1 -cliok "vcl.state vcl1 cold" +vinyl v1 -vcl {backend foo none;} +vinyl v1 -cliok "vcl.state vcl1 cold" client c1 { txreq @@ -50,8 +50,8 @@ client c1 { expect resp.status == 503 } -run -varnish v1 -cliok "vcl.state vcl1 warm" -varnish v1 -cliok "vcl.use vcl1" +vinyl v1 -cliok "vcl.state vcl1 warm" +vinyl v1 -cliok "vcl.use vcl1" client c1 { txreq @@ -59,4 +59,4 @@ client c1 { expect resp.status == 200 } -run -varnish v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 +vinyl v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 diff --git a/src/vtc/test02.vtc b/src/vtc/test02.vtc index f29b75c..7b1f6b5 100644 --- a/src/vtc/test02.vtc +++ b/src/vtc/test02.vtc @@ -1,4 +1,4 @@ -varnishtest "Different host names can share backends" +vtest "Different host names can share backends" feature cmd "getent hosts www.localhost img.localhost" @@ -12,7 +12,7 @@ server s1 { txresp } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -43,4 +43,4 @@ client c1 { delay 1 -varnish v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 +vinyl v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 diff --git a/src/vtc/test03.vtc b/src/vtc/test03.vtc index 2ddaf78..f72f737 100644 --- a/src/vtc/test03.vtc +++ b/src/vtc/test03.vtc @@ -1,4 +1,4 @@ -varnishtest "VCL discarded with backends referenced more than once" +vtest "VCL discarded with backends referenced more than once" feature cmd "getent hosts www.localhost img.localhost" @@ -19,7 +19,7 @@ server s1 { txresp } -start -varnish v1 -arg "-p thread_pools=1" -vcl { +vinyl v1 -arg "-p thread_pools=1" -vcl { import dynamic; backend proforma none; @@ -49,13 +49,13 @@ client c1 { } -run delay 0.1 -varnish v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 +vinyl v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 delay 2 -varnish v1 -vcl+backend "" -varnish v1 -cli "vcl.discard vcl1" -varnish v1 -expect n_vcl_avail == 1 +vinyl v1 -vcl+backend "" +vinyl v1 -cli "vcl.discard vcl1" +vinyl v1 -expect n_vcl_avail == 1 client c2 { txreq -hdr "Host: s1" @@ -68,9 +68,9 @@ server s1 -wait # Tickle the CLI twice, in case the first gets the VCL in a cooling state # and delays the VCL poll to the next CLI operation. Ensuring a proper # discard despite the use of dynamic backends. -varnish v1 -cli "vcl.list" -varnish v1 -cli "vcl.list" +vinyl v1 -cli "vcl.list" +vinyl v1 -cli "vcl.list" -varnish v1 -expect n_vcl == 1 -varnish v1 -expect n_vcl_avail == 1 -varnish v1 -expect n_vcl_discard == 0 +vinyl v1 -expect n_vcl == 1 +vinyl v1 -expect n_vcl_avail == 1 +vinyl v1 -expect n_vcl_discard == 0 diff --git a/src/vtc/test04.vtc b/src/vtc/test04.vtc index 40b3d1e..9632110 100644 --- a/src/vtc/test04.vtc +++ b/src/vtc/test04.vtc @@ -1,4 +1,4 @@ -varnishtest "Domain timeout" +vtest "Domain timeout" feature cmd "getent hosts localhost www.localhost img.localhost" @@ -16,7 +16,7 @@ server s1 { txresp } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; sub vcl_init { @@ -59,15 +59,15 @@ client c1 { expect resp.status == 200 } -run -varnish v1 -cliok "backend.list" +vinyl v1 -cliok "backend.list" # the backend got recreated after the localhost domain went away -varnish v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 +vinyl v1 -expect VBE.vcl1.d1(${s1_addr}:${s1_port}).req == 2 logexpect l1 -wait # test race to create domain -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -90,7 +90,7 @@ varnish v1 -vcl { } } -varnish v1 -cliok "vcl.discard vcl1" +vinyl v1 -cliok "vcl.discard vcl1" client c1 { txreq -hdr "Host: localhost" diff --git a/src/vtc/test05.vtc b/src/vtc/test05.vtc index 2ad0aa8..588991d 100644 --- a/src/vtc/test05.vtc +++ b/src/vtc/test05.vtc @@ -1,4 +1,4 @@ -varnishtest "Implicit domain name on backend selection" +vtest "Implicit domain name on backend selection" feature cmd "getent hosts localhost" @@ -33,7 +33,7 @@ server s1 -listen 0.0.0.0 0 { txresp } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -90,7 +90,7 @@ client c1 { expect_close } -run -varnish v1 -expect VBE.vcl1.d1(127.0.0.1:${s1_port}).req == 1 -varnish v1 -expect VBE.vcl1.d1(127.0.0.2:${s1_port}).req == 1 -varnish v1 -expect VBE.vcl1.d1(127.0.0.3:${s1_port}).req == 1 -varnish v1 -expect VBE.vcl1.d1(127.0.0.4:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1(127.0.0.1:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1(127.0.0.2:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1(127.0.0.3:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1(127.0.0.4:${s1_port}).req == 1 diff --git a/src/vtc/test06.vtc b/src/vtc/test06.vtc index ef82153..8ddb99d 100644 --- a/src/vtc/test06.vtc +++ b/src/vtc/test06.vtc @@ -1,4 +1,4 @@ -varnishtest "White-listing" +vtest "White-listing" feature cmd "getent hosts localhost" @@ -7,7 +7,7 @@ server s1 { txresp } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; diff --git a/src/vtc/test07.vtc b/src/vtc/test07.vtc index f9ec3d7..c4fad46 100644 --- a/src/vtc/test07.vtc +++ b/src/vtc/test07.vtc @@ -1,4 +1,4 @@ -varnishtest "debugging" +vtest "debugging" feature cmd "getent hosts localhost www.localhost img.localhost" @@ -15,7 +15,7 @@ server s1 { txresp } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; diff --git a/src/vtc/test08.vtc b/src/vtc/test08.vtc index 53a4968..62169ee 100644 --- a/src/vtc/test08.vtc +++ b/src/vtc/test08.vtc @@ -1,10 +1,10 @@ -varnishtest "Invalid parameters" +vtest "Invalid parameters" server s1 { } -start -varnish v1 -vcl+backend { } -start +vinyl v1 -vcl+backend { } -start -varnish v1 -errvcl "dynamic.director(): port may not be empty" { +vinyl v1 -errvcl "dynamic.director(): port may not be empty" { import dynamic; backend proforma none; sub vcl_init { @@ -12,7 +12,7 @@ varnish v1 -errvcl "dynamic.director(): port may not be empty" { } } -varnish v1 -errvcl "dynamic.director(): ttl may not be 0s" { +vinyl v1 -errvcl "dynamic.director(): ttl may not be 0s" { import dynamic; backend proforma none; sub vcl_init { @@ -20,7 +20,7 @@ varnish v1 -errvcl "dynamic.director(): ttl may not be 0s" { } } -varnish v1 -errvcl "dynamic.director(): domain_usage_timeout may not be 0s" { +vinyl v1 -errvcl "dynamic.director(): domain_usage_timeout may not be 0s" { import dynamic; backend proforma none; sub vcl_init { @@ -28,7 +28,7 @@ varnish v1 -errvcl "dynamic.director(): domain_usage_timeout may not be 0s" { } } -varnish v1 -errvcl "dynamic.director(): first_lookup_timeout may not be 0s" { +vinyl v1 -errvcl "dynamic.director(): first_lookup_timeout may not be 0s" { import dynamic; backend proforma none; sub vcl_init { diff --git a/src/vtc/test09.vtc b/src/vtc/test09.vtc index 26d0ed6..c4abbcd 100644 --- a/src/vtc/test09.vtc +++ b/src/vtc/test09.vtc @@ -1,10 +1,10 @@ -varnishtest "Ipv4- or IPv6-only" +vtest "Ipv4- or IPv6-only" feature cmd "getent services http" server s1 { } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; acl ipv4_only { "0.0.0.0"/0; } @@ -36,8 +36,8 @@ client c1 { logexpect l4 -wait logexpect l6 -wait -varnish v1 -expect VBE.vcl1.d4(127.0.0.1:http).req == 0 -varnish v1 -expect VBE.vcl1.d6(::1:http).req == 0 +vinyl v1 -expect VBE.vcl1.d4(127.0.0.1:http).req == 0 +vinyl v1 -expect VBE.vcl1.d6(::1:http).req == 0 -varnish v1 -expect !VBE.vcl1.d4(::1:http).req -varnish v1 -expect !VBE.vcl1.d6(127.0.0.1:http).req +vinyl v1 -expect !VBE.vcl1.d4(::1:http).req +vinyl v1 -expect !VBE.vcl1.d6(127.0.0.1:http).req diff --git a/src/vtc/test10.vtc b/src/vtc/test10.vtc index 6bf944e..43629bb 100644 --- a/src/vtc/test10.vtc +++ b/src/vtc/test10.vtc @@ -1,4 +1,4 @@ -varnishtest "max_connections" +vtest "max_connections" barrier b1 cond 2 barrier b2 cond 2 @@ -10,7 +10,7 @@ server s1 { txresp } -start -varnish v1 -vcl+backend { +vinyl v1 -vcl+backend { import dynamic; sub vcl_init { diff --git a/src/vtc/test11.vtc b/src/vtc/test11.vtc index 7f664e7..3236ae8 100644 --- a/src/vtc/test11.vtc +++ b/src/vtc/test11.vtc @@ -1,11 +1,11 @@ -varnishtest proxy_header +vtest proxy_header server s1 { rxreq txresp } -start -varnish v1 -proto PROXY -vcl+backend { +vinyl v1 -proto PROXY -vcl+backend { import std; sub vcl_deliver { @@ -14,7 +14,7 @@ varnish v1 -proto PROXY -vcl+backend { } } -start -varnish v2 -vcl+backend { +vinyl v2 -vcl+backend { import dynamic; sub vcl_init { diff --git a/src/vtc/test12.vtc b/src/vtc/test12.vtc index 90102b1..619ed18 100644 --- a/src/vtc/test12.vtc +++ b/src/vtc/test12.vtc @@ -1,4 +1,4 @@ -varnishtest "Host header per backend" +vtest "Host header per backend" feature cmd "getent hosts www.localhost img.localhost" @@ -12,7 +12,7 @@ server s1 { txresp } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend proforma none; @@ -48,5 +48,5 @@ client c1 { delay 1 -varnish v1 -expect VBE.vcl1.d1.www.localhost(${s1_addr}:${s1_port}).req == 1 -varnish v1 -expect VBE.vcl1.d1.img.localhost(${s1_addr}:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1.www.localhost(${s1_addr}:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1.img.localhost(${s1_addr}:${s1_port}).req == 1 diff --git a/src/vtc/test13.vtc b/src/vtc/test13.vtc index 587dfe3..ae96998 100644 --- a/src/vtc/test13.vtc +++ b/src/vtc/test13.vtc @@ -1,8 +1,8 @@ -varnishtest "share = HOST and probe hostname" +vtest "share = HOST and probe hostname" feature cmd "getent hosts www.localhost img.localhost" -# probe polling test from varnish-cache v00017.vtc +# probe polling test from vinyl-cache v00017.vtc barrier b1 cond 2 @@ -18,7 +18,7 @@ server s1 { # req rxreq - expect req.http.X-Varnish == 1002 + expect req.http.X-Vinyl == 1002 expect req.http.host == www.localhost txresp @@ -36,14 +36,14 @@ server s1 { # req rxreq - expect req.http.X-Varnish == 1004 + expect req.http.X-Vinyl == 1004 expect req.http.host == img.localhost txresp barrier b1 sync } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; import vtc; @@ -89,17 +89,17 @@ client c1 { barrier b1 sync -varnish v1 -cliexpect "d1\\.www\\.localhost.*4/8" "backend.list" -varnish v1 -cliexpect "d1\\.img\\.localhost.*4/8" "backend.list" +vinyl v1 -cliexpect "d1\\.www\\.localhost.*4/8" "backend.list" +vinyl v1 -cliexpect "d1\\.img\\.localhost.*4/8" "backend.list" -varnish v1 -expect VBE.vcl1.d1.www.localhost(${s1_addr}:${s1_port}).req == 1 -varnish v1 -expect VBE.vcl1.d1.img.localhost(${s1_addr}:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1.www.localhost(${s1_addr}:${s1_port}).req == 1 +vinyl v1 -expect VBE.vcl1.d1.img.localhost(${s1_addr}:${s1_port}).req == 1 -varnish v1 -expect MAIN.backend_unhealthy == 0 +vinyl v1 -expect MAIN.backend_unhealthy == 0 -varnish v1 -cliok "backend.set_health d1*${s1_port}* sick" +vinyl v1 -cliok "backend.set_health d1*${s1_port}* sick" -varnish v1 -cliok "backend.list" +vinyl v1 -cliok "backend.list" client c1 { txreq -hdr "Host: www.localhost" @@ -107,4 +107,4 @@ client c1 { expect resp.status == 503 } -run -varnish v1 -expect MAIN.backend_unhealthy >= 2 +vinyl v1 -expect MAIN.backend_unhealthy >= 2 diff --git a/src/vtc/test14.vtc b/src/vtc/test14.vtc index ebddd86..3b87269 100644 --- a/src/vtc/test14.vtc +++ b/src/vtc/test14.vtc @@ -1,4 +1,4 @@ -varnishtest "layer dynamic with another director" +vtest "layer dynamic with another director" # This also tests the use of .backend() in vcl_init, which can be used # by other VMODs that initialize with a backend. @@ -13,7 +13,7 @@ server s1 { txresp } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; import directors; diff --git a/src/vtc/via.vtc b/src/vtc/via.vtc index 422b6a1..109dc68 100644 --- a/src/vtc/via.vtc +++ b/src/vtc/via.vtc @@ -1,4 +1,4 @@ -varnishtest "via and authority" +vtest "via and authority" feature cmd "getent hosts localhost www.localhost img.localhost" @@ -7,7 +7,7 @@ server s1 -repeat 7 { txresp } -start -varnish v2 -proto PROXY -vcl { +vinyl v2 -proto PROXY -vcl { import dynamic; import std; import proxy; @@ -32,7 +32,7 @@ varnish v2 -proto PROXY -vcl { } } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .host = "${v2_addr}"; .port = "${v2_port}"; } @@ -74,9 +74,9 @@ client c1 { expect resp.http.Authority == "localhost" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .host = "${v2_addr}"; .port = "${v2_port}"; } @@ -110,9 +110,9 @@ client c1 { expect resp.http.Authority == "authority.com" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .host = "${v2_addr}"; .port = "${v2_port}"; } @@ -146,9 +146,9 @@ client c1 { expect resp.http.Authority == "host.com" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .host = "${v2_addr}"; .port = "${v2_port}"; } @@ -182,9 +182,9 @@ client c1 { expect resp.http.Authority == "" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .host = "${v2_addr}"; .port = "${v2_port}"; } @@ -221,18 +221,18 @@ client c1 { expect resp.http.Authority == "auth.com" } -run -varnish v1 -cli "vcl.discard vcl1" -varnish v1 -cli "vcl.discard vcl2" -varnish v1 -cli "vcl.discard vcl3" -varnish v1 -cli "vcl.discard vcl4" +vinyl v1 -cli "vcl.discard vcl1" +vinyl v1 -cli "vcl.discard vcl2" +vinyl v1 -cli "vcl.discard vcl3" +vinyl v1 -cli "vcl.discard vcl4" -varnish v1 -expect VBE.vcl5.d1.localhost(${s1_addr}:${s1_port}/auth.com).req == 1 -varnish v1 -cliok "backend.list -p" +vinyl v1 -expect VBE.vcl5.d1.localhost(${s1_addr}:${s1_port}/auth.com).req == 1 +vinyl v1 -cliok "backend.list -p" # give vcls time to cool delay 3 -varnish v1 -expect MAIN.n_backend == 4 +vinyl v1 -expect MAIN.n_backend == 4 -varnish v3 -proto PROXY -vcl+backend { +vinyl v3 -proto PROXY -vcl+backend { import std; import proxy; @@ -245,7 +245,7 @@ varnish v3 -proto PROXY -vcl+backend { } } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend b None; @@ -274,10 +274,10 @@ client c1 -connect ${v1_sock} { expect resp.http.Authority == "" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" # vtc diag only -shell "varnishstat -1 -n ${v1_name} -f VBE.*" +shell "vinylstat -1 -n ${v1_name} -f VBE.*" -varnish v1 -expect LCK.dynamic.director.creat > 0 -varnish v1 -expect LCK.dynamic.backend.creat > 0 +vinyl v1 -expect LCK.dynamic.director.creat > 0 +vinyl v1 -expect LCK.dynamic.backend.creat > 0 diff --git a/src/vtc/via_uds.vtc b/src/vtc/via_uds.vtc index 06fe7d1..dcd65df 100644 --- a/src/vtc/via_uds.vtc +++ b/src/vtc/via_uds.vtc @@ -1,4 +1,4 @@ -varnishtest "via and authority using uds socket" +vtest "via and authority using uds socket" feature cmd "getent hosts localhost www.localhost img.localhost" @@ -7,7 +7,7 @@ server s1 -repeat 7 { txresp } -start -varnish v2 -arg "-a uds=${tmpdir}/v2.sock,PROXY,mode=666" -vcl { +vinyl v2 -arg "-a uds=${tmpdir}/v2.sock,PROXY,mode=666" -vcl { import dynamic; import std; import proxy; @@ -32,7 +32,7 @@ varnish v2 -arg "-a uds=${tmpdir}/v2.sock,PROXY,mode=666" -vcl { } } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .path = "${tmpdir}/v2.sock"; } @@ -74,9 +74,9 @@ client c1 { expect resp.http.Authority == "localhost" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .path = "${tmpdir}/v2.sock"; } @@ -110,9 +110,9 @@ client c1 { expect resp.http.Authority == "authority.com" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .path = "${tmpdir}/v2.sock"; } @@ -146,9 +146,9 @@ client c1 { expect resp.http.Authority == "host.com" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .path = "${tmpdir}/v2.sock"; } @@ -182,9 +182,9 @@ client c1 { expect resp.http.Authority == "" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend v2 { .path = "${tmpdir}/v2.sock"; } @@ -221,18 +221,18 @@ client c1 { expect resp.http.Authority == "auth.com" } -run -varnish v1 -cli "vcl.discard vcl1" -varnish v1 -cli "vcl.discard vcl2" -varnish v1 -cli "vcl.discard vcl3" -varnish v1 -cli "vcl.discard vcl4" +vinyl v1 -cli "vcl.discard vcl1" +vinyl v1 -cli "vcl.discard vcl2" +vinyl v1 -cli "vcl.discard vcl3" +vinyl v1 -cli "vcl.discard vcl4" -varnish v1 -expect VBE.vcl5.d1.localhost(${s1_addr}:${s1_port}/auth.com).req == 1 -varnish v1 -cliok "backend.list -p" +vinyl v1 -expect VBE.vcl5.d1.localhost(${s1_addr}:${s1_port}/auth.com).req == 1 +vinyl v1 -cliok "backend.list -p" # give vcls time to cool delay 3 -varnish v1 -expect MAIN.n_backend == 4 +vinyl v1 -expect MAIN.n_backend == 4 -varnish v3 -proto PROXY -vcl+backend { +vinyl v3 -proto PROXY -vcl+backend { import std; import proxy; @@ -245,7 +245,7 @@ varnish v3 -proto PROXY -vcl+backend { } } -start -varnish v1 -vcl { +vinyl v1 -vcl { import dynamic; backend b None; @@ -274,10 +274,10 @@ client c1 -connect ${v1_sock} { expect resp.http.Authority == "" } -run -varnish v1 -cliok "backend.list -p" +vinyl v1 -cliok "backend.list -p" # vtc diag only -shell "varnishstat -1 -n ${v1_name} -f VBE.*" +shell "vinylstat -1 -n ${v1_name} -f VBE.*" -varnish v1 -expect LCK.dynamic.director.creat > 0 -varnish v1 -expect LCK.dynamic.backend.creat > 0 +vinyl v1 -expect LCK.dynamic.director.creat > 0 +vinyl v1 -expect LCK.dynamic.backend.creat > 0