[PATCH] Automatically expand vmod_* macros in varnishtest

Poul-Henning Kamp phk at phk.freebsd.dk
Thu Feb 18 09:37:49 CET 2016


--------
In message <CABoVN9DY7iLJSnWH9i9kWRfpXmc--=bh+=N-yTjxpm5N984YSg at mail.gmail.com>, Dridi Boukelmoune writes:
>On Thu, Feb 18, 2016 at 12:45 AM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
>> --------
>>
>> I think we decided to change the vcl_dir and vmod_dir parameters to be
>> paths rather than single directories.

Actually, I already implemented that: 3fea94618a7ac2b0f13548ab13794586d4bba4b8

(Insert appropriate joke about old people and bad memory here)

I didn't rename the parameter names from _dir to _path.  Not sure if we
should.

>> If we got that in, we could get totally rid of the ${vmod_*} magic
>
>Would it mean that we'd retire the ${vmod_*} macros in varnishtest and
>the test suite?

yes.

>> instead, and have varnishtest -i set vmod_path apropriately.
>
>We also need a way to set a vmod_path for VMOD writers. Something
>like varnishtest -p /path/to/vmod_dir:$libdir/varnish/vmods when building
>the VMOD.

I think I lean '-m' for vmod_path, that way '-v' could be used
similarly for vcl_path

But now that you mention...

We should use '-p' to set _any_ parameter for the varnishd's
we start in a test.

That would make it trivial to do what Nils and I bantered about
yesterday:  Running the test-cases with varying sizes of workspace,
to see what explodes.

If individual tests rely on certain parameters, they should set
them explictly to document that in the first place.

>varnishtest -i already sets the PATH for the programs, should those
>macros also be retired and leave it to varnishtest users to set an
>appropriate PATH?

No, -i is shortcut for "I'm running in the build-tree" and it should
retain that meaning.

In the new world order, it should append appropriately to vmod_path.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-dev mailing list