X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-record-expand.c;h=2cde873956398f80b23069bf27334ce086b06d8e;hp=809b8d7730b20beec5b3f0970f395adaef936c42;hb=d9cbd7d4454ae35e4e2f6d18a9469bf26948e4b9;hpb=6804501c350181dea8f531142b28c620b70edbd9 diff --git a/ccan/tdb2/test/run-record-expand.c b/ccan/tdb2/test/run-record-expand.c index 809b8d77..2cde8739 100644 --- a/ccan/tdb2/test/run-record-expand.c +++ b/ccan/tdb2/test/run-record-expand.c @@ -1,9 +1,4 @@ -#include -#include -#include -#include -#include -#include +#include "tdb2-source.h" #include #include "logging.h" @@ -16,8 +11,13 @@ int main(int argc, char *argv[]) struct tdb_context *tdb; int flags[] = { TDB_INTERNAL, TDB_DEFAULT, TDB_NOMMAP, TDB_INTERNAL|TDB_CONVERT, TDB_CONVERT, - TDB_NOMMAP|TDB_CONVERT }; - struct tdb_data key = { (unsigned char *)"key", 3 }; + 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 }; + struct tdb_data key = tdb_mkdata("key", 3); struct tdb_data data; data.dptr = malloc(MAX_SIZE); @@ -45,5 +45,7 @@ int main(int argc, char *argv[]) tdb_close(tdb); } ok1(tap_log_messages == 0); + free(data.dptr); + return exit_status(); }