X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-50-multiple-freelists.c;h=dae90e239879eb1e34867fcd6e3dd572aefde21c;hp=719701b1c1f6b6103ec291c8daf967f8d6144327;hb=d9cbd7d4454ae35e4e2f6d18a9469bf26948e4b9;hpb=60a487d57979e4364e70c837079f3cf083ddc9c7 diff --git a/ccan/tdb2/test/run-50-multiple-freelists.c b/ccan/tdb2/test/run-50-multiple-freelists.c index 719701b1..dae90e23 100644 --- a/ccan/tdb2/test/run-50-multiple-freelists.c +++ b/ccan/tdb2/test/run-50-multiple-freelists.c @@ -1,12 +1,5 @@ -#include -#include -#include -#include -#include -#include -#include +#include "tdb2-source.h" #include -#include #include "logging.h" #include "layout.h" @@ -48,22 +41,22 @@ int main(int argc, char *argv[]) off = get_free(tdb, 0, 80 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[3].base.off); - ok1(tdb->ftable_off == layout->elem[0].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[0].base.off); off = get_free(tdb, 0, 160 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[5].base.off); - ok1(tdb->ftable_off == layout->elem[1].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[1].base.off); off = get_free(tdb, 0, 320 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[7].base.off); - ok1(tdb->ftable_off == layout->elem[2].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[2].base.off); off = get_free(tdb, 0, 40 - sizeof(struct tdb_used_record), 0, TDB_USED_MAGIC, 0); ok1(off == layout->elem[9].base.off); - ok1(tdb->ftable_off == layout->elem[0].base.off); + ok1(tdb->tdb2.ftable_off == layout->elem[0].base.off); /* Now we fail. */ off = get_free(tdb, 0, 0, 1, TDB_USED_MAGIC, 0);