summaryrefslogtreecommitdiff
path: root/lib/tdb/test
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-06-22 15:07:44 +0930
committerRusty Russell <rusty@rustcorp.com.au>2012-06-22 09:22:28 +0200
commit3c4263e7580143c69225729f5b67f09c00add2fd (patch)
tree4ed548450a427b62007c7201c163f9ccf60bc606 /lib/tdb/test
parent1783fe34433f9bb4b939de3231a7c296390ec426 (diff)
downloadsamba-3c4263e7580143c69225729f5b67f09c00add2fd.tar.gz
samba-3c4263e7580143c69225729f5b67f09c00add2fd.tar.bz2
samba-3c4263e7580143c69225729f5b67f09c00add2fd.zip
tdb: don't use err.h in tests.
It's not portable. While we could use ccan/err, it seems overkill since we actually only use it in one test (I obviously cut & paste the #include). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Fri Jun 22 09:22:28 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib/tdb/test')
-rw-r--r--lib/tdb/test/external-agent.c3
-rw-r--r--lib/tdb/test/run-3G-file.c1
-rw-r--r--lib/tdb/test/run-bad-tdb-header.c1
-rw-r--r--lib/tdb/test/run-check.c1
-rw-r--r--lib/tdb/test/run-corrupt.c1
-rw-r--r--lib/tdb/test/run-die-during-transaction.c1
-rw-r--r--lib/tdb/test/run-endian.c1
-rw-r--r--lib/tdb/test/run-incompatible.c1
-rw-r--r--lib/tdb/test/run-nested-transactions.c1
-rw-r--r--lib/tdb/test/run-nested-traverse.c1
-rw-r--r--lib/tdb/test/run-no-lock-during-traverse.c1
-rw-r--r--lib/tdb/test/run-oldhash.c1
-rw-r--r--lib/tdb/test/run-open-during-transaction.c1
-rw-r--r--lib/tdb/test/run-readonly-check.c1
-rw-r--r--lib/tdb/test/run-rwlock-check.c1
-rw-r--r--lib/tdb/test/run-summary.c1
-rw-r--r--lib/tdb/test/run-transaction-expand.c1
-rw-r--r--lib/tdb/test/run-traverse-in-transaction.c1
-rw-r--r--lib/tdb/test/run-wronghash-fail.c1
-rw-r--r--lib/tdb/test/run-zero-append.c1
-rw-r--r--lib/tdb/test/run.c1
21 files changed, 1 insertions, 22 deletions
diff --git a/lib/tdb/test/external-agent.c b/lib/tdb/test/external-agent.c
index d3fe8913fa..139de76f9a 100644
--- a/lib/tdb/test/external-agent.c
+++ b/lib/tdb/test/external-agent.c
@@ -4,7 +4,6 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
-#include <err.h>
#include <fcntl.h>
#include <stdlib.h>
#include <limits.h>
@@ -138,7 +137,7 @@ struct agent *prepare_external_agent(void)
result = do_operation(name[0], name+1);
if (write(response[1], &result, sizeof(result))
!= sizeof(result))
- err(1, "Writing response");
+ abort();
}
exit(0);
}
diff --git a/lib/tdb/test/run-3G-file.c b/lib/tdb/test/run-3G-file.c
index 3b4e45739a..3ee9de15ed 100644
--- a/lib/tdb/test/run-3G-file.c
+++ b/lib/tdb/test/run-3G-file.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
static int tdb_expand_file_sparse(struct tdb_context *tdb,
diff --git a/lib/tdb/test/run-bad-tdb-header.c b/lib/tdb/test/run-bad-tdb-header.c
index 9dbb6225c9..b00fb8934a 100644
--- a/lib/tdb/test/run-bad-tdb-header.c
+++ b/lib/tdb/test/run-bad-tdb-header.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run-check.c b/lib/tdb/test/run-check.c
index 455731db94..05f7aecd08 100644
--- a/lib/tdb/test/run-check.c
+++ b/lib/tdb/test/run-check.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run-corrupt.c b/lib/tdb/test/run-corrupt.c
index 5d86e71498..584f789bf8 100644
--- a/lib/tdb/test/run-corrupt.c
+++ b/lib/tdb/test/run-corrupt.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
static int check(TDB_DATA key, TDB_DATA data, void *private)
diff --git a/lib/tdb/test/run-die-during-transaction.c b/lib/tdb/test/run-die-during-transaction.c
index ae7dafcfac..19c9dbebf9 100644
--- a/lib/tdb/test/run-die-during-transaction.c
+++ b/lib/tdb/test/run-die-during-transaction.c
@@ -23,7 +23,6 @@ static int ftruncate_check(int fd, off_t length);
#include <stdlib.h>
#include <stdbool.h>
#include <stdarg.h>
-#include <err.h>
#include <setjmp.h>
#include "external-agent.h"
#include "logging.h"
diff --git a/lib/tdb/test/run-endian.c b/lib/tdb/test/run-endian.c
index bf6e71389f..b19ffd373f 100644
--- a/lib/tdb/test/run-endian.c
+++ b/lib/tdb/test/run-endian.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run-incompatible.c b/lib/tdb/test/run-incompatible.c
index 6097026b49..628927c886 100644
--- a/lib/tdb/test/run-incompatible.c
+++ b/lib/tdb/test/run-incompatible.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
static unsigned int tdb_dumb_hash(TDB_DATA *key)
{
diff --git a/lib/tdb/test/run-nested-transactions.c b/lib/tdb/test/run-nested-transactions.c
index 45bc56338d..8c84bcac83 100644
--- a/lib/tdb/test/run-nested-transactions.c
+++ b/lib/tdb/test/run-nested-transactions.c
@@ -12,7 +12,6 @@
#include "tap-interface.h"
#include <stdlib.h>
#include <stdbool.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run-nested-traverse.c b/lib/tdb/test/run-nested-traverse.c
index 83efd0d8ca..86f2913455 100644
--- a/lib/tdb/test/run-nested-traverse.c
+++ b/lib/tdb/test/run-nested-traverse.c
@@ -15,7 +15,6 @@
#undef fcntl
#include <stdlib.h>
#include <stdbool.h>
-#include <err.h>
#include "external-agent.h"
#include "logging.h"
diff --git a/lib/tdb/test/run-no-lock-during-traverse.c b/lib/tdb/test/run-no-lock-during-traverse.c
index 25d9d784bf..0a72282eb6 100644
--- a/lib/tdb/test/run-no-lock-during-traverse.c
+++ b/lib/tdb/test/run-no-lock-during-traverse.c
@@ -15,7 +15,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
#undef fcntl
diff --git a/lib/tdb/test/run-oldhash.c b/lib/tdb/test/run-oldhash.c
index 22c6d13c17..535336cb47 100644
--- a/lib/tdb/test/run-oldhash.c
+++ b/lib/tdb/test/run-oldhash.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run-open-during-transaction.c b/lib/tdb/test/run-open-during-transaction.c
index f4a00525d8..d46b216ccd 100644
--- a/lib/tdb/test/run-open-during-transaction.c
+++ b/lib/tdb/test/run-open-during-transaction.c
@@ -24,7 +24,6 @@ static int ftruncate_check(int fd, off_t length);
#include <stdlib.h>
#include <stdbool.h>
#include <stdarg.h>
-#include <err.h>
#include "external-agent.h"
#include "logging.h"
diff --git a/lib/tdb/test/run-readonly-check.c b/lib/tdb/test/run-readonly-check.c
index b4b85fb7c7..fdd9507cda 100644
--- a/lib/tdb/test/run-readonly-check.c
+++ b/lib/tdb/test/run-readonly-check.c
@@ -13,7 +13,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run-rwlock-check.c b/lib/tdb/test/run-rwlock-check.c
index d7a86cd2c9..8b8072db1e 100644
--- a/lib/tdb/test/run-rwlock-check.c
+++ b/lib/tdb/test/run-rwlock-check.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
static void log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...)
{
diff --git a/lib/tdb/test/run-summary.c b/lib/tdb/test/run-summary.c
index 089338ce9c..22312843e7 100644
--- a/lib/tdb/test/run-summary.c
+++ b/lib/tdb/test/run-summary.c
@@ -12,7 +12,6 @@
#include "../common/summary.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
int main(int argc, char *argv[])
{
diff --git a/lib/tdb/test/run-transaction-expand.c b/lib/tdb/test/run-transaction-expand.c
index bc22d2b53e..7f7b3fc129 100644
--- a/lib/tdb/test/run-transaction-expand.c
+++ b/lib/tdb/test/run-transaction-expand.c
@@ -39,7 +39,6 @@ static inline int fake_fdatasync(int fd)
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
static void write_record(struct tdb_context *tdb, size_t extra_len,
diff --git a/lib/tdb/test/run-traverse-in-transaction.c b/lib/tdb/test/run-traverse-in-transaction.c
index d8455176a2..7813a6ce9a 100644
--- a/lib/tdb/test/run-traverse-in-transaction.c
+++ b/lib/tdb/test/run-traverse-in-transaction.c
@@ -15,7 +15,6 @@
#undef fcntl_with_lockcheck
#include <stdlib.h>
#include <stdbool.h>
-#include <err.h>
#include "external-agent.h"
#include "logging.h"
diff --git a/lib/tdb/test/run-wronghash-fail.c b/lib/tdb/test/run-wronghash-fail.c
index e37aafdd9e..74bbc30ba6 100644
--- a/lib/tdb/test/run-wronghash-fail.c
+++ b/lib/tdb/test/run-wronghash-fail.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
static void log_fn(struct tdb_context *tdb, enum tdb_debug_level level, const char *fmt, ...)
{
diff --git a/lib/tdb/test/run-zero-append.c b/lib/tdb/test/run-zero-append.c
index 0ef30737ba..36bf6990f5 100644
--- a/lib/tdb/test/run-zero-append.c
+++ b/lib/tdb/test/run-zero-append.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])
diff --git a/lib/tdb/test/run.c b/lib/tdb/test/run.c
index 89e55b7f65..f49e85055e 100644
--- a/lib/tdb/test/run.c
+++ b/lib/tdb/test/run.c
@@ -11,7 +11,6 @@
#include "../common/hash.c"
#include "tap-interface.h"
#include <stdlib.h>
-#include <err.h>
#include "logging.h"
int main(int argc, char *argv[])