- ok1(tdb);
- if (!tdb)
- continue;
-
- /* First expand. Should not fill zone. */
- val = tdb->map_size - sizeof(struct tdb_header);
- ok1(tdb_expand(tdb, 1) == 0);
- ok1(tdb->map_size < sizeof(struct tdb_header)
- + (1 << INITIAL_ZONE_BITS));
- ok1(tdb_check(tdb, NULL, NULL) == 0);
-
- /* Fill zone. */
- val = (1<<INITIAL_ZONE_BITS)
- - sizeof(struct tdb_used_record)
- - (tdb->map_size - sizeof(struct tdb_header));
- ok1(tdb_expand(tdb, val) == 0);
- ok1(tdb->map_size == sizeof(struct tdb_header)
- + (1 << INITIAL_ZONE_BITS));
- ok1(tdb_check(tdb, NULL, NULL) == 0);