r4744 - trunk/varnish-cache/bin/varnishtest
phk at varnish-cache.org
phk at varnish-cache.org
Wed Apr 28 14:08:04 CEST 2010
Author: phk
Date: 2010-04-28 14:08:04 +0200 (Wed, 28 Apr 2010)
New Revision: 4744
Modified:
trunk/varnish-cache/bin/varnishtest/vtc.c
Log:
Update the "vtc_thread" for each test we run so that error exits
work as expected.
Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c 2010-04-28 11:05:43 UTC (rev 4743)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c 2010-04-28 12:08:04 UTC (rev 4744)
@@ -504,6 +504,7 @@
pe = priv;
+ vtc_thread = pthread_self();
parse_string(pe->buf, cmds, NULL, vltop);
old_err = vtc_error;
vtc_stop = 1;
@@ -544,6 +545,7 @@
AZ(pthread_mutex_lock(&vtc_mtx));
AZ(pthread_create(&pt, NULL, exec_file_thread, &pe));
i = pthread_cond_timedwait(&vtc_cond, &vtc_mtx, &ts);
+ vtc_thread = NULL;
if (i == 0) {
AZ(pthread_mutex_unlock(&vtc_mtx));
@@ -649,7 +651,6 @@
AN(vtc_tmpdir);
AZ(mkdir(vtc_tmpdir, 0700));
macro_def(vltop, NULL, "tmpdir", vtc_tmpdir);
- vtc_thread = pthread_self();
AZ(pthread_mutex_init(&vtc_mtx, NULL));
AZ(pthread_cond_init(&vtc_cond, NULL));
More information about the varnish-commit
mailing list