tdb: fixed the intermittent failure of tdbtorture in the build farm
authorAndrew Tridgell <tridge@samba.org>
Mon, 19 Oct 2009 23:59:40 +0000 (10:59 +1100)
committerJeremy Allison <jra@samba.org>
Tue, 20 Oct 2009 00:12:03 +0000 (17:12 -0700)
There was a race condition that caused the torture.tdb to be left in a
state that needed recovery. The torture code thought that any message
from the tdb code was an error, so the "recovered" message, which is a
TDB_DEBUG_TRACE message, marked the run as being an error when it
isn't.

lib/tdb/tools/tdbtorture.c

index c754b817f25071d473504d15eeabc4c6841b23f4..bd5fb201b70f130936f2af4faf9ef9c6c5286dfe 100644 (file)
@@ -36,8 +36,11 @@ static void tdb_log(struct tdb_context *tdb, enum tdb_debug_level level, const c
 static void tdb_log(struct tdb_context *tdb, enum tdb_debug_level level, const char *format, ...)
 {
        va_list ap;
-    
-       error_count++;
+
+       /* trace level messages do not indicate an error */
+       if (level != TDB_DEBUG_TRACE) {
+               error_count++;
+       }
 
        va_start(ap, format);
        vfprintf(stdout, format, ap);