lib/tdb2: adapt unit tests to SAMBA environment.
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 22 Feb 2012 04:33:37 +0000 (15:03 +1030)
committerAmitay Isaacs <amitay@gmail.com>
Wed, 7 Mar 2012 02:16:16 +0000 (13:16 +1100)
This means changing headers, implementing a simple tap-like wrapper,
and also splitting out the helpers into those which are linked with
the api* tests (which can't use non-public tdb2 functions) and those
linked with the run* tests (which can).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
89 files changed:
lib/tdb2/test/api-12-store.c
lib/tdb2/test/api-13-delete.c
lib/tdb2/test/api-14-exists.c
lib/tdb2/test/api-16-wipe_all.c
lib/tdb2/test/api-21-parse_record.c
lib/tdb2/test/api-55-transaction.c
lib/tdb2/test/api-80-tdb_fd.c
lib/tdb2/test/api-81-seqnum.c
lib/tdb2/test/api-82-lockattr.c
lib/tdb2/test/api-83-openhook.c
lib/tdb2/test/api-91-get-stats.c
lib/tdb2/test/api-92-get-set-readonly.c
lib/tdb2/test/api-93-repack.c
lib/tdb2/test/api-add-remove-flags.c
lib/tdb2/test/api-check-callback.c
lib/tdb2/test/api-firstkey-nextkey.c
lib/tdb2/test/api-fork-test.c
lib/tdb2/test/api-locktimeout.c
lib/tdb2/test/api-missing-entries.c
lib/tdb2/test/api-open-multiple-times.c
lib/tdb2/test/api-record-expand.c
lib/tdb2/test/api-simple-delete.c
lib/tdb2/test/api-summary.c
lib/tdb2/test/api-tdb1-flag-removal.c
lib/tdb2/test/external-agent.c
lib/tdb2/test/external-agent.h
lib/tdb2/test/failtest_helper.c
lib/tdb2/test/helpapi-external-agent.c [new file with mode: 0644]
lib/tdb2/test/helprun-external-agent.c [new file with mode: 0644]
lib/tdb2/test/helprun-layout.c [moved from lib/tdb2/test/layout.c with 100% similarity]
lib/tdb2/test/layout.h
lib/tdb2/test/lock-tracking.c
lib/tdb2/test/logging.c
lib/tdb2/test/logging.h
lib/tdb2/test/run-001-encode.c
lib/tdb2/test/run-001-fls.c
lib/tdb2/test/run-01-new_database.c
lib/tdb2/test/run-02-expand.c
lib/tdb2/test/run-03-coalesce.c
lib/tdb2/test/run-04-basichash.c
lib/tdb2/test/run-05-readonly-open.c
lib/tdb2/test/run-10-simple-store.c
lib/tdb2/test/run-11-simple-fetch.c
lib/tdb2/test/run-12-check.c
lib/tdb2/test/run-15-append.c
lib/tdb2/test/run-20-growhash.c
lib/tdb2/test/run-25-hashoverload.c
lib/tdb2/test/run-30-exhaust-before-expand.c
lib/tdb2/test/run-35-convert.c
lib/tdb2/test/run-50-multiple-freelists.c
lib/tdb2/test/run-56-open-during-transaction.c
lib/tdb2/test/run-57-die-during-transaction.c
lib/tdb2/test/run-64-bit-tdb.c
lib/tdb2/test/run-90-get-set-attributes.c
lib/tdb2/test/run-capabilities.c
lib/tdb2/test/run-expand-in-transaction.c
lib/tdb2/test/run-features.c
lib/tdb2/test/run-lockall.c
lib/tdb2/test/run-remap-in-read_traverse.c
lib/tdb2/test/run-seed.c
lib/tdb2/test/run-tdb1-3G-file.c
lib/tdb2/test/run-tdb1-bad-tdb-header.c
lib/tdb2/test/run-tdb1-check.c
lib/tdb2/test/run-tdb1-corrupt.c
lib/tdb2/test/run-tdb1-endian.c
lib/tdb2/test/run-tdb1-hashsize.c
lib/tdb2/test/run-tdb1-incompatible.c
lib/tdb2/test/run-tdb1-nested-transactions.c
lib/tdb2/test/run-tdb1-nested-traverse.c
lib/tdb2/test/run-tdb1-no-lock-during-traverse.c
lib/tdb2/test/run-tdb1-oldhash.c
lib/tdb2/test/run-tdb1-readonly-check.c
lib/tdb2/test/run-tdb1-rwlock-check.c
lib/tdb2/test/run-tdb1-seqnum-wrap.c
lib/tdb2/test/run-tdb1-summary.c
lib/tdb2/test/run-tdb1-traverse-in-transaction.c
lib/tdb2/test/run-tdb1-wronghash-fail.c
lib/tdb2/test/run-tdb1-zero-append.c
lib/tdb2/test/run-tdb1.c
lib/tdb2/test/run-tdb_errorstr.c
lib/tdb2/test/run-tdb_foreach.c
lib/tdb2/test/run-traverse.c
lib/tdb2/test/tap-interface.c [new file with mode: 0644]
lib/tdb2/test/tap-interface.h [new file with mode: 0644]
lib/tdb2/test/tdb1-external-agent.c
lib/tdb2/test/tdb1-external-agent.h
lib/tdb2/test/tdb1-lock-tracking.c
lib/tdb2/test/tdb1-lock-tracking.h
lib/tdb2/test/tdb2-source.h

index ccec53e029ef8d93dcb995436de539bda10a9e28..6a9dd95f5fb8b9bda916751de3cc950c845d14a0 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <ccan/hash/hash.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 0287a6abf93c93217ef0756a1012f0048775d1a5..c8ed58061543f6418c9502694fd26ca5c943f486 100644 (file)
@@ -1,10 +1,10 @@
-#include <ccan/tdb2/private.h> // For TDB_TOPLEVEL_HASH_BITS
+#include "private.h" // For TDB_TOPLEVEL_HASH_BITS
 #include <ccan/hash/hash.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "tdb2.h"
+#include "tap-interface.h"
 #include "logging.h"
 
 /* We rig the hash so adjacent-numbered records always clash. */
index 698006faf4ac946b7b813283d64cbc7fd57d5945..916e9b46f60973338df142ddc52a9cd568268cdc 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index d17eff8e6a8cac343fd584f88f368a571124b7e7..f97dd0db4262cdba4a03382f46c1a0b50046d840 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index def4f456ff7d75ee1cdae8ddebb652f9e4567e83..6ac9543b52ba717a92a02f821c2ae9ef96688f66 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 9c1044b4e10cf5160b1c89daf7bef330f74f3192..ece59d5cb5372076d6a231b0b37c7ece4d95d799 100644 (file)
@@ -1,6 +1,6 @@
-#include <ccan/tdb2/private.h> // struct tdb_context
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "private.h" // struct tdb_context
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 0088f9b74d3121b761dde41cb8d83639e5e8dbe9..fea30979b9232c8f8b53473ce17a75103cac37dc 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index c1eb75170bd69215c704244f0aa9c6f18f2fd25a..954b097b0ffbca488c92a3fe2885221957db8395 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 048feacfa5ed665bb8154aaf98c04ed805f467fb..4a68702fe114e54e8aaeb3503a1a21ae1e33fdc8 100644 (file)
@@ -1,6 +1,6 @@
-#include <ccan/tdb2/private.h> // for tdb_fcntl_unlock
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "private.h" // for tdb_fcntl_unlock
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index e7e94738de9c6609fc2f07152d8322899a4946fc..1ee745f992bdbc1a04bb81a5d1434b45a810d715 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index d9a22ca444eaa81f9c75c683876e00f1e937f29c..f7bc64524dc4e34defcf7968535e894ba862d8a8 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 483b50d7fd8c47c3d3f71ce611244583c74be7e4..eddb0d4fe26f042ae41b73a67384208d14ddc699 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 74a8b5eda218c852ce80f743229f7b09870a59a0..a1b515452473ac3f14072bde52de68e6b1f36778 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 231b9f6cfeef348d110b7c432bd9031f7a8a1409..2526bf45b669387bf73c3b1ebf14e2babead98b1 100644 (file)
@@ -1,6 +1,6 @@
-#include <ccan/tdb2/private.h> // for tdb_context
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "private.h" // for tdb_context
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index fb980f2276bd50ec111056d9c34286d88ee63d4b..e49d00f904894c53b7c540ce81a39a2ebbeeb295 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index e0374d8680c6100df8b0bf2e9774af6b79d3d601..56b3c25fb0ed720a910172111c0689ff95ecbadf 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 6feb618c72104b2765b299fca54f6f1c8103642f..988004e90a2004c0bb7f146ef82772e4636ef37c 100644 (file)
@@ -10,8 +10,9 @@
  * Note that we don't hold a lock across tdb_traverse callbacks, so
  * that doesn't matter.
  */
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 21a26c46fee85d28800298ecca5881dacbf43ad3..2466817a13dc816251a1f8bd7724794026d4dee4 100644 (file)
@@ -1,5 +1,7 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
+#include "system/wait.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h>
index 0b21e1ee0f854564a0202b1341a4e5e93fb6edab..c81839bc054df055bd61017821ecb7f59d2c6c74 100644 (file)
@@ -1,7 +1,8 @@
 /* Another test revealed that we lost an entry.  This reproduces it. */
-#include <ccan/tdb2/tdb2.h>
+#include "config.h"
+#include "tdb2.h"
 #include <ccan/hash/hash.h>
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 16562069dc3ce3dccc3134e56f3df72597c5a30b..f976c954039055119de7952c283a7037bbe93865 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 48ad1cdf22d100bfddeeaff348a6093c3a0b4dbc..686dcf3267b6384ca4f218ab93d386ec42aa5b1b 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index a5b65d605e9c2e37c7feb9b184e4ee2b341662ba..bd228d654e013822862a3bcd6d86838f87f7ed9a 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index e0e292ea397b3edcb3e3d7a8bb835c93c55fc896..babccc7cf4a70779f1c154e59407c17cbd9a7357 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
index 28f24e63880f5804eb091df59ca8d73116a36ae7..59994dfa5c5ffb2223921b11794efbe94816aa57 100644 (file)
@@ -1,5 +1,6 @@
-#include <ccan/tdb2/tdb2.h>
-#include <ccan/tap/tap.h>
+#include "config.h"
+#include "tdb2.h"
+#include "tap-interface.h"
 #include <ccan/hash/hash.h>
 #include <sys/types.h>
 #include <sys/stat.h>
index 01c7106fba103892cedf0ec685745d382788c6fc..9d50e8fa85a555abd42ead5dbdb0311a485717e5 100644 (file)
@@ -10,8 +10,7 @@
 #include <limits.h>
 #include <string.h>
 #include <errno.h>
-#include <ccan/tdb2/tdb1_private.h>
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdio.h>
 #include <stdarg.h>
 
@@ -65,7 +64,7 @@ static enum agent_return do_operation(enum operation op, const char *name)
        switch (op) {
        case OPEN:
                if (tdb) {
-                       diag("Already have tdb %s open", tdb->name);
+                       diag("Already have tdb %s open", tdb_name(tdb));
                        return OTHER_FAILURE;
                }
                tdb = tdb_open(name, TDB_DEFAULT, O_RDWR, 0, &tap_log_attr);
@@ -79,7 +78,7 @@ static enum agent_return do_operation(enum operation op, const char *name)
                break;
        case OPEN_WITH_HOOK:
                if (tdb) {
-                       diag("Already have tdb %s open", tdb->name);
+                       diag("Already have tdb %s open", tdb_name(tdb));
                        return OTHER_FAILURE;
                }
                cif.openhook.base.attr = TDB_ATTRIBUTE_OPENHOOK;
@@ -118,10 +117,7 @@ static enum agent_return do_operation(enum operation op, const char *name)
                ret = tdb_transaction_commit(tdb)==0 ? SUCCESS : OTHER_FAILURE;
                break;
        case NEEDS_RECOVERY:
-               if (tdb->flags & TDB_VERSION1)
-                       ret = tdb1_needs_recovery(tdb) ? SUCCESS : FAILED;
-               else
-                       ret = tdb_needs_recovery(tdb) ? SUCCESS : FAILED;
+               ret = external_agent_needs_rec(tdb);
                break;
        case CHECK:
                ret = tdb_check(tdb, NULL, NULL) == 0 ? SUCCESS : OTHER_FAILURE;
index cf9789b6694622af58528d3bf5be680be497ea34..c4cd2b148d0f5a4fd293a8ba6b3d1d54f90c907f 100644 (file)
@@ -36,11 +36,16 @@ enum agent_return external_agent_operation(struct agent *handle,
                                           const char *name);
 
 /* Hook into free() on tdb_data in external agent. */
-void (*external_agent_free)(void *);
+extern void (*external_agent_free)(void *);
 
 /* Mapping enum -> string. */
 const char *agent_return_name(enum agent_return ret);
 const char *operation_name(enum operation op);
 
 void free_external_agent(struct agent *agent);
+
+/* Internal use: */
+struct tdb_context;
+enum agent_return external_agent_needs_rec(struct tdb_context *tdb);
+
 #endif /* TDB2_TEST_EXTERNAL_AGENT_H */
index ab79de1978c5d80291426dfa565b7a544b8cf48b..386f1c2379279cdd65ebe200fcd01cee73fcfb0d 100644 (file)
@@ -1,7 +1,7 @@
 #include "failtest_helper.h"
 #include "logging.h"
 #include <string.h>
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 
 bool failtest_suppress = false;
 
diff --git a/lib/tdb2/test/helpapi-external-agent.c b/lib/tdb2/test/helpapi-external-agent.c
new file mode 100644 (file)
index 0000000..140ffaf
--- /dev/null
@@ -0,0 +1,8 @@
+#include "external-agent.h"
+#include "tdb1_private.h"
+
+/* This isn't possible with via the tdb2 API, but this makes it link. */
+enum agent_return external_agent_needs_rec(struct tdb_context *tdb)
+{
+       return FAILED;
+}
diff --git a/lib/tdb2/test/helprun-external-agent.c b/lib/tdb2/test/helprun-external-agent.c
new file mode 100644 (file)
index 0000000..469847b
--- /dev/null
@@ -0,0 +1,10 @@
+#include "external-agent.h"
+#include "tdb1_private.h"
+
+enum agent_return external_agent_needs_rec(struct tdb_context *tdb)
+{
+       if (tdb->flags & TDB_VERSION1)
+               return tdb1_needs_recovery(tdb) ? SUCCESS : FAILED;
+       else
+               return tdb_needs_recovery(tdb) ? SUCCESS : FAILED;
+}
index 9a7148460152bf6e36bf7e9ab786027a6f7203bd..3aadf20ee21132842e27778b57f728382b734fc4 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef TDB2_TEST_LAYOUT_H
 #define TDB2_TEST_LAYOUT_H
-#include <ccan/tdb2/private.h>
+#include "private.h"
 
 struct tdb_layout *new_tdb_layout(void);
 void tdb_layout_add_freetable(struct tdb_layout *layout);
index e253db9f710e6860ef2c4d7758daa5e010693a71..4a61f9c31257aed2feb0a7e4ababdcb4714af567 100644 (file)
@@ -1,10 +1,10 @@
 /* We save the locks so we can reaquire them. */
-#include <ccan/tdb2/tdb1_private.h>
+#include "tdb1_private.h" /* For TDB_HASH_LOCK_START, TDB1_FREELIST_TOP, etc. */
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stdlib.h>
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "lock-tracking.h"
 
 struct lock {
index 6927592b8a26cc06384b11a5accaa80fe65f234e..86fc152bab309d03abafed6bc86e0c1f142d3398 100644 (file)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <stdlib.h>
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 unsigned tap_log_messages;
index 2dfea145c3370a8dc046448a65ee46774b150a70..5f517dc592601c30cec1e4848a2af3cc438fea71 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef TDB2_TEST_LOGGING_H
 #define TDB2_TEST_LOGGING_H
-#include <ccan/tdb2/tdb2.h>
+#include "tdb2.h"
 #include <stdbool.h>
 #include <string.h>
 
index 67616fcd9f72a63c6e897b059b186b1d2c5d75eb..9657eb79d005942bc2abc8e6c1553c7ffbdbb65e 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 int main(int argc, char *argv[])
index 4449f69d856ee1e73878356e754af25da7256aec..792adbf655331313af45d2912abcde7ff58b4439 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 
 static unsigned int dumb_fls(uint64_t num)
 {
index e08e3201e657de5cae636967c4029b1e33ee6164..2876868842ec25f9ec37913c7180cae4f16b98a7 100644 (file)
@@ -1,6 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index dacf5f2194557d74291603467b46519512b08727..fd1ae4be34661311c3386fef06cc4b612c5eb7c7 100644 (file)
@@ -1,6 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index 99f94fe16da88e6b856ec5707b8ecdc4e3a85982..ad39719bcbd965eb51eca130d04056d233586cc8 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 #include "layout.h"
 
index 3bf66c720f5914d6523e60e5e3994fa6b3dad966..9ab45ad978cfb0b8b0d9bcdda1b083d6f23a8e8d 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 /* We rig the hash so adjacent-numbered records always clash. */
index 80eb56759b703b95b866424b43e3c69b830af97c..4827b425daeff5a7675c8d161ed1d9b4c3c0dc66 100644 (file)
@@ -1,6 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index b195d80ab1ddd86fc5918c36e4a798f5d024ad46..3fba81d22d1eb43d4d166072a4026119d481e1db 100644 (file)
@@ -1,6 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index fd773320164d414bcf5bf68b380cd96bdb4bcd48..8cd63dedcde3c7942256a8919b2f5b1e26b3ff8d 100644 (file)
@@ -1,6 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index b55bfe7d46384e5f041d6c83f9f9c9360e7a757a..4173fb05c859033a7aea2d096f32228a16fcf6e7 100644 (file)
@@ -1,7 +1,7 @@
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index 46a77ff976b6d66e8619024bb7a1e8b594f21fc7..53fe66bcf7818a9a57bba48d99fd3c4157af909d 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/ilog/ilog.h>
 #include "logging.h"
 
index 65cead03584dbf47c16cb89ba6d279fff1250339..2f634a27c0d544541485e80c27a7a3770ebae3cf 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 static uint64_t myhash(const void *key, size_t len, uint64_t seed, void *priv)
index 0e1430265ccfe5722f5aef507822b5c5873db7e4..850321554a12522b488fe6fd707a081b7bc58de5 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 static uint64_t badhash(const void *key, size_t len, uint64_t seed, void *priv)
index db391e7e59c4b391358366633eb7f6f76e533db0..12449a1fe637b3f6e27d29cb93c44d0d5a6a0406 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <err.h>
 #include "logging.h"
 
index b7b1e6e562501dc42f1f0c33b20a7576bea939d3..0aee0ca6253f90c665a3476089336a1e34838873 100644 (file)
@@ -1,7 +1,7 @@
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <ccan/failtest/failtest.h>
 #include "logging.h"
 #include "failtest_helper.h"
index 44fee941cfadcf26130e2b4af7353ffebc2208eb..617b1e4dd4e353509e86a673b9c7260e1c0825d8 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 #include "layout.h"
 
index 9262c0528eb8a2f4bcf3b6691b30854751d7e4b0..d2115f63cb3612b80575eaf90e2bcdd17c37541d 100644 (file)
@@ -1,4 +1,4 @@
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <unistd.h>
 #include "lock-tracking.h"
 
@@ -12,7 +12,7 @@ static int ftruncate_check(int fd, off_t length);
 #define ftruncate ftruncate_check
 
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <stdbool.h>
 #include <stdarg.h>
index 42102ae732b3df5522b3bf26d92d05602bcd17a1..9790e92dfdbfeee0f03dfbd92144d6e4c7d3b0e4 100644 (file)
@@ -1,7 +1,7 @@
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <unistd.h>
 #include "lock-tracking.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <assert.h>
 static ssize_t pwrite_check(int fd, const void *buf, size_t count, off_t offset);
index 1201bba6190e6e6f0d6c5c88706d9012516ee8c7..ef6e243a053a4f4b413839cfd884e16e2937433c 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 int main(int argc, char *argv[])
index 4cbbda03c7ef230f23f2ed411e22684041bf52f7..b6a9075b6d56b78d94e8de311a76f4033d970985 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 static int mylock(int fd, int rw, off_t off, off_t len, bool waitflag,
index 4b25f9c5c99ab8929d0e9590c72f0ef76525e98d..e59f5009abfda750d0bee0364f4fe0714066ccf7 100644 (file)
@@ -1,6 +1,6 @@
 #include <ccan/failtest/failtest_override.h>
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 #include "layout.h"
 #include "failtest_helper.h"
index 0fa2a57f4dfacdafa07068be0f17182fe8628e12..2e9919c0f104691e4e4b1438b56bd1fd8b49e3da 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 int main(int argc, char *argv[])
index a304833ce35ce219b15c8f0019eddde6460e1b76..f552fcfb58e0d65637ef4c99acdce330fbf1ca36 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 int main(int argc, char *argv[])
index 7cd9b849ef681d049db63d8e2121207d38f831dd..c3e03dea7d8ce1f88e35c209e3856399b1bb4947 100644 (file)
@@ -1,11 +1,11 @@
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <unistd.h>
 #include "lock-tracking.h"
 
 #define fcntl fcntl_with_lockcheck
 #include "tdb2-source.h"
 
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <stdbool.h>
 #include <stdarg.h>
index b70a841aaf8027de24e6bff052aa4ff77b0694ca..16a1baab468a3aedb0b78b60a3702943f8f1538d 100644 (file)
@@ -1,7 +1,7 @@
 #include "tdb2-source.h"
 /* We had a bug where we marked the tdb read-only for a tdb_traverse_read.
  * If we then expanded the tdb, we would remap read-only, and later SEGV. */
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "external-agent.h"
 #include "logging.h"
 
index 129666299c3014f59ec60c2529f2842085c38a99..9c908330018f42e47598063d5ea8f673c073fc51 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 static int log_count = 0;
index f3403dd1b8f7d63e0d81cb780c769f388a884fc5..2a5e48b105a6b6dcde66a050a13b524c6032afe9 100644 (file)
@@ -1,7 +1,7 @@
 /* We need this otherwise fcntl locking fails. */
 #define _FILE_OFFSET_BITS 64
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index c1d76740cc36bf610c6f3b7378c7d524da0c1adc..cedf6b6057b52f12c28cbccda3dddc1d903c65ef 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index e939d04036fefeb1461adb3faf73024ac9347565..b8f0889b354720e31d53d818b3bd87442517b896 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 35bc4c3f229554938790ea8bb5a14b1d5e160e11..6403acb1ea80a77f526adc156ca00aaf270229d2 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 3b91d45bdf5c807575d12f36cdd8b9a04158c24b..a31908009c2e779bbf1661b7c3f52800309626d3 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 8a78196c8258fa59e9fec6bc84488f6632d2d50b..e6a46775f12988ae84520324b14373a2342ba110 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 46ab5669207b4e02c75fd88fd4afce25e11f04b7..84acf1bccd5db1dfffc1d180979ed6177cf12186 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 
index 149e5318a09efdcb69bf49d94bbbfd9f441566ff..23ab740d9f03b3359babdba5e8600f1f178ad14d 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <stdbool.h>
 #include <err.h>
index cf5aa4a2f458834bfc2ad0d2ea42ee519e0a1ccc..8fa36bd88aec00aca7b903f7d2487af365b71461 100644 (file)
@@ -1,7 +1,7 @@
 #include "tdb1-lock-tracking.h"
 #define fcntl fcntl_with_lockcheck1
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #undef fcntl
 #include <stdlib.h>
 #include <stdbool.h>
index b2b7a781db602d690184035ee09f8ddddb07d049..7392d148758d48d123338b6382f676416b404166 100644 (file)
@@ -1,11 +1,11 @@
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <unistd.h>
 #include "tdb1-lock-tracking.h"
 
 #define fcntl fcntl_with_lockcheck1
 
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index f9cffa25a67e9aa41948d3e82789efa83bd5b00c..2b7f6adde883934222d480fb74c147236acade5c 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index f42a8f5e27464d2870fc0d385e38c66e9399d470..c15c06ab92b2df91d64bbedef6759e51480c8c6a 100644 (file)
@@ -1,7 +1,7 @@
 /* We should be able to tdb_check a O_RDONLY tdb, and we were previously allowed
  * to tdb_check() inside a transaction (though that's paranoia!). */
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 44a2eeb8c72111bd88db52108759c0041b05c887..a56f3ba356da7fb45e5605d66b094f256d42b191 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 
index c3eb278e1ad519f17711334b5cc58dce908f7b9c..aa5398f242e03510ba4c46d7c5bbd45e816ac5a9 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 5107b8e4363616569d7b83e432bcd1e8c07892f9..34fb381b5b9ff6bbb4faa1e971f0e5934ee1cd8c 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 
index 691aaf944472a3839e11688e37cb43e900291c9b..7732d54cf7a090821ee7a1dd542f17f31ded7beb 100644 (file)
@@ -2,7 +2,7 @@
 #include "tdb1-lock-tracking.h"
 #define fcntl fcntl_with_lockcheck1
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #undef fcntl_with_lockcheck
 #include <stdlib.h>
 #include <stdbool.h>
index 63c1bdf1e46b637ded5ee05bb2fc5742d01ea79f..19f926c7876dfd85e401c5e53a97490367627e30 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 
index fdc9cdce35bb5370a5901b619cad4e81675ee713..16a097ce305fa79fc7c0ee30f80c60f5d0f097e5 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index dca6473b1cab61fe17625729c79bebe75f18f35d..eebdcdb2124dc35dd91c26fd3dcd4848bc993142 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include <stdlib.h>
 #include <err.h>
 #include "logging.h"
index 742fb89113411b627b3fe96bb1d31eb8225427c9..94aab89d323eb7390bea3ddd4bbaf0fc48c46b56 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 
 int main(int argc, char *argv[])
 {
index b17f078074b401795e61fd9bde1a9c427ed61032..b1eb2de21744b48b7a97e0b2d93ed0819df65fa3 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 static int drop_count(struct tdb_context *tdb, unsigned int *count)
index 610f02a516c79b52a450340b4e46745bf12d4ea9..20d610fe6601097c9bc265a294d2379f7e9c2eff 100644 (file)
@@ -1,5 +1,5 @@
 #include "tdb2-source.h"
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "logging.h"
 
 #define NUM_RECORDS 1000
diff --git a/lib/tdb2/test/tap-interface.c b/lib/tdb2/test/tap-interface.c
new file mode 100644 (file)
index 0000000..077ec2c
--- /dev/null
@@ -0,0 +1,3 @@
+#include "tap-interface.h"
+
+unsigned tap_ok_count, tap_ok_target = -1U;
diff --git a/lib/tdb2/test/tap-interface.h b/lib/tdb2/test/tap-interface.h
new file mode 100644 (file)
index 0000000..9ee84aa
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+   Unix SMB/CIFS implementation.
+   Simplistic implementation of tap interface.
+
+   Copyright (C) Rusty Russell 2012
+
+     ** NOTE! The following LGPL license applies to the talloc
+     ** library. This does NOT imply that all of Samba is released
+     ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see <http://www.gnu.org/licenses/>.
+*/
+#include <stdio.h>
+#include <err.h>
+
+#ifndef __location__
+#define __TAP_STRING_LINE1__(s)    #s
+#define __TAP_STRING_LINE2__(s)   __TAP_STRING_LINE1__(s)
+#define __TAP_STRING_LINE3__  __TAP_STRING_LINE2__(__LINE__)
+#define __location__ __FILE__ ":" __TAP_STRING_LINE3__
+#endif
+
+extern unsigned tap_ok_count, tap_ok_target;
+#define plan_tests(num) do { tap_ok_target = (num); } while(0)
+#define ok(e, ...) ((e) ? (printf("."), tap_ok_count++, true) : (warnx(__VA_ARGS__), false))
+#define ok1(e) ok((e), "%s:%s", __location__, #e)
+#define pass(...) (printf("."), tap_ok_count++)
+#define fail(...) warnx(__VA_ARGS__)
+#define diag printf
+#define exit_status() (tap_ok_count == tap_ok_target ? 0 : 1)
index ffde0770255f4b5be717a11de721b1ad557e0e65..dff7012a40820044e2d4acacc68b42f41fe43185 100644 (file)
@@ -10,8 +10,8 @@
 #include <limits.h>
 #include <string.h>
 #include <errno.h>
-#include <ccan/tdb2/tdb1_private.h>
-#include <ccan/tap/tap.h>
+#include "tdb1_private.h"
+#include "tap-interface.h"
 #include <stdio.h>
 #include <stdarg.h>
 
@@ -76,7 +76,7 @@ static enum agent_return do_operation(enum operation op, const char *name)
                ret = tdb_check(tdb, NULL, NULL) == TDB_SUCCESS ? SUCCESS : OTHER_FAILURE;
                break;
        case NEEDS_RECOVERY:
-               ret = tdb1_needs_recovery(tdb) ? SUCCESS : FAILED;
+               ret = external_agent_needs_rec(tdb);
                break;
        case CLOSE:
                ret = tdb_close(tdb) == 0 ? SUCCESS : OTHER_FAILURE;
index ee903b65c51b0e6a79dc630992afc0222038abf4..19ad8d2c12669bb26d9fb4b85222de683b9e08c3 100644 (file)
@@ -37,4 +37,7 @@ enum agent_return external_agent_operation1(struct agent *handle,
 const char *agent_return_name1(enum agent_return ret);
 const char *operation_name1(enum operation op);
 
+/* Internal use: */
+struct tdb_context;
+enum agent_return external_agent_needs_rec(struct tdb_context *tdb);
 #endif /* TDB_TEST_EXTERNAL_AGENT_H */
index 197b1f070602cfc574214245fe411be546edb9bc..9701157b818973d33756ab0f501831b339d4e7a5 100644 (file)
@@ -1,10 +1,10 @@
 /* We save the locks so we can reaquire them. */
-#include <ccan/tdb2/tdb1_private.h>
+#include "tdb1_private.h"
 #include <unistd.h>
 #include <fcntl.h>
 #include <stdarg.h>
 #include <stdlib.h>
-#include <ccan/tap/tap.h>
+#include "tap-interface.h"
 #include "tdb1-lock-tracking.h"
 
 struct lock {
index cb8c2f127893d88ae2d01881f0141986895299f6..b59e7d805d7b00c755e61a0b0e118196c87a5aa5 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef TDB1_LOCK_TRACKING_H
 #define TDB1_LOCK_TRACKING_H
-#include <ccan/tdb2/private.h>
+#include "private.h"
 #include <stdbool.h>
 
 /* Set this if you want a callback after fnctl unlock. */
index 28ab35135c380ce8949bf853e6fd918829f4be74..fabf6ac33dda4374c12e0d155d51a51f238a1b78 100644 (file)
@@ -1,21 +1,21 @@
 #include "config.h"
-#include <ccan/tdb2/check.c>
-#include <ccan/tdb2/free.c>
-#include <ccan/tdb2/hash.c>
-#include <ccan/tdb2/io.c>
-#include <ccan/tdb2/lock.c>
-#include <ccan/tdb2/open.c>
-#include <ccan/tdb2/summary.c>
-#include <ccan/tdb2/tdb.c>
-#include <ccan/tdb2/transaction.c>
-#include <ccan/tdb2/traverse.c>
-#include <ccan/tdb2/tdb1_check.c>
-#include <ccan/tdb2/tdb1_freelist.c>
-#include <ccan/tdb2/tdb1_hash.c>
-#include <ccan/tdb2/tdb1_io.c>
-#include <ccan/tdb2/tdb1_lock.c>
-#include <ccan/tdb2/tdb1_open.c>
-#include <ccan/tdb2/tdb1_summary.c>
-#include <ccan/tdb2/tdb1_tdb.c>
-#include <ccan/tdb2/tdb1_transaction.c>
-#include <ccan/tdb2/tdb1_traverse.c>
+#include "check.c"
+#include "free.c"
+#include "hash.c"
+#include "io.c"
+#include "lock.c"
+#include "open.c"
+#include "summary.c"
+#include "tdb.c"
+#include "transaction.c"
+#include "traverse.c"
+#include "tdb1_check.c"
+#include "tdb1_freelist.c"
+#include "tdb1_hash.c"
+#include "tdb1_io.c"
+#include "tdb1_lock.c"
+#include "tdb1_open.c"
+#include "tdb1_summary.c"
+#include "tdb1_tdb.c"
+#include "tdb1_transaction.c"
+#include "tdb1_traverse.c"