Commit d3c558ab authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Try to unbreak, or at least diagnose the tinderbox



git-svn-id: http://www.varnish-cache.org/svn/trunk@4510 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5ce333aa
......@@ -53,8 +53,8 @@ SVNID("$Id$")
#define MAX_FILESIZE (1024 * 1024)
#define MAX_TOKENS 200
const char *vtc_file;
char *vtc_desc;
static const char *vtc_file;
static char *vtc_desc;
int vtc_error; /* Error encountered */
int vtc_stop; /* Stops current test without error */
pthread_t vtc_thread;
......@@ -515,13 +515,18 @@ exec_file(const char *fn, unsigned dur)
AZ(pthread_mutex_lock(&vtc_mtx));
AZ(pthread_create(&pt, NULL, exec_file_thread, &pe));
i = pthread_cond_timedwait(&vtc_cond, &vtc_mtx, &ts);
AZ(pthread_mutex_unlock(&vtc_mtx));
if (i == ETIMEDOUT) {
// AZ(pthread_cancel(pt));
// AZ(pthread_join(pt, &v));
vtc_log(vltop, 1, "Test timed out");
vtc_error = 1;
} else {
} else if (i == 0) {
AZ(pthread_mutex_unlock(&vtc_mtx));
AZ(pthread_join(pt, &v));
} else {
vtc_log(vltop, 1, "Weird return: %d %s", i, strerror(i));
vtc_error = 1;
}
if (vtc_error)
......
......@@ -54,8 +54,6 @@ cmd_f cmd_client;
cmd_f cmd_varnish;
cmd_f cmd_sema;
extern const char *vtc_file;
extern char *vtc_desc;
extern int vtc_verbosity;
extern int vtc_error; /* Error, bail out */
extern int vtc_stop; /* Abandon current test, no error */
......
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