r4568 - in trunk/varnish-cache/bin/varnishtest: . tests
phk at projects.linpro.no
phk at projects.linpro.no
Tue Feb 16 22:41:17 CET 2010
Author: phk
Date: 2010-02-16 22:41:17 +0100 (Tue, 16 Feb 2010)
New Revision: 4568
Modified:
trunk/varnish-cache/bin/varnishtest/tests/b00020.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00021.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00023.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00024.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc
trunk/varnish-cache/bin/varnishtest/tests/b00026.vtc
trunk/varnish-cache/bin/varnishtest/vtc.c
Log:
Add a new "feature" command, and skip the test if we don't have
the features listed on the present platform
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00020.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00020.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00020.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check the between_bytes_timeout behaves from parameters"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00021.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00021.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00021.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check the between_bytes_timeout behaves from vcl"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00022.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check the between_bytes_timeout behaves from backend definition"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00023.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00023.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00023.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check that the first_byte_timeout works from parameters"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
delay 1.5
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00024.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00024.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00024.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check that the first_byte_timeout works from vcl"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
delay 1.5
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00025.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check that the first_byte_timeout works from backend definition"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
delay 1.5
Modified: trunk/varnish-cache/bin/varnishtest/tests/b00026.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/b00026.vtc 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/tests/b00026.vtc 2010-02-16 21:41:17 UTC (rev 4568)
@@ -2,6 +2,8 @@
test "Check the precedence for timeouts"
+feature SO_RCVTIMEO_WORKS
+
server s1 {
rxreq
expect req.url == "from_backend"
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2010-02-16 21:21:39 UTC (rev 4567)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2010-02-16 21:41:17 UTC (rev 4568)
@@ -449,6 +449,31 @@
}
/**********************************************************************
+ * Check features.
+ */
+
+static void
+cmd_feature(CMD_ARGS)
+{
+ int i;
+
+ (void)priv;
+ (void)cmd;
+ if (av == NULL)
+ return;
+
+ for (i = 1; av[i] != NULL; i++) {
+#ifdef SO_RCVTIMEO_WORKS
+ if (!strcmp(av[i], "SO_RCVTIMEO_WORKS"))
+ continue;
+#endif
+ vtc_log(vl, 1, "SKIPPING test, missing feature %s", av[i]);
+ vtc_stop = 1;
+ return;
+ }
+}
+
+/**********************************************************************
* Execute a file
*/
@@ -461,6 +486,7 @@
{ "shell", cmd_shell },
{ "sema", cmd_sema },
{ "random", cmd_random },
+ { "feature", cmd_feature },
{ NULL, NULL }
};
More information about the varnish-commit
mailing list