diff --git a/src/tests/suite/daos_obj.c b/src/tests/suite/daos_obj.c index 960c5b0a02e..aec99fc80b0 100644 --- a/src/tests/suite/daos_obj.c +++ b/src/tests/suite/daos_obj.c @@ -2175,6 +2175,7 @@ basic_byte_array(void **state) char *bulk_buf_out = NULL; char *buf; char *buf_out; + char *buf_out_tmp; int buf_len, tmp_len; int step = 1; int rc; @@ -2287,8 +2288,11 @@ basic_byte_array(void **state) assert_memory_equal(buf, buf_out, buf_len); print_message("short read should get iov_len with tail hole trimmed\n"); - memset(buf_out, 0, buf_len); tmp_len = buf_len / 3; + buf_out_tmp = buf_out; + D_ALLOC(buf_out, max(buf_len, tmp_len + 99)); + D_ASSERT(buf_out != NULL); + memset(buf_out, 0, buf_len); sgl.sg_nr_out = 0; sgl.sg_nr = 1; d_iov_set(&sg_iov[0], buf_out, tmp_len + 99); @@ -2306,6 +2310,8 @@ basic_byte_array(void **state) assert_int_equal(sgl.sg_nr_out, 1); assert_int_equal(sgl.sg_iovs[0].iov_len, tmp_len); assert_memory_equal(buf, buf_out, tmp_len); + D_FREE(buf_out); + buf_out = buf_out_tmp; if (step++ == 1) goto next_step; diff --git a/src/tests/suite/daos_obj_array.c b/src/tests/suite/daos_obj_array.c index 97c626b8efc..563186c7cd6 100644 --- a/src/tests/suite/daos_obj_array.c +++ b/src/tests/suite/daos_obj_array.c @@ -1421,8 +1421,8 @@ test_async_io(void *arg) d_iov_t sg_iovs[NUM_IOS]; daos_iod_t iods[NUM_IOS]; daos_recx_t recx[NUM_IOS]; - char akey_str[NUM_IOS][10]; - char dkey_str[NUM_IOS][10]; + char akey_str[NUM_IOS][16]; + char dkey_str[NUM_IOS][16]; char buf[NUM_IOS][IO_SIZE]; daos_handle_t eqh; int i, rc; diff --git a/src/tests/suite/daos_obj_ec.c b/src/tests/suite/daos_obj_ec.c index d2953750e29..6d58f938d98 100644 --- a/src/tests/suite/daos_obj_ec.c +++ b/src/tests/suite/daos_obj_ec.c @@ -285,6 +285,8 @@ ec_rec_list_punch(void **state) daos_obj_id_t oid; int num_rec; int i; + daos_recx_t recx; + char data[16]; if (!test_runable(arg, 6)) return; @@ -292,9 +294,6 @@ ec_rec_list_punch(void **state) oid = daos_test_oid_gen(arg->coh, ec_obj_class, 0, 0, arg->myrank); ioreq_init(&req, arg->coh, oid, DAOS_IOD_ARRAY, arg); for (i = 0; i < 100; i++) { - daos_recx_t recx; - char data[16]; - /* Make dkey on different shards */ req.iod_type = DAOS_IOD_ARRAY; recx.rx_nr = 5; @@ -313,8 +312,6 @@ ec_rec_list_punch(void **state) /* punch the akey */ for (i = 0; i < 100; i++) { - daos_recx_t recx; - recx.rx_nr = 5; recx.rx_idx = i * EC_CELL_SIZE; @@ -2402,7 +2399,7 @@ ec_dkey_enum_fail(void **state) recx.rx_nr = 5; recx.rx_idx = 0; memset(data, 'a', 5); - insert_recxs(dkey, "a_key", 1, DAOS_TX_NONE, &recx, 1, data, 16, &req); + insert_recxs(dkey, "a_key", 1, DAOS_TX_NONE, &recx, 1, data, 5, &req); } print_message("iterate dkey...\n"); diff --git a/src/tests/suite/daos_rebuild_simple.c b/src/tests/suite/daos_rebuild_simple.c index 72a46a85a94..1616a48d937 100644 --- a/src/tests/suite/daos_rebuild_simple.c +++ b/src/tests/suite/daos_rebuild_simple.c @@ -224,7 +224,7 @@ rebuild_snap_update_recs(void **state) struct ioreq req; daos_recx_t recx; int tgt = DEFAULT_FAIL_TGT; - char string[100] = { 0 }; + char string[100 * SNAP_CNT] = { 0 }; daos_epoch_t snap_epoch[SNAP_CNT]; int i; int rc; diff --git a/src/tests/suite/daos_test_common.c b/src/tests/suite/daos_test_common.c index af3f1720376..0831c799159 100644 --- a/src/tests/suite/daos_test_common.c +++ b/src/tests/suite/daos_test_common.c @@ -929,8 +929,10 @@ daos_start_server(test_arg_t *arg, const uuid_t pool_uuid, { int rc; - if (d_rank_in_rank_list(svc, rank)) - svc->rl_nr++; + if (!d_rank_in_rank_list(svc, rank)) { + rc = d_rank_list_append(svc, rank); + D_ASSERTF(rc == 0, DF_RC "\n", DP_RC(rc)); + } print_message("\tstart rank %d (svc->rl_nr %d)!\n", rank, svc->rl_nr);