summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/tdb/tools/tdbtorture.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c
index 591fdab2f7..3fc395ba98 100644
--- a/source4/lib/tdb/tools/tdbtorture.c
+++ b/source4/lib/tdb/tools/tdbtorture.c
@@ -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 @@ static void tdb_log(struct tdb_context *tdb, int level, const char *format, ...)
{
va_list ap;
+ log_count++;
+
va_start(ap, format);
vfprintf(stdout, format, ap);
va_end(ap);
@@ -304,7 +307,13 @@ static void usage(void)
exit(1);
}
}
- printf("OK\n");
+ if (log_count == 0) {
+ printf("OK\n");
+ }
+ }
+
+ if (log_count != 0) {
+ exit(1);
}
return 0;