r4510 - trunk/varnish-cache/bin/varnishtest
phk at projects.linpro.no
phk at projects.linpro.no
Fri Jan 29 10:56:02 CET 2010
Author: phk
Date: 2010-01-29 10:56:01 +0100 (Fri, 29 Jan 2010)
New Revision: 4510
Modified:
trunk/varnish-cache/bin/varnishtest/vtc.c
trunk/varnish-cache/bin/varnishtest/vtc.h
Log:
Try to unbreak, or at least diagnose the tinderbox
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2010-01-28 11:51:09 UTC (rev 4509)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2010-01-29 09:56:01 UTC (rev 4510)
@@ -53,8 +53,8 @@
#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 @@
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 if (i == 0) {
+ AZ(pthread_mutex_unlock(&vtc_mtx));
+ AZ(pthread_join(pt, &v));
} else {
- AZ(pthread_join(pt, &v));
+ vtc_log(vltop, 1, "Weird return: %d %s", i, strerror(i));
+ vtc_error = 1;
}
if (vtc_error)
Modified: trunk/varnish-cache/bin/varnishtest/vtc.h
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.h 2010-01-28 11:51:09 UTC (rev 4509)
+++ trunk/varnish-cache/bin/varnishtest/vtc.h 2010-01-29 09:56:01 UTC (rev 4510)
@@ -54,8 +54,6 @@
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 */
More information about the varnish-commit
mailing list