MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ztest_run_init

Function ztest_run_init

freebsd/contrib/openzfs/cmd/ztest/ztest.c:7689–7720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7687}
7688
7689static void
7690ztest_run_init(void)
7691{
7692 int i;
7693
7694 ztest_shared_t *zs = ztest_shared;
7695
7696 /*
7697 * Blow away any existing copy of zpool.cache
7698 */
7699 (void) remove(spa_config_path);
7700
7701 if (ztest_opts.zo_init == 0) {
7702 if (ztest_opts.zo_verbose >= 1)
7703 (void) printf("Importing pool %s\n",
7704 ztest_opts.zo_pool);
7705 ztest_import(zs);
7706 return;
7707 }
7708
7709 /*
7710 * Create and initialize our storage pool.
7711 */
7712 for (i = 1; i <= ztest_opts.zo_init; i++) {
7713 bzero(zs, sizeof (ztest_shared_t));
7714 if (ztest_opts.zo_verbose >= 3 &&
7715 ztest_opts.zo_init != 1) {
7716 (void) printf("ztest_init(), pass %d\n", i);
7717 }
7718 ztest_init(zs);
7719 }
7720}
7721
7722int
7723main(int argc, char **argv)

Callers 1

mainFunction · 0.85

Calls 4

ztest_importFunction · 0.85
bzeroFunction · 0.85
ztest_initFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected