1 #include "../common/tdb_private.h"
2 #include "../common/io.c"
3 #include "../common/tdb.c"
4 #include "../common/lock.c"
5 #include "../common/freelist.c"
6 #include "../common/traverse.c"
7 #include "../common/transaction.c"
8 #include "../common/error.c"
9 #include "../common/open.c"
10 #include "../common/check.c"
11 #include "../common/hash.c"
12 #include "../common/mutex.c"
13 #include "tap-interface.h"
17 int main(int argc
, char *argv
[])
19 struct tdb_context
*tdb
;
23 /* Old format (with zeroes in the hash magic fields) should
24 * open with any hash (since we don't know what hash they used). */
25 tdb
= tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR
, 0,
28 ok1(tdb_check(tdb
, NULL
, NULL
) == 0);
31 tdb
= tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR
, 0,
34 ok1(tdb_check(tdb
, NULL
, NULL
) == 0);
37 tdb
= tdb_open_ex("test/old-nohash-le.tdb", 0, 0, O_RDWR
, 0,
38 &taplogctx
, tdb_jenkins_hash
);
40 ok1(tdb_check(tdb
, NULL
, NULL
) == 0);
43 tdb
= tdb_open_ex("test/old-nohash-be.tdb", 0, 0, O_RDWR
, 0,
44 &taplogctx
, tdb_jenkins_hash
);
46 ok1(tdb_check(tdb
, NULL
, NULL
) == 0);