static void _fix_exit(void *fixture) { struct fixture *f = fixture; bcache_destroy(f->cache); close(f->fd); unlink(f->fname); free(f); }
int ext2_unmount(fscookie cookie) { // free it up ext2_t *ext2 = (ext2_t *)cookie; bcache_destroy(ext2->cache); free(ext2->gd); free(ext2); return 0; }
static void _reopen(struct fixture *f) { struct io_engine *engine; bcache_destroy(f->cache); engine = create_async_io_engine(); T_ASSERT(engine); f->cache = bcache_create(T_BLOCK_SIZE / 512, NR_BLOCKS, engine); T_ASSERT(f->cache); }