1 #include <ccan/tdb2/tdb2.h>
2 #include <ccan/tap/tap.h>
3 #include <ccan/hash/hash.h>
10 int main(int argc, char *argv[])
13 struct tdb_context *tdb;
14 int flags[] = { TDB_DEFAULT, TDB_NOMMAP,
15 TDB_CONVERT, TDB_NOMMAP|TDB_CONVERT };
17 plan_tests(sizeof(flags) / sizeof(flags[0]) * 3 + 1);
18 for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) {
19 tdb = tdb_open("run-12-store.tdb", flags[i],
20 O_RDWR|O_CREAT|O_TRUNC, 0600, &tap_log_attr);
26 tdb = tdb_open("run-12-store.tdb", flags[i] | TDB_VERSION1,
27 O_RDWR, 0600, &tap_log_attr);
30 /* It's not a version1 */
31 ok1(!(tdb_get_flags(tdb) & TDB_VERSION1));
36 ok1(tap_log_messages == 0);