r3053 - in trunk/varnish-cache/bin/varnishtest: . tests
phk at projects.linpro.no
phk at projects.linpro.no
Fri Aug 1 11:22:22 CEST 2008
Author: phk
Date: 2008-08-01 11:22:21 +0200 (Fri, 01 Aug 2008)
New Revision: 3053
Modified:
trunk/varnish-cache/bin/varnishtest/tests/c00001.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00005.vtc
trunk/varnish-cache/bin/varnishtest/vtc_client.c
trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
Log:
Be much more explicit about localhost.
Force varnish instance into /tmp/__${name}
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00001.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00001.vtc 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00001.vtc 2008-08-01 09:22:21 UTC (rev 3053)
@@ -8,7 +8,7 @@
-hdr "Foobar: _barf_" \
-hdr "Connection: close" \
-body "012345\n"
-}
+} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
@@ -26,8 +26,6 @@
}
} -start
-server s1 -start
-
client c1 {
txreq -url "/"
rxresp
@@ -41,6 +39,4 @@
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
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00002.vtc 2008-08-01 09:22:21 UTC (rev 3053)
@@ -2,25 +2,21 @@
#
# $Id$
-test "Check that multiple thread pools all get started"
+test "Check that all thread pools all get started and get minimum threads"
-varnish v1 -arg "-b 127.0.0.1:9080 -p thread_pools=9" -start
-
server s1 {
rxreq
txresp -hdr "Connection: close" -body "012345\n"
-}
+} -start
-server s1 -start
+varnish v1 -arg "-p thread_pool_min=2 -p thread_pools=4" -vcl+backend {} -start
+delay 1
+varnish v1 -expect n_wrk_create == 8
+
client c1 {
txreq -url "/"
rxresp
expect resp.status == 200
-}
+} -run
-client c1 -run
-
-server s1 -wait
-
-varnish v1 -stop
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc 2008-08-01 09:22:21 UTC (rev 3053)
@@ -2,21 +2,20 @@
#
# $Id$
-test "Check that we start if one listen address works"
+test "Check that we start if at least one listen address works"
-varnish v1 -accept ":9081 127.0.0.2:9082" -arg "-b 127.0.0.1:9080" -start
-
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
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00004.vtc 2008-08-01 09:22:21 UTC (rev 3053)
@@ -49,6 +49,4 @@
expect resp.http.X-Varnish == "1005 1001"
expect resp.http.snafu == "1"
-}
-
-client c1 -run
+} -run
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00005.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00005.vtc 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00005.vtc 2008-08-01 09:22:21 UTC (rev 3053)
@@ -1,6 +1,6 @@
# $Id$
-test "Test simple ACL (May fail on Linux)"
+test "Test simple ACL"
server s1 {
rxreq
@@ -27,10 +27,8 @@
txreq -url "foo"
rxresp
expect resp.status == 200
-}
+} -run
-client c1 -run
-
varnish v1 -vcl+backend {
acl acl1 {
! "localhost";
Modified: trunk/varnish-cache/bin/varnishtest/vtc_client.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_client.c 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/vtc_client.c 2008-08-01 09:22:21 UTC (rev 3053)
@@ -112,7 +112,7 @@
exit (1);
}
- c->connect = ":9081";
+ c->connect = "127.0.0.1:9081";
VTAILQ_INSERT_TAIL(&clients, c, list);
return (c);
}
Modified: trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2008-08-01 08:24:23 UTC (rev 3052)
+++ trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2008-08-01 09:22:21 UTC (rev 3053)
@@ -148,8 +148,8 @@
}
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 @@
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 @@
}
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);
}
/**********************************************************************
More information about the varnish-commit
mailing list