| 1 |
/* |
| 2 |
* Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved. |
| 3 |
* |
| 4 |
* This Software is licensed under one of the following licenses: |
| 5 |
* |
| 6 |
* 1) under the terms of the "Common Public License 1.0" a copy of which is |
| 7 |
* in the file LICENSE.txt in the root directory. The license is also |
| 8 |
* available from the Open Source Initiative, see |
| 9 |
* http://www.opensource.org/licenses/cpl.php. |
| 10 |
* |
| 11 |
* 2) under the terms of the "The BSD License" a copy of which is in the file |
| 12 |
* LICENSE2.txt in the root directory. The license is also available from |
| 13 |
* the Open Source Initiative, see |
| 14 |
* http://www.opensource.org/licenses/bsd-license.php. |
| 15 |
* |
| 16 |
* 3) under the terms of the "GNU General Public License (GPL) Version 2" a |
| 17 |
* copy of which is in the file LICENSE3.txt in the root directory. The |
| 18 |
* license is also available from the Open Source Initiative, see |
| 19 |
* http://www.opensource.org/licenses/gpl-license.php. |
| 20 |
* |
| 21 |
* Licensee has the right to choose one of the above licenses. |
| 22 |
* |
| 23 |
* Redistributions of source code must retain the above copyright |
| 24 |
* notice and one of the license notices. |
| 25 |
* |
| 26 |
* Redistributions in binary form must reproduce both the above copyright |
| 27 |
* notice, one of the license notices in the documentation |
| 28 |
* and/or other materials provided with the distribution. |
| 29 |
*/ |
| 30 |
|
| 31 |
#ifndef __DAPL_TEST_DATA_H__ |
| 32 |
#define __DAPL_TEST_DATA_H__ |
| 33 |
|
| 34 |
#include "dapl_proto.h" |
| 35 |
#include "dapl_bpool.h" |
| 36 |
#include "dapl_client_info.h" |
| 37 |
#include "dapl_transaction_stats.h" |
| 38 |
#include "dapl_memlist.h" |
| 39 |
#include "dapl_params.h" |
| 40 |
#include "dapl_server_info.h" |
| 41 |
|
| 42 |
/* This lock allows the client side to run |
| 43 |
* in a shell script loop without breaking |
| 44 |
* connections. Remove it and due to timing |
| 45 |
* problems on the server side occasionally |
| 46 |
* the server will reject connections. |
| 47 |
*/ |
| 48 |
extern DT_Mdep_LockType g_PerfTestLock; |
| 49 |
|
| 50 |
/* |
| 51 |
* check memory leaking extern int alloc_count ; extern |
| 52 |
* DT_Mdep_LockType Alloc_Count_Lock; |
| 53 |
*/ |
| 54 |
|
| 55 |
typedef struct |
| 56 |
{ |
| 57 |
int NextPortNumber; |
| 58 |
int num_clients; |
| 59 |
DT_Mdep_LockType num_clients_lock; |
| 60 |
DAT_IA_HANDLE ia_handle; |
| 61 |
DAT_PZ_HANDLE pz_handle; |
| 62 |
DAT_EVD_HANDLE recv_evd_hdl; |
| 63 |
DAT_EVD_HANDLE reqt_evd_hdl; |
| 64 |
DAT_EVD_HANDLE conn_evd_hdl; |
| 65 |
DAT_EVD_HANDLE creq_evd_hdl; |
| 66 |
DAT_EVD_HANDLE async_evd_hdl; |
| 67 |
DAT_EVD_HANDLE rmr_evd_hdl; |
| 68 |
DAT_EP_HANDLE ep_handle; |
| 69 |
DAT_PSP_HANDLE psp_handle; |
| 70 |
Bpool *bpool; |
| 71 |
} Per_Server_Data_t; |
| 72 |
|
| 73 |
typedef struct |
| 74 |
{ |
| 75 |
DT_Mdep_LockType MemListLock; |
| 76 |
MemListEntry_t *MemListHead; |
| 77 |
|
| 78 |
DT_Mdep_LockType Thread_counter_lock; |
| 79 |
int Thread_counter; |
| 80 |
Thread *thread; |
| 81 |
|
| 82 |
bool local_is_server; |
| 83 |
Server_Info_t Server_Info; |
| 84 |
Client_Info_t Client_Info; |
| 85 |
Params_t Params; |
| 86 |
DAT_IA_ATTR ia_attr; |
| 87 |
DAT_PROVIDER_ATTR provider_attr; |
| 88 |
DAT_EP_ATTR ep_attr; |
| 89 |
Per_Server_Data_t *ps_ptr; |
| 90 |
Transaction_Stats_t Client_Stats; |
| 91 |
|
| 92 |
/* synchronize the server with the server's spawned test thread. |
| 93 |
* That test thread uses a PSP that only one test at a time can |
| 94 |
* use. If we don't synchronize access between the teardown and |
| 95 |
* creation of that PSP then the client will fail to connect |
| 96 |
* randomly, a symptom that the server is not coordinated with |
| 97 |
* its test threads. Remove this at your own peril, or if you |
| 98 |
* really want your test client to experience rejection on a |
| 99 |
* random but regular basis. |
| 100 |
*/ |
| 101 |
DT_WAIT_OBJECT synch_wait_object; |
| 102 |
int Countdown_Counter; |
| 103 |
|
| 104 |
} Per_Test_Data_t; |
| 105 |
|
| 106 |
#endif |