From: Arlin Davis Date: Tue, 5 Apr 2016 21:00:33 +0000 (-0700) Subject: dapltest: cleanup warnings, unused variables, etc X-Git-Tag: dapl-2.1.9-1~8 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=b361e2abfcb09b57a1cff57b2a1eb919e00149db;p=~ardavis%2Fdapl.git dapltest: cleanup warnings, unused variables, etc Signed-off-by: Arlin Davis --- diff --git a/test/dapltest/cmd/dapl_performance_cmd.c b/test/dapltest/cmd/dapl_performance_cmd.c index de38abf..b6049af 100644 --- a/test/dapltest/cmd/dapl_performance_cmd.c +++ b/test/dapltest/cmd/dapl_performance_cmd.c @@ -282,7 +282,7 @@ void DT_Performance_Cmd_Print(Performance_Cmd_t * cmd) DT_Mdep_printf("-------------------------------------\n"); DT_Mdep_printf("PerfCmd.server_name : %s\n", cmd->server_name); - DT_Mdep_printf("PerfCmd.server_port_number : %d\n", + DT_Mdep_printf("PerfCmd.server_port_number : %lu\n", cmd->port); DT_Mdep_printf("PerfCmd.dapl_name : %s\n", cmd->dapl_name); diff --git a/test/dapltest/cmd/dapl_quit_cmd.c b/test/dapltest/cmd/dapl_quit_cmd.c index ba8e708..8711a5c 100644 --- a/test/dapltest/cmd/dapl_quit_cmd.c +++ b/test/dapltest/cmd/dapl_quit_cmd.c @@ -136,5 +136,5 @@ void DT_Quit_Cmd_Print(Quit_Cmd_t * cmd) { DT_Mdep_printf("Quit_Cmd.server_name: %s\n", cmd->server_name); DT_Mdep_printf("Quit_Cmd.device_name: %s\n", cmd->device_name); - DT_Mdep_printf("Quit_Cmd.port: %s\n", cmd->port); + DT_Mdep_printf("Quit_Cmd.port: %lu\n", cmd->port); } diff --git a/test/dapltest/cmd/dapl_server_cmd.c b/test/dapltest/cmd/dapl_server_cmd.c index 219b8de..a7fdea5 100644 --- a/test/dapltest/cmd/dapl_server_cmd.c +++ b/test/dapltest/cmd/dapl_server_cmd.c @@ -117,5 +117,5 @@ void DT_Server_Cmd_Print(Server_Cmd_t * Server_Cmd) { DT_Mdep_printf("Server_Cmd.debug: %d\n", Server_Cmd->debug); DT_Mdep_printf("Server_Cmd.dapl_name: %s\n", Server_Cmd->dapl_name); - DT_Mdep_printf("Server_Cmd.port: %d\n", Server_Cmd->port); + DT_Mdep_printf("Server_Cmd.port: %lu\n", Server_Cmd->port); } diff --git a/test/dapltest/cmd/dapl_transaction_cmd.c b/test/dapltest/cmd/dapl_transaction_cmd.c index 80b493d..7f1800b 100644 --- a/test/dapltest/cmd/dapl_transaction_cmd.c +++ b/test/dapltest/cmd/dapl_transaction_cmd.c @@ -422,7 +422,7 @@ void DT_Transaction_Cmd_Print(Transaction_Cmd_t * cmd) DT_Mdep_printf("-------------------------------------\n"); DT_Mdep_printf("TransCmd.server_name : %s\n", cmd->server_name); - DT_Mdep_printf("TransCmd.server_port_number : %d\n", + DT_Mdep_printf("TransCmd.server_port_number : %lu\n", cmd->port); DT_Mdep_printf("TransCmd.num_iterations : %d\n", cmd->num_iterations); diff --git a/test/dapltest/include/dapl_fft_util.h b/test/dapltest/include/dapl_fft_util.h index 17675cf..7b22e7e 100644 --- a/test/dapltest/include/dapl_fft_util.h +++ b/test/dapltest/include/dapl_fft_util.h @@ -38,14 +38,12 @@ else { \ DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \ DT_Tdep_PT_Printf(test_num,"Error = %d, %s\n", rc, DT_RetToString(rc)); \ - res = 0; \ goto cleanup; \ } #define DT_assert(test_num, x) if(x) ; \ else { \ DT_assert_fail(test_num, #x, __FILE__, __BASE_FILE__, __LINE__); \ - res = 0; \ goto cleanup; \ } diff --git a/test/dapltest/include/dapl_proto.h b/test/dapltest/include/dapl_proto.h index fb5a293..0e1038c 100644 --- a/test/dapltest/include/dapl_proto.h +++ b/test/dapltest/include/dapl_proto.h @@ -123,6 +123,10 @@ void DT_transaction_stats_set_ready (DT_Tdep_Print_Head* phead, void DT_transaction_stats2_set_ready (DT_Tdep_Print_Head* phead, Transaction_Stats_t* transaction_stats); +void DT_transaction_stats_reset_wait_count(DT_Tdep_Print_Head * phead, + Transaction_Stats_t * transaction_stats, + unsigned int num); + bool DT_transaction_stats_wait_for_all (DT_Tdep_Print_Head* phead, Transaction_Stats_t* transaction_stats); diff --git a/test/dapltest/mdep/linux/dapl_mdep_user.c b/test/dapltest/mdep/linux/dapl_mdep_user.c index d2b45bd..9dd40e3 100644 --- a/test/dapltest/mdep/linux/dapl_mdep_user.c +++ b/test/dapltest/mdep/linux/dapl_mdep_user.c @@ -433,11 +433,9 @@ int DT_Mdep_wait_object_init(IN DT_WAIT_OBJECT * wait_obj) int DT_Mdep_wait_object_wait(IN DT_WAIT_OBJECT * wait_obj, IN int timeout_val) { - int dat_status; int pthread_status; struct timespec future; - dat_status = 0; pthread_status = 0; if (timeout_val != DAT_TIMEOUT_INFINITE) { diff --git a/test/dapltest/mdep/linux/dapl_mdep_user.h b/test/dapltest/mdep/linux/dapl_mdep_user.h index 772f2dd..2eeed91 100755 --- a/test/dapltest/mdep/linux/dapl_mdep_user.h +++ b/test/dapltest/mdep/linux/dapl_mdep_user.h @@ -203,6 +203,6 @@ do { \ /* * Release processor to reschedule */ -#define DT_Mdep_yield pthread_yield +#define DT_Mdep_yield sched_yield #endif diff --git a/test/dapltest/test/dapl_bpool.c b/test/dapltest/test/dapl_bpool.c index e06f2fc..9ee32f7 100644 --- a/test/dapltest/test/dapl_bpool.c +++ b/test/dapltest/test/dapl_bpool.c @@ -246,17 +246,8 @@ DT_Bpool_Destroy(Per_Test_Data_t * pt_ptr, if (bpool_ptr) { if (bpool_ptr->alloc_ptr) { if (bpool_ptr->rmr_handle) { - DAT_LMR_TRIPLET iov; - DAT_RMR_COOKIE cookie; DAT_RETURN ret; - iov.virtual_address = bpool_ptr->reg_addr; - iov.segment_length = 0; /* un-bind */ - iov.lmr_context = bpool_ptr->lmr_context; - cookie.as_64 = (DAT_UINT64) 0UL; - cookie.as_ptr = - (DAT_PVOID) (uintptr_t) bpool_ptr->reg_addr; - /* * Do not attempt to unbind here. The remote node * is going through the same logic and may disconnect diff --git a/test/dapltest/test/dapl_fft_mem.c b/test/dapltest/test/dapl_fft_mem.c index 4a89d4e..dda9545 100644 --- a/test/dapltest/test/dapl_fft_mem.c +++ b/test/dapltest/test/dapl_fft_mem.c @@ -47,7 +47,6 @@ int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag) int res; DAT_VLEN buffer_size; DAT_IA_HANDLE ia_handle; - DAT_PZ_HANDLE pz_handle; DT_Tdep_Print_Head *phead; phead = params_ptr->phead; rc = 0; @@ -58,7 +57,6 @@ int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag) reg_addr = 0; alloc_ptr = 0; ia_handle = 0; - pz_handle = 0; DT_fft_init_client(params_ptr, cmd, &conn); DT_assert(phead, NULL != conn.ia_handle); @@ -78,10 +76,6 @@ int DT_mem_generic(Params_t * params_ptr, FFT_Cmd_t * cmd, int flag) ia_handle = conn.ia_handle; - if (flag != 3) { - pz_handle = conn.pz_handle; - } - if (flag != 4) { DT_Tdep_PT_Printf(phead, "Registering memory\n"); rc = DT_Tdep_lmr_create(ia_handle, DAT_MEM_TYPE_VIRTUAL, region, buffer_size, conn.pz_handle, DAT_MEM_PRIV_ALL_FLAG, &lmr_handle, &lmr_context, NULL, /* FIXME */ diff --git a/test/dapltest/test/dapl_fft_pz.c b/test/dapltest/test/dapl_fft_pz.c index 77f818b..8faa359 100644 --- a/test/dapltest/test/dapl_fft_pz.c +++ b/test/dapltest/test/dapl_fft_pz.c @@ -39,7 +39,6 @@ int DT_pz_case0(Params_t * params_ptr, FFT_Cmd_t * cmd) char *dev_name; DAT_IA_HANDLE ia_handle; DAT_PZ_HANDLE pz_handle; - DAT_EVD_HANDLE evd_handle; DAT_RETURN rc; int res; DT_Tdep_Print_Head *phead; @@ -51,7 +50,6 @@ int DT_pz_case0(Params_t * params_ptr, FFT_Cmd_t * cmd) res = 1; ia_handle = 0; pz_handle = 0; - evd_handle = DAT_HANDLE_NULL; dev_name = cmd->device_name; rc = DT_ia_open(dev_name, &ia_handle); diff --git a/test/dapltest/test/dapl_fft_util.c b/test/dapltest/test/dapl_fft_util.c index 5afd9fb..e89e5cb 100644 --- a/test/dapltest/test/dapl_fft_util.c +++ b/test/dapltest/test/dapl_fft_util.c @@ -144,7 +144,6 @@ void DT_fft_init_conn_struct(FFT_Connection_t * conn) void DT_fft_init_client(Params_t * params_ptr, FFT_Cmd_t * cmd, FFT_Connection_t * conn) { - int res; DAT_RETURN rc = 0; DT_Tdep_Print_Head *phead; phead = params_ptr->phead; @@ -248,7 +247,6 @@ int DT_fft_destroy_conn_struct(Params_t * params_ptr, FFT_Connection_t * conn) void DT_fft_init_server(Params_t * params_ptr, FFT_Cmd_t * cmd, FFT_Connection_t * conn) { - int res; DAT_RETURN rc = 0; DT_Tdep_Print_Head *phead; phead = params_ptr->phead; @@ -290,7 +288,6 @@ void DT_fft_init_server(Params_t * params_ptr, FFT_Cmd_t * cmd, /* helper function that allows a server to listen for a connection */ void DT_fft_listen(Params_t * params_ptr, FFT_Connection_t * conn) { - int res; DAT_RETURN rc = 0; DT_Tdep_Print_Head *phead; phead = params_ptr->phead; @@ -320,7 +317,6 @@ void DT_fft_listen(Params_t * params_ptr, FFT_Connection_t * conn) int DT_fft_connect(Params_t * params_ptr, FFT_Connection_t * conn) { int wait_count; - int res; DAT_RETURN rc = 0; DT_Tdep_Print_Head *phead; phead = params_ptr->phead; diff --git a/test/dapltest/test/dapl_performance_client.c b/test/dapltest/test/dapl_performance_client.c index 169a212..62fcce1 100644 --- a/test/dapltest/test/dapl_performance_client.c +++ b/test/dapltest/test/dapl_performance_client.c @@ -42,7 +42,6 @@ DT_Performance_Test_Client(Params_t * params_ptr, Performance_Test_t *test_ptr = NULL; int connected = 1; DT_Tdep_Print_Head *phead; - DAT_RETURN rc; phead = pt_ptr->Params.phead; @@ -275,7 +274,6 @@ DT_Performance_Test_Client_Phase2(DT_Tdep_Print_Head * phead, Performance_Test_Op_t *op; DT_Mdep_TimeStamp pre_ts; DT_Mdep_TimeStamp post_ts; - unsigned long int bytes; unsigned int i; /* @@ -286,8 +284,6 @@ DT_Performance_Test_Client_Phase2(DT_Tdep_Print_Head * phead, op = &ep_context->op; iov = DT_Bpool_GetIOV(op->bp, 0); - bytes = op->seg_size * op->num_segs; - /* Prep the inputs */ for (i = 0; i < op->num_segs; i++) { iov[i].virtual_address = (DAT_VADDR) (uintptr_t) diff --git a/test/dapltest/test/dapl_test_util.c b/test/dapltest/test/dapl_test_util.c index f649b28..89b60b6 100644 --- a/test/dapltest/test/dapl_test_util.c +++ b/test/dapltest/test/dapl_test_util.c @@ -239,10 +239,6 @@ DT_cr_event_wait(DT_Tdep_Print_Head * phead, DAT_EVD_HANDLE evd_handle, DAT_CR_ARRIVAL_EVENT_DATA * cr_stat_p) { - int err_cnt; - - err_cnt = 0; - for (;;) { DAT_RETURN ret; DAT_EVENT event; @@ -415,7 +411,7 @@ DT_dto_event_poll(DT_Tdep_Print_Head * phead, DAT_EVD_HANDLE evd_handle, DAT_DTO_COMPLETION_EVENT_DATA * dto_statusp) { - for (;;DT_Mdep_yield()) { + do { DAT_RETURN ret; DAT_EVENT event; @@ -450,7 +446,8 @@ DT_dto_event_poll(DT_Tdep_Print_Head * phead, DT_Tdep_PT_Printf(phead, "Warning: dto_event_poll swallowing %s event\n", DT_EventToSTr(event.event_number)); - } + + } while (!DT_Mdep_yield()); return (false); }