Author: tridge
Date: 2005-09-24 03:29:50 +0000 (Sat, 24 Sep 2005)
New Revision: 10463

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10463

Log:
consider it an error if tdbtorture produces any log messages




Modified:
   branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c
===================================================================
--- branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c        2005-09-24 
03:28:10 UTC (rev 10462)
+++ branches/SAMBA_4_0/source/lib/tdb/tools/tdbtorture.c        2005-09-24 
03:29:50 UTC (rev 10463)
@@ -50,6 +50,7 @@
 
 static struct tdb_context *db;
 static int in_transaction;
+static int log_count;
 
 #ifdef PRINTF_ATTRIBUTE
 static void tdb_log(struct tdb_context *tdb, int level, const char *format, 
...) PRINTF_ATTRIBUTE(3,4);
@@ -58,6 +59,8 @@
 {
        va_list ap;
     
+       log_count++;
+
        va_start(ap, format);
        vfprintf(stdout, format, ap);
        va_end(ap);
@@ -304,8 +307,14 @@
                                exit(1);
                        }
                }
-               printf("OK\n");
+               if (log_count == 0) {
+                       printf("OK\n");
+               }
        }
 
+       if (log_count != 0) {
+               exit(1);
+       }
+
        return 0;
 }

Reply via email to