Commit 80a430fe authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Mode diddling with error handling.

Fix a problem in testcase c00013



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3921 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 2e5c808d
......@@ -28,4 +28,6 @@ client c2 {
expect resp.status == 200
expect resp.http.content-length == 12
expect resp.http.x-varnish == "1002 1001"
} -start
} -run
client c1 -wait
......@@ -351,6 +351,7 @@ static void
exec_file(const char *fn, struct vtclog *vl)
{
char *buf;
unsigned old_err;
vtc_stop = 0;
vtc_file = fn;
......@@ -361,8 +362,11 @@ exec_file(const char *fn, struct vtclog *vl)
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
......
......@@ -189,7 +189,7 @@ server_wait(struct server *s)
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;
......
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