r3921 - in trunk/varnish-cache/bin/varnishtest: . tests
phk at projects.linpro.no
phk at projects.linpro.no
Thu Mar 12 14:06:01 CET 2009
Author: phk
Date: 2009-03-12 14:06:01 +0100 (Thu, 12 Mar 2009)
New Revision: 3921
Modified:
trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc
trunk/varnish-cache/bin/varnishtest/vtc.c
trunk/varnish-cache/bin/varnishtest/vtc_server.c
Log:
Mode diddling with error handling.
Fix a problem in testcase c00013
Modified: trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc 2009-03-12 12:14:45 UTC (rev 3920)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00013.vtc 2009-03-12 13:06:01 UTC (rev 3921)
@@ -28,4 +28,6 @@
expect resp.status == 200
expect resp.http.content-length == 12
expect resp.http.x-varnish == "1002 1001"
-} -start
+} -run
+
+client c1 -wait
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2009-03-12 12:14:45 UTC (rev 3920)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2009-03-12 13:06:01 UTC (rev 3921)
@@ -351,6 +351,7 @@
exec_file(const char *fn, struct vtclog *vl)
{
char *buf;
+ unsigned old_err;
vtc_stop = 0;
vtc_file = fn;
@@ -361,8 +362,11 @@
vtc_log(vl, 0, "Cannot read file '%s': %s",
fn, strerror(errno));
parse_string(buf, cmds, NULL, vl);
+ old_err = vtc_error;
+ vtc_stop = 1;
vtc_log(vl, 1, "RESETTING after %s", fn);
reset_cmds(cmds);
+ vtc_error = old_err;
if (vtc_error)
vtc_log(vl, 1, "TEST %s FAILED", fn);
else
Modified: trunk/varnish-cache/bin/varnishtest/vtc_server.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_server.c 2009-03-12 12:14:45 UTC (rev 3920)
+++ trunk/varnish-cache/bin/varnishtest/vtc_server.c 2009-03-12 13:06:01 UTC (rev 3921)
@@ -189,7 +189,7 @@
CHECK_OBJ_NOTNULL(s, SERVER_MAGIC);
vtc_log(s->vl, 2, "Waiting for server");
AZ(pthread_join(s->tp, &res));
- if (res != NULL)
+ if (res != NULL && !vtc_stop)
vtc_log(s->vl, 0, "Server returned \"%p\"",
(char *)res);
s->tp = 0;
More information about the varnish-commit
mailing list