[PATCH] Teach vmod-debug how to sync with varnishtest

Dridi Boukelmoune dridi at varni.sh
Thu Dec 24 10:56:11 CET 2015


Hi,

As discussed in Rotterdam, and in Dag's thread on IPC semaphores,
we need to sync varnishtest with varnishd. This patch set retires
varnishtest semaphores and introduce barriers instead. The main
difference is that barriers are not cyclic by default, and separate
the initialization from actual syncing. I kept Dag's test case, it was
more interesting than mine.

The syntax looks like this:

> # initialization
> barrier b1 cond 2
> barrier b2 sock 2
>
> # usage in varnishtest, you don't "sync N" anymore
> barrier b1 sync
>
> # usage in VCL
> debug.barrier_sync("${b2_sock}");

I see two choices I made that could be controversial:
- a sock barrier doesn't keep track of incoming connections
- debug.barrier_sync won't work in vcl_(init|fini) {}

Thoughts?

Happy syncing,
Dridi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Introduce-barriers-in-varnishtest.patch
Type: text/x-patch
Size: 10226 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151224/b47545a0/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Barriers-can-be-cyclic-but-not-like-semaphores.patch
Type: text/x-patch
Size: 3635 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151224/b47545a0/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Retire-varnishtest-semaphores-and-use-barriers.patch
Type: text/x-patch
Size: 37832 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151224/b47545a0/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Barriers-can-only-be-created-on-the-top-thread.patch
Type: text/x-patch
Size: 928 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151224/b47545a0/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Implement-socket-barriers-shared-between-processes.patch
Type: text/x-patch
Size: 7965 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151224/b47545a0/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-Teach-vmod-debug-how-to-sync-with-varnishtest.patch
Type: text/x-patch
Size: 3008 bytes
Desc: not available
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20151224/b47545a0/attachment-0011.bin>


More information about the varnish-dev mailing list