X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-firstkey-nextkey.c;h=1eb265ef926b4e87834c733c9bff8ddde77fd1ac;hp=b8a12bd38c8ae0bbb79a19855ac6c4f44834ec7c;hb=d9cbd7d4454ae35e4e2f6d18a9469bf26948e4b9;hpb=b21004624683be5bf1d8f75e3b5be4e9618049ee diff --git a/ccan/tdb2/test/run-firstkey-nextkey.c b/ccan/tdb2/test/run-firstkey-nextkey.c index b8a12bd3..1eb265ef 100644 --- a/ccan/tdb2/test/run-firstkey-nextkey.c +++ b/ccan/tdb2/test/run-firstkey-nextkey.c @@ -1,11 +1,4 @@ -#include -#include -#include -#include -#include -#include -#include -#include +#include "tdb2-source.h" #include #include "logging.h" @@ -56,10 +49,14 @@ int main(int argc, char *argv[]) struct tdb_context *tdb; union tdb_attribute seed_attr; enum TDB_ERROR ecode; - int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP, TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT, - TDB_NOMMAP|TDB_CONVERT }; + TDB_NOMMAP|TDB_CONVERT, + TDB_INTERNAL|TDB_VERSION1, TDB_VERSION1, + TDB_NOMMAP|TDB_VERSION1, + TDB_INTERNAL|TDB_CONVERT|TDB_VERSION1, + TDB_CONVERT|TDB_VERSION1, + TDB_NOMMAP|TDB_CONVERT|TDB_VERSION1 }; seed_attr.base.attr = TDB_ATTRIBUTE_SEED; seed_attr.base.next = &tap_log_attr; @@ -69,7 +66,8 @@ int main(int argc, char *argv[]) * (NUM_RECORDS*6 + (NUM_RECORDS-1)*3 + 22) + 1); for (i = 0; i < sizeof(flags) / sizeof(flags[0]); i++) { tdb = tdb_open("run-traverse.tdb", flags[i], - O_RDWR|O_CREAT|O_TRUNC, 0600, &seed_attr); + O_RDWR|O_CREAT|O_TRUNC, 0600, + flags[i] & TDB_VERSION1 ? NULL : &seed_attr); ok1(tdb); if (!tdb) continue;