X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftdb2%2Ftest%2Frun-15-append.c;h=545175a4885cb5b3e289fd277ea29b69c8007825;hp=51d4ddef2d3692934a52d25fc2def3e3fb958f40;hb=02d83e6adfd34fe62aa4fe2bc4dbc3c4a13bd5f6;hpb=e984ef661368582f7b6e7a8d2a2d709356ac7963 diff --git a/ccan/tdb2/test/run-15-append.c b/ccan/tdb2/test/run-15-append.c index 51d4ddef..545175a4 100644 --- a/ccan/tdb2/test/run-15-append.c +++ b/ccan/tdb2/test/run-15-append.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include "logging.h" @@ -67,7 +68,7 @@ int main(int argc, char *argv[]) moves++; oldoff = newoff; } - ok1(!tdb_has_locks(tdb)); + ok1(tdb->allrecord_lock.count == 0 && tdb->num_lockrecs == 0); /* We should increase by 50% each time... */ ok(moves <= ilog64(j / SIZE_STEP)*2, "Moved %u times", moves); tdb_close(tdb); @@ -98,7 +99,7 @@ int main(int argc, char *argv[]) moves++; oldoff = newoff; } - ok1(!tdb_has_locks(tdb)); + ok1(tdb->allrecord_lock.count == 0 && tdb->num_lockrecs == 0); /* We should increase by 50% each time... */ ok(moves <= ilog64(j / SIZE_STEP)*2, "Moved %u times", moves); tdb_close(tdb); @@ -120,10 +121,11 @@ int main(int argc, char *argv[]) ok1(data.dsize == MAX_SIZE); ok1(memcmp(data.dptr, buffer, data.dsize) == 0); free(data.dptr); - ok1(!tdb_has_locks(tdb)); + ok1(tdb->allrecord_lock.count == 0 && tdb->num_lockrecs == 0); tdb_close(tdb); } ok1(tap_log_messages == 0); + free(buffer); return exit_status(); }