git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup zvol initialization code
[zfs.git]
/
cmd
/
ztest
/
ztest.c
diff --git
a/cmd/ztest/ztest.c
b/cmd/ztest/ztest.c
index
07b81cc
..
93a5f1e
100644
(file)
--- a/
cmd/ztest/ztest.c
+++ b/
cmd/ztest/ztest.c
@@
-1039,7
+1039,7
@@
ztest_dsl_prop_set_uint64(char *osname, zfs_prop_t prop, uint64_t value,
ztest_record_enospc(FTAG);
return (error);
}
ztest_record_enospc(FTAG);
return (error);
}
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
setpoint = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
VERIFY3U(dsl_prop_get(osname, propname, sizeof (curval),
setpoint = umem_alloc(MAXPATHLEN, UMEM_NOFAIL);
VERIFY3U(dsl_prop_get(osname, propname, sizeof (curval),
@@
-1073,7
+1073,7
@@
ztest_spa_prop_set_uint64(zpool_prop_t prop, uint64_t value)
ztest_record_enospc(FTAG);
return (error);
}
ztest_record_enospc(FTAG);
return (error);
}
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
return (error);
}
return (error);
}
@@
-1776,7
+1776,7
@@
ztest_replay_setattr(ztest_ds_t *zd, lr_setattr_t *lr, boolean_t byteswap)
ASSERT3U(lr->lr_size, >=, sizeof (*bbt));
ASSERT3U(lr->lr_size, <=, db->db_size);
ASSERT3U(lr->lr_size, >=, sizeof (*bbt));
ASSERT3U(lr->lr_size, <=, db->db_size);
- VERIFY
3U(dmu_set_bonus(db, lr->lr_size, tx), ==, 0
);
+ VERIFY
0(dmu_set_bonus(db, lr->lr_size, tx)
);
bbt = ztest_bt_bonus(db);
ztest_bt_generate(bbt, os, lr->lr_foid, -1ULL, lr->lr_mode, txg, crtxg);
bbt = ztest_bt_bonus(db);
ztest_bt_generate(bbt, os, lr->lr_foid, -1ULL, lr->lr_mode, txg, crtxg);
@@
-1792,19
+1792,19
@@
ztest_replay_setattr(ztest_ds_t *zd, lr_setattr_t *lr, boolean_t byteswap)
return (0);
}
return (0);
}
-zil_replay_func_t
*
ztest_replay_vector[TX_MAX_TYPE] = {
+zil_replay_func_t ztest_replay_vector[TX_MAX_TYPE] = {
NULL, /* 0 no such transaction type */
NULL, /* 0 no such transaction type */
- (zil_replay_func_t
*)ztest_replay_create,
/* TX_CREATE */
+ (zil_replay_func_t
)ztest_replay_create,
/* TX_CREATE */
NULL, /* TX_MKDIR */
NULL, /* TX_MKXATTR */
NULL, /* TX_SYMLINK */
NULL, /* TX_MKDIR */
NULL, /* TX_MKXATTR */
NULL, /* TX_SYMLINK */
- (zil_replay_func_t
*)ztest_replay_remove,
/* TX_REMOVE */
+ (zil_replay_func_t
)ztest_replay_remove,
/* TX_REMOVE */
NULL, /* TX_RMDIR */
NULL, /* TX_LINK */
NULL, /* TX_RENAME */
NULL, /* TX_RMDIR */
NULL, /* TX_LINK */
NULL, /* TX_RENAME */
- (zil_replay_func_t
*)ztest_replay_write,
/* TX_WRITE */
- (zil_replay_func_t
*)ztest_replay_truncate,
/* TX_TRUNCATE */
- (zil_replay_func_t
*)ztest_replay_setattr,
/* TX_SETATTR */
+ (zil_replay_func_t
)ztest_replay_write,
/* TX_WRITE */
+ (zil_replay_func_t
)ztest_replay_truncate,
/* TX_TRUNCATE */
+ (zil_replay_func_t
)ztest_replay_setattr,
/* TX_SETATTR */
NULL, /* TX_ACL */
NULL, /* TX_CREATE_ACL */
NULL, /* TX_CREATE_ATTR */
NULL, /* TX_ACL */
NULL, /* TX_CREATE_ACL */
NULL, /* TX_CREATE_ATTR */
@@
-2581,7
+2581,7
@@
ztest_vdev_aux_add_remove(ztest_ds_t *zd, uint64_t id)
zs->zs_vdev_aux = 0;
for (;;) {
int c;
zs->zs_vdev_aux = 0;
for (;;) {
int c;
- (void) snprintf(path,
sizeof (path)
, ztest_aux_template,
+ (void) snprintf(path,
MAXPATHLEN
, ztest_aux_template,
ztest_opts.zo_dir, ztest_opts.zo_pool, aux,
zs->zs_vdev_aux);
for (c = 0; c < sav->sav_count; c++)
ztest_opts.zo_dir, ztest_opts.zo_pool, aux,
zs->zs_vdev_aux);
for (c = 0; c < sav->sav_count; c++)
@@
-3200,7
+3200,7
@@
ztest_objset_destroy_cb(const char *name, void *arg)
error = dmu_object_info(os, ZTEST_DIROBJ, &doi);
if (error != ENOENT) {
/* We could have crashed in the middle of destroying it */
error = dmu_object_info(os, ZTEST_DIROBJ, &doi);
if (error != ENOENT) {
/* We could have crashed in the middle of destroying it */
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
ASSERT3U(doi.doi_type, ==, DMU_OT_ZAP_OTHER);
ASSERT3S(doi.doi_physical_blocks_512, >=, 0);
}
ASSERT3U(doi.doi_type, ==, DMU_OT_ZAP_OTHER);
ASSERT3S(doi.doi_physical_blocks_512, >=, 0);
}
@@
-3673,10
+3673,10
@@
ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
*/
error = dmu_read(os, packobj, packoff, packsize, packbuf,
DMU_READ_PREFETCH);
*/
error = dmu_read(os, packobj, packoff, packsize, packbuf,
DMU_READ_PREFETCH);
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
error = dmu_read(os, bigobj, bigoff, bigsize, bigbuf,
DMU_READ_PREFETCH);
error = dmu_read(os, bigobj, bigoff, bigsize, bigbuf,
DMU_READ_PREFETCH);
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
/*
* Get a tx for the mods to both packobj and bigobj.
/*
* Get a tx for the mods to both packobj and bigobj.
@@
-3999,10
+3999,10
@@
ztest_dmu_read_write_zcopy(ztest_ds_t *zd, uint64_t id)
if (i != 0 || ztest_random(2) != 0) {
error = dmu_read(os, packobj, packoff,
packsize, packbuf, DMU_READ_PREFETCH);
if (i != 0 || ztest_random(2) != 0) {
error = dmu_read(os, packobj, packoff,
packsize, packbuf, DMU_READ_PREFETCH);
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
error = dmu_read(os, bigobj, bigoff, bigsize,
bigbuf, DMU_READ_PREFETCH);
error = dmu_read(os, bigobj, bigoff, bigsize,
bigbuf, DMU_READ_PREFETCH);
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
}
compare_and_update_pbbufs(s, packbuf, bigbuf, bigsize,
n, chunksize, txg);
}
compare_and_update_pbbufs(s, packbuf, bigbuf, bigsize,
n, chunksize, txg);
@@
-4287,7
+4287,7
@@
ztest_zap(ztest_ds_t *zd, uint64_t id)
if (error == ENOENT)
goto out;
if (error == ENOENT)
goto out;
- ASSERT
3U(error, ==, 0
);
+ ASSERT
0(error
);
tx = dmu_tx_create(os);
dmu_tx_hold_zap(tx, object, B_TRUE, NULL);
tx = dmu_tx_create(os);
dmu_tx_hold_zap(tx, object, B_TRUE, NULL);
@@
-4494,7
+4494,7
@@
ztest_commit_callback(void *arg, int error)
data->zcd_called = B_TRUE;
if (error == ECANCELED) {
data->zcd_called = B_TRUE;
if (error == ECANCELED) {
- ASSERT
3U(data->zcd_txg, ==, 0
);
+ ASSERT
0(data->zcd_txg
);
ASSERT(!data->zcd_added);
/*
ASSERT(!data->zcd_added);
/*
@@
-4704,7
+4704,7
@@
ztest_spa_prop_get_set(ztest_ds_t *zd, uint64_t id)
(void) ztest_spa_prop_set_uint64(ZPOOL_PROP_DEDUPDITTO,
ZIO_DEDUPDITTO_MIN + ztest_random(ZIO_DEDUPDITTO_MIN));
(void) ztest_spa_prop_set_uint64(ZPOOL_PROP_DEDUPDITTO,
ZIO_DEDUPDITTO_MIN + ztest_random(ZIO_DEDUPDITTO_MIN));
- VERIFY
3U(spa_prop_get(ztest_spa, &props), ==, 0
);
+ VERIFY
0(spa_prop_get(ztest_spa, &props)
);
if (ztest_opts.zo_verbose >= 6)
dump_nvlist(props, 4);
if (ztest_opts.zo_verbose >= 6)
dump_nvlist(props, 4);
@@
-5557,7
+5557,7
@@
ztest_dataset_open(int d)
}
ASSERT(error == 0 || error == EEXIST);
}
ASSERT(error == 0 || error == EEXIST);
- VERIFY
3U(dmu_objset_hold(name, zd, &os), ==, 0
);
+ VERIFY
0(dmu_objset_hold(name, zd, &os)
);
(void) rw_exit(&ztest_name_lock);
ztest_zd_init(zd, ZTEST_GET_SHARED_DS(d), os);
(void) rw_exit(&ztest_name_lock);
ztest_zd_init(zd, ZTEST_GET_SHARED_DS(d), os);
@@
-5757,7
+5757,7
@@
ztest_run(ztest_shared_t *zs)
/* Verify that at least one commit cb was called in a timely fashion */
if (zc_cb_counter >= ZTEST_COMMIT_CB_MIN_REG)
/* Verify that at least one commit cb was called in a timely fashion */
if (zc_cb_counter >= ZTEST_COMMIT_CB_MIN_REG)
- VERIFY
3U(zc_min_txg_delay, ==, 0
);
+ VERIFY
0(zc_min_txg_delay
);
spa_close(spa, FTAG);
spa_close(spa, FTAG);