]> err.no Git - varnish/commit
Overhaul the varnishtest program to fix a race condition which might
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 9 Oct 2008 11:39:24 +0000 (11:39 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 9 Oct 2008 11:39:24 +0000 (11:39 +0000)
commite980272498d67ea4d492a3379823c19906dd1ce7
treefae6c39b4190954431f8340697bad7c794f427dd
parentbb061e0cd5c055184054a4cf114cb98441e0d6fa
Overhaul the varnishtest program to fix a race condition which might
(or might not) be the root cause of #346:

The delay function would access the toplevel log element from client/server
contexts with no logging.

Fix by passing the log element to the subcommands.

This race would only affect testcases using delay or sema inside client
or server threads.

Revert test a00008.vtc to use only one sema, using two just moved the
race condition.

This also has the side effect of moving "sema" related messages to
the tread that carries out the "sema" operation.

Various other cleanups now that I had my fingers in the code anyway:
memory leaks plugged, stylistic nits etc.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3272 d4fa192b-c00b-0410-8231-f00ffab90ce4
varnish-cache/bin/varnishtest/flint.lnt
varnish-cache/bin/varnishtest/tests/a00008.vtc
varnish-cache/bin/varnishtest/vtc.c
varnish-cache/bin/varnishtest/vtc.h
varnish-cache/bin/varnishtest/vtc_client.c
varnish-cache/bin/varnishtest/vtc_http.c
varnish-cache/bin/varnishtest/vtc_log.c
varnish-cache/bin/varnishtest/vtc_sema.c
varnish-cache/bin/varnishtest/vtc_server.c
varnish-cache/bin/varnishtest/vtc_varnish.c