Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/tests/ftest/cart/dual_iface_server.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* (C) Copyright 2018-2022 Intel Corporation.
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -242,8 +243,7 @@ server_main(d_rank_t my_rank, const char *str_port, const char *str_interface,
struct stat st;
crt_init_options_t init_opts = {0};

d_setenv("FI_UNIVERSE_SIZE", "1024", 1);
d_setenv("D_LOG_MASK", "ERR", 1);
d_setenv("D_LOG_MASK", "ERR", 0);
d_setenv("D_PORT_AUTO_ADJUST", "1", 1);

/* rank, num_attach_retries, is_server, assert_on_error */
Expand Down
15 changes: 9 additions & 6 deletions src/tests/ftest/cart/test_multisend_client.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2018-2022 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand All @@ -14,15 +14,15 @@
static void
rpc_cb_common(const struct crt_cb_info *info)
{
crt_bulk_t *p_blk;
crt_bulk_t blk;
int rc;

p_blk = (crt_bulk_t *)info->cci_arg;
blk = (crt_bulk_t)info->cci_arg;

D_ASSERTF(info->cci_rc == 0, "rpc response failed. rc: %d\n", info->cci_rc);

if (p_blk && *p_blk) {
rc = crt_bulk_free(*p_blk);
if (blk != CRT_BULK_NULL) {
rc = crt_bulk_free(blk);
if (rc)
D_ERROR("bulk free failed with %d\n", rc);
}
Expand Down Expand Up @@ -151,6 +151,7 @@ test_run()
/* TODO: for now rdma is disabled when forcing all rpcs to the same rank */
if (test.tg_force_rank == -1) {
rc = d_sgl_init(&sgl, 1);

D_ASSERTF(rc == 0, "d_sgl_init() failed; rc: %d\n", rc);

sgl.sg_iovs[0].iov_buf = dma_buff + (chunk_size * chunk_index);
Expand All @@ -165,14 +166,16 @@ test_run()
input->chunk_size = chunk_size;
input->chunk_index = chunk_index;
input->do_put = test.tg_do_put;

} else {
D_WARN("Disabling rdma transfer for forced rank for now\n");
input->chunk_size = 0;
input->bulk_hdl = CRT_BULK_NULL;
input->chunk_index = 0;
input->do_put = false;
}

rc = crt_req_send(rpc_req, rpc_cb_common, &bulk_hdl[chunk_index]);
rc = crt_req_send(rpc_req, rpc_cb_common, input->bulk_hdl);
D_ASSERTF(rc == 0, "crt_req_send() failed. rc: %d\n", rc);

if (test.tg_test_mode == TEST_MODE_SYNC)
Expand Down
7 changes: 7 additions & 0 deletions src/tests/ftest/cart/test_multisend_common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* (C) Copyright 2018-2022 Intel Corporation.
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -186,6 +187,12 @@ test_parse_args(int argc, char **argv)
break;
case 'm':
test.tg_test_mode = atoi(optarg);
if ((test.tg_test_mode != TEST_MODE_ASYNC) &&
(test.tg_test_mode != TEST_MODE_SYNC)) {
printf("Unknown test_mode=%d specified, defaulting to sync",
test.tg_test_mode);
test.tg_test_mode = TEST_MODE_SYNC;
}
break;
case 'n':
test.tg_num_iterations = atoi(optarg);
Expand Down
13 changes: 8 additions & 5 deletions src/utils/self_test/self_test_lib.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP
* (C) Copyright 2025-2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -176,10 +176,13 @@ self_test_init(char *dest_name, crt_context_t *crt_ctx, crt_group_t **srv_grp, p

d_rank_list_free(rank_list);

ret = crt_rank_self_set(max_rank + 1, 1 /* group_version_min */);
if (ret != 0) {
D_ERROR("crt_rank_self_set failed; ret = %d\n", ret);
return ret;
/* when running as a server set the rank to next highest one unused */
if (listen) {
ret = crt_rank_self_set(max_rank + 1, 1 /* group_version_min */);
if (ret != 0) {
D_ERROR("crt_rank_self_set failed; ret = %d\n", ret);
return ret;
}
}

return 0;
Expand Down
Loading