r4499 - in trunk/varnish-cache/bin/varnishtest: . tests
phk at projects.linpro.no
phk at projects.linpro.no
Wed Jan 27 22:45:53 CET 2010
Author: phk
Date: 2010-01-27 22:45:52 +0100 (Wed, 27 Jan 2010)
New Revision: 4499
Modified:
trunk/varnish-cache/bin/varnishtest/tests/b00008.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00015.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00016.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00017.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc
trunk/varnish-cache/bin/varnishtest/tests/c00028.vtc
trunk/varnish-cache/bin/varnishtest/tests/v00002.vtc
trunk/varnish-cache/bin/varnishtest/vtc.c
Log:
Define a macro for "bad_ip", an IP number we cannot bind to.
For now use 255.255.255.254 which is about as illegal as an IP# can
be for TCP purposes.
Use instead of 127.0.0.2, which appearantly Linux allows you to bind to.
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00008.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00008.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00008.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -2,7 +2,7 @@
test "Test CLI help and parameter functions"
-varnish v1 -arg "-b 127.0.0.2:9080"
+varnish v1 -arg "-b ${bad_ip}:9080"
varnish v1 -cliok "help"
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00015.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00015.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00015.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -6,7 +6,7 @@
varnish v1 -vcl {
backend foo {
- .host = "127.0.0.2"; .port = "9080";
+ .host = "${bad_ip}"; .port = "9080";
}
} -start
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00016.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00016.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00016.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -4,7 +4,7 @@
varnish v1 -vcl {
backend foo {
- .host = "127.0.0.2"; .port = "9080";
+ .host = "${bad_ip}"; .port = "9080";
}
sub vcl_recv {
@@ -26,7 +26,7 @@
director bar random {
{
.backend = {
- .host = "127.0.0.2"; .port = "9080";
+ .host = "${bad_ip}"; .port = "9080";
}
.weight = 1;
}
@@ -50,7 +50,7 @@
varnish v1 -vcl {
director baz round-robin {
{ .backend = {
- .host = "127.0.0.2"; .port = "9080";
+ .host = "${bad_ip}"; .port = "9080";
} }
}
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00017.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00017.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00017.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -4,7 +4,7 @@
varnish v1 -vcl {
backend foo {
- .host = "127.0.0.2"; .port = "9080";
+ .host = "${bad_ip}"; .port = "9080";
}
sub vcl_recv {
error 888;
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00003.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -9,11 +9,9 @@
txresp -hdr "Connection: close" -body "012345\n"
} -start
-# 198.18.1.1 is IANA-reserved for Network Interconnect Device
-# Benchmark Testing
-varnish v1 -cliok "param.set listen_address 127.0.0.2:0"
+varnish v1 -cliok "param.set listen_address ${bad_ip}:0"
varnish v1 -vcl+backend {} -clierr 300 start
-varnish v1 -cliok "param.set listen_address 127.0.0.1:0,127.0.0.2:9082"
+varnish v1 -cliok "param.set listen_address 127.0.0.1:0,${bad_ip}:9082"
varnish v1 -start
client c1 {
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00028.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00028.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00028.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -4,7 +4,7 @@
varnish v1 -vcl {
backend bad {
- .host = "127.0.0.2"; .port = "9090";
+ .host = "${bad_ip}"; .port = "9090";
}
sub vcl_recv {
Modified: trunk/varnish-cache/bin/varnishtest/tests/v00002.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/v00002.vtc 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/tests/v00002.vtc 2010-01-27 21:45:52 UTC (rev 4499)
@@ -59,7 +59,7 @@
# Check backend reference by name
varnish v1 -badvcl {
- backend b1 { .host = "127.0.0.2"; }
+ backend b1 { .host = "${bad_ip}"; }
director r1 random {
{ .weight = 1; .backend = b1; }
{ .weight = 1; .backend = { .host = "127.0.0.3"; } }
@@ -69,18 +69,18 @@
# Check backend reference by name
varnish v1 -badvcl {
- backend b1 { .host = "127.0.0.2"; }
+ backend b1 { .host = "${bad_ip}"; }
backend b2 b1;
}
# Check backend reference by non-C-compat name
varnish v1 -badvcl {
- backend b-1 { .host = "127.0.0.2"; }
+ backend b-1 { .host = "${bad_ip}"; }
}
# Check backend reference by non-C-compat name
varnish v1 -badvcl {
- backend b1 { .host = "127.0.0.2"; }
+ backend b1 { .host = "${bad_ip}"; }
sub vcl_recv {
set req.backend = b-1;
}
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2010-01-27 21:40:09 UTC (rev 4498)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2010-01-27 21:45:52 UTC (rev 4499)
@@ -561,6 +561,8 @@
AZ(mkdir(vtc_tmpdir, 0700));
macro_def(vl, NULL, "tmpdir", vtc_tmpdir);
vtc_thread = pthread_self();
+
+ macro_def(vl, NULL, "bad_ip", "255.255.255.254");
tmax = 0;
nmax = NULL;
t00 = TIM_mono();
More information about the varnish-commit
mailing list