1 #include "tdb2-source.h"
2 #include <ccan/tap/tap.h>
5 #include "tdb1-logging.h"
7 int main(int argc, char *argv[])
9 struct tdb1_context *tdb;
13 /* Old format (with zeroes in the hash magic fields) should
14 * open with any hash (since we don't know what hash they used). */
15 tdb = tdb1_open_ex("test/old-nohash-le.tdb1", 0, 0, O_RDWR, 0,
18 ok1(tdb1_check(tdb, NULL, NULL) == 0);
21 tdb = tdb1_open_ex("test/old-nohash-be.tdb1", 0, 0, O_RDWR, 0,
24 ok1(tdb1_check(tdb, NULL, NULL) == 0);
27 tdb = tdb1_open_ex("test/old-nohash-le.tdb1", 0, 0, O_RDWR, 0,
28 &taplogctx, tdb1_jenkins_hash);
30 ok1(tdb1_check(tdb, NULL, NULL) == 0);
33 tdb = tdb1_open_ex("test/old-nohash-be.tdb1", 0, 0, O_RDWR, 0,
34 &taplogctx, tdb1_jenkins_hash);
36 ok1(tdb1_check(tdb, NULL, NULL) == 0);