Commit a8b56df3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a debug option to slow down acceptor threads so that we

can stabilize test c00080.
parent b4a959ac
......@@ -466,6 +466,8 @@ vca_accept_task(struct worker *wrk, void *arg)
TASK_QUEUE_VCA));
return;
}
if (!ps->pool->die && DO_DEBUG(DBG_SLOW_ACCEPTOR))
VTIM_sleep(2.0);
/*
* We were able to hand off, so release this threads VCL
......
......@@ -8,33 +8,19 @@ server s1 {
varnish v1 -vcl+backend {} -start
varnish v1 -cliok "param.set debug +drop_pools"
varnish v1 -cliok "param.set debug +slow_acceptor"
varnish v1 -cliok "param.set thread_pools 1"
delay 2
client c1 {
client c1 -repeat 2 {
txreq
rxresp
} -run
varnish v1 -vsc *poo*
delay 2
client c1 {
txreq
rxresp
} -run
varnish v1 -vsc *poo*
delay 2
client c1 {
txreq
rxresp
} -run
varnish v1 -vsc *thr*
varnish v1 -vsc *poo*
varnish v1 -expect MAIN.pools == 1
......
......@@ -45,6 +45,7 @@ DEBUG_BIT(VTC_MODE, vtc_mode, "Varnishtest Mode")
DEBUG_BIT(WITNESS, witness, "Emit WITNESS lock records")
DEBUG_BIT(VSM_KEEP, vsm_keep, "Keep the VSM file on restart")
DEBUG_BIT(DROP_POOLS, drop_pools, "Drop thread pools (testing)")
DEBUG_BIT(SLOW_ACCEPTOR, slow_acceptor, "Slow down Acceptor")
#undef DEBUG_BIT
/*lint -restore */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment