Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Dev

[PATCH] varnishlog functionality in varnishtest

 

 

Varnish dev RSS feed   Index | Next | Previous | View Threaded


varnish at bsdchicks

Aug 29, 2011, 4:34 PM

Post #1 of 1 (173 views)
Permalink
[PATCH] varnishlog functionality in varnishtest

A while in the making, but 2 full rewrites later, here it is.

Please be sure to apply
https://www.varnish-cache.org/trac/attachment/ticket/995/995.patch as
well, or there's a good chance you'll get errors during "make check".

What this adds:

- When given a second -v, varnishlog output is added to the overall test
log.

- The varnish component gets a -logexpecttag action. It takes 2 arguments,
a number (0+) and a VSL tag. It will see how many of said tag have passed
by since the child was started, and match it with the number.

- And it gets a -logexpectregex action. Again 2 arguments, a number
(0+) and a regex. The regex is matched with the contents of the loglines,
just like varnishlog et al do.

Do give the varnishd a smidgen of time to write to the VSL before doing
your expects. How much is a bit of an inexact science, but 0.2 has been
working for me. (See a00012.vtc)

Any comments are welcome, as are suggestions for better alternatives to
-logexpect(tag|regex). They're a bit horrible in length.

Also, I'm tempted to scrap the second verbosity level and always include
VSL in the test log. Opinions on that?

Cheers,

Doc
Attachments: varnishlogtest3.patch (10.8 KB)

Varnish dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.