1 #include "tdb2-source.h"
2 #include "tap-interface.h"
6 int main(int argc
, char *argv
[])
8 struct tdb_context
*tdb
;
9 union tdb_attribute incompat_hash_attr
;
11 incompat_hash_attr
.base
.attr
= TDB_ATTRIBUTE_HASH
;
12 incompat_hash_attr
.base
.next
= &tap_log_attr
;
13 incompat_hash_attr
.hash
.fn
= tdb1_incompatible_hash
;
17 /* Old format (with zeroes in the hash magic fields) should
18 * open with any hash (since we don't know what hash they used). */
19 tdb
= tdb_open("test/old-nohash-le.tdb1", TDB_VERSION1
, O_RDWR
, 0,
22 ok1(tdb_check(tdb
, NULL
, NULL
) == TDB_SUCCESS
);
25 tdb
= tdb_open("test/old-nohash-be.tdb1", TDB_VERSION1
, O_RDWR
, 0,
28 ok1(tdb_check(tdb
, NULL
, NULL
) == TDB_SUCCESS
);
31 tdb
= tdb_open("test/old-nohash-le.tdb1", TDB_VERSION1
, O_RDWR
, 0,
34 ok1(tdb_check(tdb
, NULL
, NULL
) == TDB_SUCCESS
);
37 tdb
= tdb_open("test/old-nohash-be.tdb1", TDB_VERSION1
, O_RDWR
, 0,
40 ok1(tdb_check(tdb
, NULL
, NULL
) == TDB_SUCCESS
);