Skip to content
Open
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/iv_client.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* (C) Copyright 2016-2021 Intel Corporation.
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -670,12 +671,11 @@ int main(int argc, char **argv)
return -1;
}

crt_group_detach(srv_grp);

g_do_shutdown = true;
pthread_join(progress_thread, NULL);

DBG_PRINT("Exiting client\n");
crt_group_detach(srv_grp);

if (log_file != stdout)
fclose(log_file);
Expand Down
8 changes: 4 additions & 4 deletions src/tests/ftest/cart/no_pmix_launcher_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 Down Expand Up @@ -206,6 +206,9 @@ int main(int argc, char **argv)
DBG_PRINT("RPC response received from rank=%d\n", rank);
}

g_do_shutdown = true;
pthread_join(progress_thread, NULL);

D_FREE(rank_list->rl_ranks);
D_FREE(rank_list);

Expand All @@ -215,9 +218,6 @@ int main(int argc, char **argv)
assert(0);
}

g_do_shutdown = true;
pthread_join(progress_thread, NULL);

sem_destroy(&sem);

rc = crt_finalize();
Expand Down
11 changes: 6 additions & 5 deletions src/tests/ftest/cart/rpc_test_srv.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* (C) Copyright 2017-2021 Intel Corporation.
* (C) Copyright 2026 Hewlett Packard Enterprise Development LP
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -222,16 +223,16 @@ srv_rpc_finalize(void)
rc = crt_group_rank(NULL, &myrank);
D_ASSERTF(rc == 0, "crt_group_rank failed %d\n", rc);

if (rpc_srv.target_multitier_grp != NULL) {
rc = crt_group_detach(rpc_srv.target_multitier_grp);
D_ASSERTF(rc == 0, "crt_group_detach failed %d\n", rc);
}

dbg("main thread wait progress thread ...\n");

if (rpc_srv.progress_thid)
pthread_join(rpc_srv.progress_thid, NULL);

if (rpc_srv.target_multitier_grp != NULL) {
rc = crt_group_detach(rpc_srv.target_multitier_grp);
D_ASSERTF(rc == 0, "crt_group_detach failed %d\n", rc);
}

rc = crt_context_destroy(rpc_srv.crt_ctx, 1);
D_ASSERTF(rc == 0, "crt_context_destroy failed %d\n", rc);

Expand Down
12 changes: 6 additions & 6 deletions src/tests/ftest/cart/test_ep_cred_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,12 @@ test_run()
crtu_sem_timedwait(&test.tg_token_to_proceed, 61, __LINE__);
}

crtu_progress_stop();

rc = pthread_join(test.tg_tid, NULL);
D_ASSERTF(rc == 0, "pthread_join failed. rc: %d\n", rc);
DBG_PRINT("joined progress thread.\n");

d_rank_list_free(rank_list);
rank_list = NULL;

Expand All @@ -158,12 +164,6 @@ test_run()
"crt_group_view_destroy() failed; rc=%d\n", rc);
}

crtu_progress_stop();

rc = pthread_join(test.tg_tid, NULL);
D_ASSERTF(rc == 0, "pthread_join failed. rc: %d\n", rc);
DBG_PRINT("joined progress thread.\n");

rc = sem_destroy(&test.tg_token_to_proceed);
D_ASSERTF(rc == 0, "sem_destroy() failed.\n");

Expand Down
15 changes: 7 additions & 8 deletions src/tests/ftest/cart/test_multisend_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ test_run()
}
}

crtu_progress_stop();

for (i = 0; i < test.tg_num_ctx; i++) {
rc = pthread_join(test.tg_tid[i], NULL);
D_ASSERTF(rc == 0, "pthread_join failed. rc: %d\n", rc);
}
D_DEBUG(DB_TRACE, "joined progress threads.\n");
d_rank_list_free(rank_list);
rank_list = NULL;

Expand All @@ -236,14 +243,6 @@ test_run()
D_ASSERTF(rc == 0, "crt_group_view_destroy() failed; rc=%d\n", rc);
}

crtu_progress_stop();

for (i = 0; i < test.tg_num_ctx; i++) {
rc = pthread_join(test.tg_tid[i], NULL);
D_ASSERTF(rc == 0, "pthread_join failed. rc: %d\n", rc);
}
D_DEBUG(DB_TRACE, "joined progress threads.\n");

rc = sem_destroy(&test.tg_token_to_proceed);
D_ASSERTF(rc == 0, "sem_destroy() failed.\n");

Expand Down
14 changes: 7 additions & 7 deletions src/tests/ftest/cart/test_no_timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ test_run(void)
}
}

crtu_progress_stop();

rc = pthread_join(test_g.t_tid[0], NULL);
if (rc != 0)
fprintf(stderr, "pthread_join failed. rc: %d\n", rc);
D_DEBUG(DB_TEST, "joined progress thread.\n");

d_rank_list_free(rank_list);
rank_list = NULL;

Expand All @@ -145,13 +152,6 @@ test_run(void)
"crt_group_view_destroy() failed; rc=%d\n", rc);
}

crtu_progress_stop();

rc = pthread_join(test_g.t_tid[0], NULL);
if (rc != 0)
fprintf(stderr, "pthread_join failed. rc: %d\n", rc);
D_DEBUG(DB_TEST, "joined progress thread.\n");

rc = sem_destroy(&test_g.t_token_to_proceed);
D_ASSERTF(rc == 0, "sem_destroy() failed.\n");

Expand Down
12 changes: 6 additions & 6 deletions src/tests/ftest/cart/test_proto_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ test_run()
crtu_sem_timedwait(&test.tg_token_to_proceed, 61, __LINE__);
}

crtu_progress_stop();

rc = pthread_join(test.tg_tid, NULL);
D_ASSERTF(rc == 0, "pthread_join failed. rc: %d\n", rc);
D_DEBUG(DB_TRACE, "joined progress thread.\n");

d_rank_list_free(rank_list);
rank_list = NULL;

Expand All @@ -176,12 +182,6 @@ test_run()
"crt_group_view_destroy() failed; rc=%d\n", rc);
}

crtu_progress_stop();

rc = pthread_join(test.tg_tid, NULL);
D_ASSERTF(rc == 0, "pthread_join failed. rc: %d\n", rc);
D_DEBUG(DB_TRACE, "joined progress thread.\n");

rc = sem_destroy(&test.tg_token_to_proceed);
D_ASSERTF(rc == 0, "sem_destroy() failed.\n");

Expand Down
Loading