summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/tools
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-09-24 03:29:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:49 -0500
commitfbc2dbbb41e1ed5fe1ca778c24fef81f480a2322 (patch)
tree769cf124890dd7c299bafdd70593300a70fadc6e /source4/lib/tdb/tools
parent36cfc9c4acb17ac2a380a36c55cb444eff891db6 (diff)
downloadsamba-fbc2dbbb41e1ed5fe1ca778c24fef81f480a2322.tar.gz
samba-fbc2dbbb41e1ed5fe1ca778c24fef81f480a2322.tar.bz2
samba-fbc2dbbb41e1ed5fe1ca778c24fef81f480a2322.zip
r10463: consider it an error if tdbtorture produces any log messages
(This used to be commit d9ee0e8b59ee52ed1e41865cffe97e32b504e7e7)
Diffstat (limited to 'source4/lib/tdb/tools')
-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;