-hdr "Foobar: _barf_" \
-hdr "Connection: close" \
-body "012345\n"
-}
+} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
}
} -start
-server s1 -start
-
client c1 {
txreq -url "/"
rxresp
expect resp.http.snafu5 == "_barffra\p_"
# NB: have to escape the \\ in the next line
expect resp.http.snafu6 == "_f&rap\\_"
-}
-
-client c1 -run
+} -run
#
# $Id$
-test "Check that multiple thread pools all get started"
-
-varnish v1 -arg "-b 127.0.0.1:9080 -p thread_pools=9" -start
+test "Check that all thread pools all get started and get minimum threads"
server s1 {
rxreq
txresp -hdr "Connection: close" -body "012345\n"
-}
+} -start
+
+varnish v1 -arg "-p thread_pool_min=2 -p thread_pools=4" -vcl+backend {} -start
-server s1 -start
+delay 1
+varnish v1 -expect n_wrk_create == 8
client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
-}
-
-client c1 -run
-
-server s1 -wait
+} -run
-varnish v1 -stop
#
# $Id$
-test "Check that we start if one listen address works"
-
-varnish v1 -accept ":9081 127.0.0.2:9082" -arg "-b 127.0.0.1:9080" -start
+test "Check that we start if at least one listen address works"
server s1 {
rxreq
txresp -hdr "Connection: close" -body "012345\n"
} -start
+varnish v1 -cliok "param.set listen_address 127.0.0.2:9082"
+varnish v1 -vcl+backend {} -clierr 300 start
+varnish v1 -cliok "param.set listen_address :9081,127.0.0.2:9082"
+varnish v1 -start
+
client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
} -run
-
-server s1 -wait
-
-varnish v1 -stop
expect resp.http.X-Varnish == "1005 1001"
expect resp.http.snafu == "1"
-}
-
-client c1 -run
+} -run
# $Id$
-test "Test simple ACL (May fail on Linux)"
+test "Test simple ACL"
server s1 {
rxreq
txreq -url "foo"
rxresp
expect resp.status == 200
-}
-
-client c1 -run
+} -run
varnish v1 -vcl+backend {
acl acl1 {
exit (1);
}
- c->connect = ":9081";
+ c->connect = "127.0.0.1:9081";
VTAILQ_INSERT_TAIL(&clients, c, list);
return (c);
}
}
v->args = "";
- v->telnet = ":9001";
- v->accept = ":9081";
+ v->telnet = "127.0.0.1:9001";
+ v->accept = "127.0.0.1:9081";
v->cli_fd = -1;
VTAILQ_INSERT_TAIL(&varnishes, v, list);
return (v);
vsb = vsb_newauto();
AN(vsb);
vsb_printf(vsb, "cd ../varnishd &&");
- vsb_printf(vsb, " ./varnishd -d -d -n %s", v->name);
+ vsb_printf(vsb, " ./varnishd -d -d -n /tmp/__%s", v->name);
vsb_printf(vsb, " -a '%s' -T %s", v->accept, v->telnet);
vsb_printf(vsb, " %s", v->args);
vsb_finish(vsb);
}
vtc_log(v->vl, 3, "CLI connection fd = %d", v->cli_fd);
assert(v->cli_fd >= 0);
- v->stats = VSL_OpenStats(v->name);
-
+ vsb = vsb_newauto();
+ vsb_printf(vsb, "/tmp/__%s", v->name);
+ vsb_finish(vsb);
+ AZ(vsb_overflowed(vsb));
+ v->stats = VSL_OpenStats(vsb_data(vsb));
+ vsb_delete(vsb);
}
/**********************************************************************