Commit 94672e58 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Be much more explicit about localhost.

Force varnish instance into /tmp/__${name}



git-svn-id: http://www.varnish-cache.org/svn/trunk@3053 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2672beaa
......@@ -8,7 +8,7 @@ server s1 {
-hdr "Foobar: _barf_" \
-hdr "Connection: close" \
-body "012345\n"
}
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
......@@ -26,8 +26,6 @@ varnish v1 -vcl+backend {
}
} -start
server s1 -start
client c1 {
txreq -url "/"
rxresp
......@@ -41,6 +39,4 @@ client c1 {
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
......@@ -2,25 +2,21 @@
#
# $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
......@@ -2,21 +2,20 @@
#
# $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
......@@ -49,6 +49,4 @@ client c1 {
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
......@@ -27,9 +27,7 @@ client c1 {
txreq -url "foo"
rxresp
expect resp.status == 200
}
client c1 -run
} -run
varnish v1 -vcl+backend {
acl acl1 {
......
......@@ -112,7 +112,7 @@ client_new(char *name)
exit (1);
}
c->connect = ":9081";
c->connect = "127.0.0.1:9081";
VTAILQ_INSERT_TAIL(&clients, c, list);
return (c);
}
......
......@@ -148,8 +148,8 @@ varnish_new(char *name)
}
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);
......@@ -191,7 +191,7 @@ varnish_launch(struct varnish *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);
......@@ -235,8 +235,12 @@ varnish_launch(struct varnish *v)
}
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);
}
/**********************************************************************
......
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