[ofa-general] [PATCH 2/5] [DAPL] dapl/dapltest: sync OFED and WinOF code
Sean Hefty
sean.hefty at intel.com
Fri Jan 30 10:54:30 PST 2009
From: Stan Smith <stan.smith at intel.com>
Several changes have been made to dapltest on the WinOF tree that
are not available to OFED. Resync dapltest to return to a common
codebase. Main features are:
Add return codes to various functions.
Add batch file for Windows testing.
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
Actual changes are from previous work done by Stan. I'm simply
resync'ing the code.
test/dapltest/cmd/dapl_main.c | 11 ++-
test/dapltest/common/dapl_endian.c | 1
test/dapltest/dapltest.rc | 50 ------------
test/dapltest/dirs | 1
test/dapltest/include/dapl_execute.h | 2
test/dapltest/include/dapl_proto.h | 14 ++-
test/dapltest/include/dapl_tdep.h | 2
test/dapltest/makefile.wnd | 7 --
test/dapltest/mdep/windows/dapl_mdep_user.c | 7 +-
test/dapltest/mdep/windows/dapl_mdep_user.h | 2
test/dapltest/scripts/dt-cli.bat | 101 ++++++++++++++++++++++---
test/dapltest/test/dapl_client.c | 94 +++++++++++++----------
test/dapltest/test/dapl_execute.c | 22 +++--
test/dapltest/test/dapl_fft_test.c | 5 +
test/dapltest/test/dapl_limit.c | 107 ++++++++++++++------------
test/dapltest/test/dapl_performance_client.c | 5 +
test/dapltest/test/dapl_transaction_test.c | 21 +----
test/dapltest/udapl/udapl_tdep.c | 4 -
test/dapltest/windows/SOURCES | 33 ++++++++
test/dapltest/windows/dapltest.rc | 50 ++++++++++++
test/dapltest/windows/makefile | 7 ++
21 files changed, 338 insertions(+), 208 deletions(-)
diff --git a/test/dapltest/cmd/dapl_main.c b/test/dapltest/cmd/dapl_main.c
index b6be403..c562375 100644
--- a/test/dapltest/cmd/dapl_main.c
+++ b/test/dapltest/cmd/dapl_main.c
@@ -45,6 +45,7 @@ int
dapltest (int argc, char *argv[])
{
Params_t *params_ptr;
+ DAT_RETURN rc=DAT_SUCCESS;
/* check memory leaking */
/*
@@ -97,7 +98,7 @@ dapltest (int argc, char *argv[])
}
params_ptr->cpu_mhz = DT_Mdep_GetCpuMhz ();
/* call the test-dependent code for invoking the actual test */
- DT_Tdep_Execute_Test (params_ptr);
+ rc = DT_Tdep_Execute_Test (params_ptr);
/* cleanup */
@@ -116,7 +117,7 @@ dapltest (int argc, char *argv[])
* alloc_count); DT_Mdep_LockDestroy(&Alloc_Count_Lock);
*/
- return ( 0 );
+ return ( rc );
}
@@ -124,7 +125,7 @@ void
Dapltest_Main_Usage (void)
{
DT_Mdep_printf ("USAGE:\n");
- DT_Mdep_printf ("USAGE: dapltest -T <Test_Type> [test-specific args]\n");
+ DT_Mdep_printf ("USAGE: dapltest -T <Test_Type> [-D IA_name] [test-specific args]\n");
DT_Mdep_printf ("USAGE: where <Test_Type>\n");
DT_Mdep_printf ("USAGE: S = Run as a server\n");
DT_Mdep_printf ("USAGE: T = Transaction Test\n");
@@ -133,7 +134,9 @@ Dapltest_Main_Usage (void)
DT_Mdep_printf ("USAGE: L = Limit Test\n");
DT_Mdep_printf ("USAGE: F = FFT Test\n");
DT_Mdep_printf ("USAGE:\n");
- DT_Mdep_printf ("NOTE:\tRun as server taking defaults (dapltest -T S)\n");
+ DT_Mdep_printf ("USAGE: -D Interface_Adapter {default ibnic0v2}\n");
+ DT_Mdep_printf ("USAGE:\n");
+ DT_Mdep_printf ("NOTE:\tRun as server taking defaults (dapltest -T S [-D ibnic0v2])\n");
DT_Mdep_printf ("NOTE: dapltest\n");
DT_Mdep_printf ("NOTE:\n");
DT_Mdep_printf ("NOTE:\tdapltest arguments may be supplied in a script file\n");
diff --git a/test/dapltest/common/dapl_endian.c b/test/dapltest/common/dapl_endian.c
index 84ff573..5c1846f 100644
--- a/test/dapltest/common/dapl_endian.c
+++ b/test/dapltest/common/dapl_endian.c
@@ -94,6 +94,7 @@ DAT_UINT64
DT_EndianMemAddress (DAT_UINT64 val)
{
DAT_UINT64 val64;
+
if (DT_local_is_little_endian)
return val;
val64 = val;
diff --git a/test/dapltest/dapltest.rc b/test/dapltest/dapltest.rc
deleted file mode 100644
index 09fef62..0000000
--- a/test/dapltest/dapltest.rc
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2007 Intel Corporation. All rights reserved.
- *
- * This software is available to you under the OpenIB.org BSD license
- * below:
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * - Redistributions of source code must retain the above
- * copyright notice, this list of conditions and the following
- * disclaimer.
- *
- * - Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- * $Id$
- */
-
-
-#include <oib_ver.h>
-
-#define VER_FILETYPE VFT_APP
-#define VER_FILESUBTYPE VFT2_UNKNOWN
-
-#if DBG
-#define VER_FILEDESCRIPTION_STR "DAPL/DAT[2.0] test Application (Debug)"
-#define VER_INTERNALNAME_STR "dapl2testd.exe"
-#define VER_ORIGINALFILENAME_STR "dapl2testd.exe"
-
-#else
-#define VER_FILEDESCRIPTION_STR "DAPL/DAT[2.0] test Application"
-#define VER_INTERNALNAME_STR "dapl2test.exe"
-#define VER_ORIGINALFILENAME_STR "dapl2test.exe"
-
-#endif
-
-#include <common.ver>
diff --git a/test/dapltest/dirs b/test/dapltest/dirs
new file mode 100644
index 0000000..f3b2bb0
--- /dev/null
+++ b/test/dapltest/dirs
@@ -0,0 +1 @@
+dirs = windows
diff --git a/test/dapltest/include/dapl_execute.h b/test/dapltest/include/dapl_execute.h
index a5992f2..eb2d54a 100644
--- a/test/dapltest/include/dapl_execute.h
+++ b/test/dapltest/include/dapl_execute.h
@@ -34,7 +34,7 @@
#include "dapl_proto.h"
#include "dapl_params.h"
-void
+DAT_RETURN
DT_Execute_Test ( Params_t *params_ptr ) ;
#endif
diff --git a/test/dapltest/include/dapl_proto.h b/test/dapltest/include/dapl_proto.h
index 9de42e2..d8be354 100644
--- a/test/dapltest/include/dapl_proto.h
+++ b/test/dapltest/include/dapl_proto.h
@@ -67,6 +67,8 @@
#include "dapl_transaction_stats.h"
#include "dapl_version.h"
+#define DAT_ERROR(Type,SubType) ((DAT_RETURN)(DAT_CLASS_ERROR | Type | SubType))
+
/*
* Prototypes
*/
@@ -101,7 +103,7 @@ int get_ep_connection_state (DT_Tdep_Print_Head* phead,
DAT_EP_HANDLE ep_handle);
/* dapl_client.c */
-void DT_cs_Client (Params_t * params_ptr,
+DAT_RETURN DT_cs_Client (Params_t * params_ptr,
char *dapl_name,
char *server_name,
DAT_UINT32 total_threads);
@@ -237,7 +239,7 @@ void DT_Performance_Cmd_PT_Print (DT_Tdep_Print_Head* phead,
void DT_Performance_Cmd_Endian (Performance_Cmd_t * cmd);
/* dapl_performance_client.c */
-void DT_Performance_Test_Client ( Params_t *params_ptr,
+DAT_RETURN DT_Performance_Test_Client ( Params_t *params_ptr,
Per_Test_Data_t * pt_ptr,
DAT_IA_HANDLE * ia_handle,
DAT_IA_ADDRESS_PTR remote);
@@ -249,7 +251,7 @@ bool DT_Performance_Test_Client_Connect (
bool DT_Performance_Test_Client_Exchange (
Params_t *params_ptr,
DT_Tdep_Print_Head *phead,
- Performance_Test_t *test_ptr);
+ Performance_Test_t *test_ptr );
/* dapl_performance_server.c */
void DT_Performance_Test_Server (void * pt_ptr);
@@ -467,7 +469,7 @@ void DT_Transaction_Cmd_PT_Print (DT_Tdep_Print_Head* phead,
void DT_Transaction_Cmd_Endian (Transaction_Cmd_t * cmd,
bool to_wire);
/* dapl_transaction_test.c */
-void DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
+DAT_RETURN DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
DAT_IA_HANDLE ia_handle,
DAT_IA_ADDRESS_PTR remote);
@@ -557,7 +559,7 @@ bool DT_Limit_Cmd_Parse ( Limit_Cmd_t * cmd,
void DT_Limit_Cmd_Usage (void);
/* dapl_limit.c */
-void DT_cs_Limit (Params_t *params, Limit_Cmd_t * cmd);
+DAT_RETURN DT_cs_Limit (Params_t *params, Limit_Cmd_t * cmd);
/* dapl_fft_cmd.c */
void DT_FFT_Cmd_Init ( FFT_Cmd_t * cmd);
@@ -570,7 +572,7 @@ bool DT_FFT_Cmd_Parse ( FFT_Cmd_t * cmd,
void DT_FFT_Cmd_Usage (void);
/* dapl_fft_test.c */
-void DT_cs_FFT (Params_t *params, FFT_Cmd_t * cmd);
+DAT_RETURN DT_cs_FFT (Params_t *params, FFT_Cmd_t * cmd);
/* dapl_fft_hwconn.c */
void DT_hwconn_test (Params_t *params_ptr, FFT_Cmd_t *cmd);
diff --git a/test/dapltest/include/dapl_tdep.h b/test/dapltest/include/dapl_tdep.h
index bf314c3..ccddce5 100644
--- a/test/dapltest/include/dapl_tdep.h
+++ b/test/dapltest/include/dapl_tdep.h
@@ -44,7 +44,7 @@ DT_Tdep_Init ( void ) ;
void
DT_Tdep_End ( void ) ;
-void
+DAT_RETURN
DT_Tdep_Execute_Test ( Params_t *params_ptr ) ;
DAT_RETURN
diff --git a/test/dapltest/makefile.wnd b/test/dapltest/makefile.wnd
deleted file mode 100644
index e26e1c0..0000000
--- a/test/dapltest/makefile.wnd
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
-# file to this component. This file merely indirects to the real make file
-# that is shared by all the driver components of the OpenIB Windows project.
-#
-
-!INCLUDE ..\..\..\..\inc\openib.def
diff --git a/test/dapltest/mdep/windows/dapl_mdep_user.c b/test/dapltest/mdep/windows/dapl_mdep_user.c
index 0b9321c..afc12d3 100644
--- a/test/dapltest/mdep/windows/dapl_mdep_user.c
+++ b/test/dapltest/mdep/windows/dapl_mdep_user.c
@@ -140,7 +140,7 @@ DT_Mdep_GetCpuMhz (
unsigned long
-DT_Mdep_GetContextSwitchNum (void )
+DT_Mdep_GetContextSwitchNum (void)
{
return 0;
}
@@ -273,7 +273,7 @@ DT_Mdep_Thread_Start_Routine (void *thread_handle)
* interface to clean up resources properly at
* thread's end.
*/
-void DT_Mdep_Thread_Detach ( int thread_id ) /* AMM */
+void DT_Mdep_Thread_Detach (DT_Mdep_ThreadHandleType thread_id ) /* AMM */
{
}
@@ -283,9 +283,8 @@ void DT_Mdep_Thread_Detach ( int thread_id ) /* AMM */
* upon themselves.
*/
-int DT_Mdep_Thread_SELF (void) /* AMM */
+DT_Mdep_ThreadHandleType DT_Mdep_Thread_SELF (void) /* AMM */
{
-
return 0;
}
diff --git a/test/dapltest/mdep/windows/dapl_mdep_user.h b/test/dapltest/mdep/windows/dapl_mdep_user.h
index 6dd3f7f..7b7a845 100644
--- a/test/dapltest/mdep/windows/dapl_mdep_user.h
+++ b/test/dapltest/mdep/windows/dapl_mdep_user.h
@@ -48,7 +48,7 @@
# include <ws2tcpip.h>
/* Default Device Name */
-#define DT_MdepDeviceName "ibnic0"
+#define DT_MdepDeviceName "ibnic0v2"
/* Boolean */
typedef int bool;
diff --git a/test/dapltest/scripts/dt-cli.bat b/test/dapltest/scripts/dt-cli.bat
index acd06df..ddf5eaa 100644
--- a/test/dapltest/scripts/dt-cli.bat
+++ b/test/dapltest/scripts/dt-cli.bat
@@ -5,6 +5,15 @@ rem
SETLOCAL
+rem cmd.exe /V:on (delayed environment variable expansion) is required!
+rem restart with /V:on if necessary
+set F=on
+set F=off
+if not "!F!" == "off" (
+ %comspec% /E:on /V:on /C %0 %1 %2 %3 %4
+ exit /B %ERRORLEVEL%
+)
+
rem set DAT_OVERRIDE=D:\dapl2\dat.conf
rem favor DAT 2.0 (dapl2test.exe) over DAT 1.1 (dapltest.exe)
@@ -19,6 +28,7 @@ if "%0" == "dt-cli" (
if EXIST %PF%\dapl2test.exe (
set DT=dapl2test.exe
set D=ibnic0v2
+rem To debug dapl2test - use dapl2testd.exe with ibnic0v2d
goto OK
)
)
@@ -78,55 +88,88 @@ rem client SR 1024 3 -f server SR 256 3 -f
if "%T%" == "conn" (
rem Connectivity test - client sends one buffer with one 4KB segments, one time.
rem add '-d' for debug output.
+ echo Simple Connectivity test
%DT% -T T -s %S% -D %D% -i 1 -t 1 -w 1 client SR 4096 server SR 4096
exit /B
)
if "%T%" == "trans" (
- echo Transaction test - 8192 iterations, 1 thread, SR 4KB buffers
+ echo %T%: Transaction test - 8192 iterations, 1 thread, SR 4KB buffers
%DT% -T T -s %S% -D %D% -i 8192 -t 1 -w 1 client SR 4096 server SR 4096
+ echo Finished %T%: Transaction test - 8192 iterations, 1 thread, SR 4KB buffers
exit /B
)
if "%T%" == "transm" (
- echo Multiple RW, RR, SR transactions, 4096 iterations
+ echo %T%: Multiple RW, RR, SR transactions, 4096 iterations
%DT% -T T -P -t 1 -w 1 -i 4096 -s %S% -D %D% client RW 4096 1 server RW 2048 4 server RR 1024 2 client RR 2048 2 client SR
1024 3 -f server SR 256 3 -f
+ echo Finished %T%: Multiple RW, RR, SR transactions, 4096 iterations
exit /B
)
if "%T%" == "transt" (
- echo Multi-threaded[4] Transaction test - 4096 iterations, 1 thread, SR 4KB buffers
+ echo %T%: Threads[4] Transaction test - 4096 iterations, 1 thread, SR 4KB buffers
%DT% -T T -s %S% -D %D% -i 4096 -t 4 -w 1 client SR 8192 3 server SR 8192 3
+ echo Finished %T%: Threads[4] Transaction test - 4096 iterations, 1 thread, SR 4KB buffers
exit /B
)
if "%T%" == "transme" (
- echo Multiple endpoints[4] transactions [RW, RR, SR], 4096 iterations
+ echo %T%: 1 Thread Endpoints[4] transactions [RW, RR, SR], 4096 iterations
%DT% -T T -P -t 1 -w 4 -i 4096 -s %S% -D %D% client RW 4096 1 server RW 2048 4 server RR 1024 2 client RR 2048 2 client SR
1024 3 -f server SR 256 3 -f
+ echo Finished %T%: 1 Thread Endpoints[4] transactions [RW, RR, SR], 4096 iterations
exit /B
)
if "%T%" == "transmet" (
- echo Multiple: threads[2] endpoints[4] transactions[RW, RR, SR], 4096 iterations
+ echo %T%: Threads[2] Endpoints[4] transactions[RW, RR, SR], 4096 iterations
%DT% -T T -P -t 2 -w 4 -i 4096 -s %S% -D %D% client RW 4096 1 server RW 2048 4 server RR 1024 2 client RR 2048 2 client SR
1024 3 -f server SR 256 3 -f
+ echo Finished %T%: Threads[2] Endpoints[4] transactions[RW, RR, SR], 4096 iterations
exit /B
)
if "%T%" == "transmete" (
- echo Multiple: threads[4] endpoints[4] transactions[RW, RR, SR], 8192 iterations
+ echo %T%: Threads[4] Endpoints[4] transactions[RW, RR, SR], 8192 iterations
%DT% -T T -P -t 2 -w 4 -i 8192 -s %S% -D %D% client RW 4096 1 server RW 2048 4 server RR 1024 2 client RR 2048 2 client SR
1024 3 -f server SR 256 3 -f
+ echo Finished %T%: Threads[4] Endpoints[4] transactions[RW, RR, SR], 8192 iterations
+ exit /B
+)
+
+if "%T%" == "EPA" (
+ FOR /L %%j IN (2,1,5) DO (
+ FOR /L %%i IN (1,1,5) DO (
+ echo %T%: Multi: Threads[%%j] Endpoints[%%i] Send/Recv test - 4096 iterations, 3 8K segs
+ %DT% -T T -s %S% -D %D% -i 4096 -t %%j -w %%i client SR 8192 3 server SR 8192 3
+ if ERRORLEVEL 1 exit /B
+ echo %T%: Multi: Threads[%%j] Endpoints[%%i] Send/Recv test - 4096 iterations, 3 8K segs
+ timeout /T 3
+ )
+ )
+ exit /B
+)
+
+if "%T%" == "EP" (
+ set TH=4
+ set EP=5
+ echo %T%: Multi: Threads[!TH!] endpoints[!EP!] Send/Recv test - 4096 iterations, 3 8K segs
+ %DT% -T T -s %S% -D %D% -i 4096 -t !TH! -w !EP! client SR 8192 3 server SR 8192 3
+ echo %T%: Multi: Threads[!TH!] endpoints[!EP!] Send/Recv test - 4096 iterations, 3 8K segs
exit /B
)
if "%T%" == "threads" (
- echo Multi Threaded[6] Send/Recv test - 4096 iterations, 3 8K segs
+ echo %T%: Multi Threaded[6] Send/Recv test - 4096 iterations, 3 8K segs
%DT% -T T -s %S% -D %D% -i 4096 -t 6 -w 1 client SR 8192 3 server SR 8192 3
+ echo Finished %T%: Multi Threaded[6] Send/Recv test - 4096 iterations, 3 8K segs
exit /B
)
if "%T%" == "threadsm" (
- echo Multi: Threads[6] endpoints[6] Send/Recv test - 4096 iterations, 3 8K segs
+ set TH=4
+ set EP=5
+ echo %T%: Multi: Threads[!TH!] endpoints[!EP!] Send/Recv test - 4096 iterations, 3 8K segs
%DT% -T T -s %S% -D %D% -i 4096 -t 6 -w 6 client SR 8192 3 server SR 8192 3
+ echo Finished %T%: Multi: Threads[!TH!] endpoints[!EP!] Send/Recv test - 4096 iterations, 3 8K segs
exit /B
)
@@ -137,18 +180,23 @@ if "%T%" == "perf" (
)
if "%T%" == "rdma-read" (
+ echo %T% 4 32K segs
%DT% -T P -s %S% -D %D% -i 4096 RR 32768 4
+ echo Finished %T% 4 32K segs
exit /B
)
if "%T%" == "rdma-write" (
+ echo %T% 4 32K segs
%DT% -T P -s %S% -D %D% -i 4096 RW 32768 4
+ echo Finished %T% 4 32K segs
exit /B
)
if "%T%" == "bw" (
- echo bandwidth 65K msgs
+ echo bandwidth 4096 iterations of 2 65K mesgs
%DT% -T P -s %S% -D %D% -i 4096 -p 16 -m p RW 65536 2
+ echo Finished bandwidth 4096 iterations of 2 65K mesgs
exit /B
)
@@ -190,43 +238,61 @@ if "%T%" == "regression" (
echo %T% testing in %L% Loops
REM rdma-write, read, perf
FOR /L %%i IN (1,1,%L%) DO (
+
call %0 %1 trans
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 perf
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 threads
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 threadsm
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 transm
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 transt
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 transme
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 transmet
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 transmete
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 rdma-write
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo in Loop %%i
call %0 %1 rdma-read
if ERRORLEVEL 1 exit /B
+ echo in Loop %%i
call %0 %1 bw
if ERRORLEVEL 1 exit /B
- echo %%i %T% loops completed.
+
+ echo in Loop %%i
+ call %0 %1 EP
+ if ERRORLEVEL 1 exit /B
+
+ echo Finished loop %%i, %T% loops completed.
+ timeout /T 4
)
exit /B
)
@@ -245,36 +311,47 @@ if "%T%" == "interop" (
echo %T% testing in %L% Loops
REM test units from Nov-'07 OFA interop event
FOR /L %%i IN (0,1,1) DO (
+ echo %DT% -T T -s %S% -D %D% -i 4096 -t 1 -w 1 -R BE client SR 256 1 server SR 256 1
%DT% -T T -s %S% -D %D% -i 4096 -t 1 -w 1 -R BE client SR 256 1 server SR 256 1
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 1024 3 -f server SR 1536 2 -f
%DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 1024 3 -f server SR 1536 2 -f
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 1024 1 server SR 1024 1
%DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 1024 1 server SR 1024 1
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 1 -w 10 -V -P -R BE client SR 1024 3 server SR 1536 2
%DT% -T T -s %S% -D %D% -i 100 -t 1 -w 10 -V -P -R BE client SR 1024 3 server SR 1536 2
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 256 1 server RW 4096 1 server SR 256 1
%DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 256 1 server RW 4096 1 server SR 256 1
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 256 1 server RR 4096 1 server SR 256 1
%DT% -T T -s %S% -D %D% -i 100 -t 1 -w 1 -V -P -R BE client SR 256 1 server RR 4096 1 server SR 256 1
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 4 -w 8 -V -P -R BE client SR 256 1 server RR 4096 1 server SR 256 1 client SR 256 1
server RR 4096 1 server SR 256 1
%DT% -T T -s %S% -D %D% -i 100 -t 4 -w 8 -V -P -R BE client SR 256 1 server RR 4096 1 server SR 256 1 client SR 256 1
server RR 4096 1 server SR 256 1
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T P -s %S% -D %D% -i 1024 -p 64 -m p RW 8192 2
%DT% -T P -s %S% -D %D% -i 1024 -p 64 -m p RW 8192 2
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T P -s %S% -D %D% -i 1024 -p 64 -m p RW 4096 2
%DT% -T P -s %S% -D %D% -i 1024 -p 64 -m p RW 4096 2
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T P -s %S% -D %D% -i 1024 -p 64 -m p RW 4096 1
%DT% -T P -s %S% -D %D% -i 1024 -p 64 -m p RW 4096 1
if ERRORLEVEL 1 exit /B
timeout /T 3
+ echo %DT% -T T -s %S% -D %D% -i 100 -t 1 -w 10 -V -P -R BE client SR 1024 3 server SR 1536 2
%DT% -T T -s %S% -D %D% -i 100 -t 1 -w 10 -V -P -R BE client SR 1024 3 server SR 1536 2
if ERRORLEVEL 1 exit /B
echo %%i %T% loops completed.
@@ -290,7 +367,9 @@ if "%T%" == "stop" (
echo usage: dt-cli hostname [testname [-D]]
echo where testname
echo stop - request DAPLtest server to exit.
-echo conn - simple connection with limited dater transfer
+echo conn - simple connection test with limited data transfer
+echo EP - Multiple EndPoints(7) and Threads(5) Transactions
+echo EPA - Increment EndPoints[1..5] while increasing threads[1-5]
echo trans - single transaction test
echo transm - transaction test: multiple transactions [RW SND, RDMA]
echo transt - transaction test: multi-threaded
diff --git a/test/dapltest/test/dapl_client.c b/test/dapltest/test/dapl_client.c
index 732c4c6..eaefc3d 100644
--- a/test/dapltest/test/dapl_client.c
+++ b/test/dapltest/test/dapl_client.c
@@ -41,7 +41,7 @@
* Client control routine Connect to the server, send the command across.
* Then start the client-side of the test - creating threads as needed
*/
-void
+DAT_RETURN
DT_cs_Client (Params_t * params_ptr,
char *dapl_name,
char *server_name,
@@ -69,7 +69,7 @@ DT_cs_Client (Params_t * params_ptr,
DAT_DTO_COMPLETION_EVENT_DATA dto_stat;
DAT_EVENT_NUMBER event_num;
unsigned char * buffp;
- DAT_RETURN ret;
+ DAT_RETURN ret, rc;
DT_Tdep_Print_Head *phead;
phead = params_ptr->phead;
@@ -83,7 +83,7 @@ DT_cs_Client (Params_t * params_ptr,
if (!pt_ptr)
{
DT_Tdep_PT_Printf (phead, "%s: no memory for Per_Test_Data\n", module);
- return;
+ return DAT_INSUFFICIENT_RESOURCES;
}
DT_MemListInit (pt_ptr); /* init MemlistLock and memListHead */
DT_Thread_Init (pt_ptr); /* init ThreadLock and threadcount */
@@ -199,6 +199,7 @@ DT_cs_Client (Params_t * params_ptr,
if (!DT_query (pt_ptr, ia_handle, ep_handle) ||
!DT_check_params (pt_ptr, module))
{
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
@@ -218,6 +219,7 @@ DT_cs_Client (Params_t * params_ptr,
DT_Tdep_PT_Printf (phead,
"%s: no memory for command buffer pool.\n",
module);
+ ret = DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,DAT_RESOURCE_MEMORY);
goto client_exit;
}
@@ -238,11 +240,12 @@ retry_repost:
ep_handle,
bpool,
0,
- DT_Bpool_GetBuffSize (bpool, 0)))
+ DT_Bpool_GetBuffSize (bpool, 0)) )
{
DT_Tdep_PT_Printf (phead,
"%s: cannot post Server_Info recv buffer.\n",
module);
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
@@ -284,11 +287,9 @@ retry:
dat_ep_reset (ep_handle);
do
{
-
- ret = DT_Tdep_evd_dequeue ( recv_evd_hdl,
- &event);
+ rc = DT_Tdep_evd_dequeue ( recv_evd_hdl, &event);
drained++;
- } while (DAT_GET_TYPE(ret) != DAT_QUEUE_EMPTY);
+ } while (DAT_GET_TYPE(rc) != DAT_QUEUE_EMPTY);
if (drained > 1 && retry_cnt < MAX_CONN_RETRY)
{
@@ -300,6 +301,7 @@ retry:
goto retry;
}
}
+ ret = DAT_INSUFFICIENT_RESOURCES;
DT_Tdep_PT_Printf (phead, "%s: bad connection event\n", module);
goto client_exit;
}
@@ -328,9 +330,10 @@ retry:
ep_handle,
bpool,
1,
- DT_Bpool_GetBuffSize (bpool, 1)))
+ DT_Bpool_GetBuffSize (bpool, 1)) )
{
DT_Tdep_PT_Printf (phead, "%s: cannot send Client_Info\n", module);
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
/* reap the send and verify it */
@@ -344,8 +347,9 @@ retry:
ep_handle,
DT_Bpool_GetBuffSize (bpool, 1),
dto_cookie,
- "Client_Info_Send"))
+ "Client_Info_Send") )
{
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
@@ -386,6 +390,7 @@ retry:
default:
{
DT_Tdep_PT_Printf (phead, "Unknown Test Type\n");
+ ret = DAT_INVALID_PARAMETER;
goto client_exit;
}
}
@@ -395,9 +400,10 @@ retry:
ep_handle,
bpool,
2,
- DT_Bpool_GetBuffSize (bpool, 2)))
+ DT_Bpool_GetBuffSize (bpool, 2)) )
{
DT_Tdep_PT_Printf (phead, "%s: cannot send Command\n", module);
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
/* reap the send and verify it */
@@ -412,8 +418,9 @@ retry:
ep_handle,
DT_Bpool_GetBuffSize (bpool, 2),
dto_cookie,
- "Client_Cmd_Send"))
+ "Client_Cmd_Send") )
{
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
@@ -427,8 +434,9 @@ retry:
ep_handle,
DT_Bpool_GetBuffSize (bpool, 0),
dto_cookie,
- "Server_Info_Recv"))
+ "Server_Info_Recv") )
{
+ ret = DAT_INSUFFICIENT_RESOURCES;
goto client_exit;
}
@@ -447,6 +455,7 @@ retry:
module,
pt_ptr->Server_Info.dapltest_version,
DAPLTEST_VERSION);
+ ret = DAT_MODEL_NOT_SUPPORTED;
goto client_exit;
}
DT_Tdep_PT_Debug (1,(phead, "%s: Version OK!\n", module));
@@ -467,7 +476,7 @@ retry:
{
DT_Transaction_Cmd_PT_Print (phead, Transaction_Cmd);
}
- DT_Transaction_Test_Client (pt_ptr,
+ ret = DT_Transaction_Test_Client (pt_ptr,
ia_handle,
server_netaddr);
break;
@@ -476,6 +485,7 @@ retry:
case QUIT_TEST:
{
DT_Quit_Cmd_PT_Print (phead, Quit_Cmd);
+ ret = DAT_SUCCESS;
break;
}
@@ -486,7 +496,7 @@ retry:
DT_Performance_Cmd_PT_Print (phead, Performance_Cmd);
}
- DT_Performance_Test_Client (params_ptr,
+ ret = DT_Performance_Test_Client (params_ptr,
pt_ptr,
ia_handle,
server_netaddr);
@@ -496,6 +506,7 @@ retry:
/*********************************************************************
* Done - clean up and go home
+ * ret == function DAT_RETURN return code
*/
client_exit:
DT_Tdep_PT_Debug (1,(phead, "%s: Cleaning Up ...\n", module));
@@ -507,13 +518,13 @@ client_exit:
* graceful attempt might fail because we got here due to
* some error above, so we may as well try harder.
*/
- ret = dat_ep_disconnect (ep_handle, DAT_CLOSE_ABRUPT_FLAG);
- if (ret != DAT_SUCCESS)
+ rc = dat_ep_disconnect (ep_handle, DAT_CLOSE_ABRUPT_FLAG);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_ep_disconnect (abrupt) error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
}
else if (did_connect &&
!DT_disco_event_wait (phead, conn_evd_hdl, NULL))
@@ -535,17 +546,17 @@ client_exit:
*/
do
{
- ret = DT_Tdep_evd_dequeue ( recv_evd_hdl,
+ rc = DT_Tdep_evd_dequeue ( recv_evd_hdl,
&event);
- } while (ret == DAT_SUCCESS);
+ } while (rc == DAT_SUCCESS);
- ret = dat_ep_free (ep_handle);
- if (ret != DAT_SUCCESS)
+ rc = dat_ep_free (ep_handle);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_ep_free error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
/* keep going */
}
}
@@ -553,37 +564,37 @@ client_exit:
/* Free the 3 EVDs */
if (conn_evd_hdl)
{
- ret = DT_Tdep_evd_free (conn_evd_hdl);
- if (ret != DAT_SUCCESS)
+ rc = DT_Tdep_evd_free (conn_evd_hdl);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_evd_free (conn) error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
/* keep going */
}
}
if (reqt_evd_hdl)
{
- ret = DT_Tdep_evd_free (reqt_evd_hdl);
- if (ret != DAT_SUCCESS)
+ rc = DT_Tdep_evd_free (reqt_evd_hdl);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_evd_free (reqt) error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
/* keep going */
}
}
if (recv_evd_hdl)
{
- ret = DT_Tdep_evd_free (recv_evd_hdl);
- if (ret != DAT_SUCCESS)
+ rc = DT_Tdep_evd_free (recv_evd_hdl);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_evd_free (recv) error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
/* keep going */
}
}
@@ -591,13 +602,13 @@ client_exit:
/* Free the PZ */
if (pz_handle)
{
- ret = dat_pz_free (pz_handle);
- if (ret != DAT_SUCCESS)
+ rc = dat_pz_free (pz_handle);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_pz_free error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
/* keep going */
}
}
@@ -606,20 +617,20 @@ client_exit:
if (ia_handle)
{
/* dat_ia_close cleans up async evd handle, too */
- ret = dat_ia_close (ia_handle, DAT_CLOSE_GRACEFUL_FLAG);
- if (ret != DAT_SUCCESS)
+ rc = dat_ia_close (ia_handle, DAT_CLOSE_GRACEFUL_FLAG);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_ia_close (graceful) error: %s\n",
module,
- DT_RetToString (ret));
- ret = dat_ia_close (ia_handle, DAT_CLOSE_ABRUPT_FLAG);
- if (ret != DAT_SUCCESS)
+ DT_RetToString (rc));
+ rc = dat_ia_close (ia_handle, DAT_CLOSE_ABRUPT_FLAG);
+ if (rc != DAT_SUCCESS)
{
DT_Tdep_PT_Printf (phead,
"%s: dat_ia_close (abrupt) error: %s\n",
module,
- DT_RetToString (ret));
+ DT_RetToString (rc));
}
/* keep going */
}
@@ -638,4 +649,5 @@ client_exit:
DT_Tdep_PT_Printf (phead,
"%s: ========== End of Work -- Client Exiting\n",
module);
+ return ret;
}
diff --git a/test/dapltest/test/dapl_execute.c b/test/dapltest/test/dapl_execute.c
index 77b61f2..7987f3f 100644
--- a/test/dapltest/test/dapl_execute.c
+++ b/test/dapltest/test/dapl_execute.c
@@ -35,9 +35,10 @@
#include "dapl_quit_cmd.h"
#include "dapl_limit_cmd.h"
-void
+DAT_RETURN
DT_Execute_Test (Params_t *params_ptr)
{
+ DAT_RETURN rc = DAT_SUCCESS;
Transaction_Cmd_t *Transaction_Cmd;
Quit_Cmd_t *Quit_Cmd;
Limit_Cmd_t *Limit_Cmd;
@@ -58,45 +59,44 @@ DT_Execute_Test (Params_t *params_ptr)
case TRANSACTION_TEST:
{
Transaction_Cmd = ¶ms_ptr->u.Transaction_Cmd;
- DT_cs_Client ( params_ptr,
+ rc = DT_cs_Client ( params_ptr,
Transaction_Cmd->dapl_name,
Transaction_Cmd->server_name,
Transaction_Cmd->num_threads *
- Transaction_Cmd->eps_per_thread);
+ Transaction_Cmd->eps_per_thread );
break;
}
case QUIT_TEST:
{
Quit_Cmd = ¶ms_ptr->u.Quit_Cmd;
- DT_cs_Client ( params_ptr,
+ (void) DT_cs_Client ( params_ptr,
Quit_Cmd->device_name,
Quit_Cmd->server_name,
- 0);
+ 0 );
break;
}
case LIMIT_TEST:
{
Limit_Cmd = ¶ms_ptr->u.Limit_Cmd;
- DT_cs_Limit (params_ptr,
- Limit_Cmd);
+ rc = DT_cs_Limit (params_ptr, Limit_Cmd);
break;
}
case PERFORMANCE_TEST:
{
Performance_Cmd = ¶ms_ptr->u.Performance_Cmd;
- DT_cs_Client ( params_ptr,
+ rc = DT_cs_Client ( params_ptr,
Performance_Cmd->dapl_name,
Performance_Cmd->server_name,
- 1);
+ 1 );
break;
}
case FFT_TEST:
{
FFT_Cmd = ¶ms_ptr->u.FFT_Cmd;
- DT_cs_FFT (params_ptr,
- FFT_Cmd);
+ rc = DT_cs_FFT (params_ptr, FFT_Cmd);
break;
}
}
+ return rc;
}
diff --git a/test/dapltest/test/dapl_fft_test.c b/test/dapltest/test/dapl_fft_test.c
index 05c782a..0a58e13 100644
--- a/test/dapltest/test/dapl_fft_test.c
+++ b/test/dapltest/test/dapl_fft_test.c
@@ -30,10 +30,11 @@
#include "dapl_proto.h"
-void
+DAT_RETURN
DT_cs_FFT (Params_t *params_ptr, FFT_Cmd_t * cmd)
{
DT_Tdep_Print_Head *phead;
+ DAT_RETURN rc = DAT_SUCCESS;
phead = params_ptr->phead;
@@ -85,8 +86,10 @@ DT_cs_FFT (Params_t *params_ptr, FFT_Cmd_t * cmd)
default:
{
DT_Tdep_PT_Printf (phead, "don't know this test\n");
+ rc = DAT_INVALID_PARAMETER;
break;
}
}
+ return rc;
}
diff --git a/test/dapltest/test/dapl_limit.c b/test/dapltest/test/dapl_limit.c
index 133b3e0..78e5f14 100644
--- a/test/dapltest/test/dapl_limit.c
+++ b/test/dapltest/test/dapl_limit.c
@@ -36,13 +36,13 @@
static bool
more_handles (DT_Tdep_Print_Head *phead,
- void **old_ptrptr, /* pointer to current pointer */
+ DAT_HANDLE **old_ptrptr, /* pointer to current pointer */
unsigned int *old_count, /* number pointed to */
unsigned int size) /* size of one datum */
{
unsigned int count = *old_count;
- void *old_handles = *old_ptrptr;
- void *handle_tmp = DT_Mdep_Malloc (count * 2 * size);
+ DAT_HANDLE *old_handles = *old_ptrptr;
+ DAT_HANDLE *handle_tmp = DT_Mdep_Malloc (count * 2 * size);
if (!handle_tmp)
{
@@ -172,8 +172,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
}
OneOpen;
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc (count * sizeof(OneOpen));
- OneOpen *hdlptr = (OneOpen *)hptr;
+ OneOpen *hdlptr = (OneOpen *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
/* IA Exhaustion test loop */
if (hdlptr)
@@ -186,13 +186,14 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, &hptr, &count, sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: IAs opened: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (OneOpen *)hptr;
/* Specify that we want to get back an async EVD. */
hdlptr[w].ia_async_handle = DAT_HANDLE_NULL;
ret = dat_ia_open (cmd->device_name,
@@ -270,8 +271,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many PZs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc (count * sizeof(DAT_PZ_HANDLE));
- DAT_PZ_HANDLE *hdlptr = (DAT_PZ_HANDLE *)hptr;
+ DAT_PZ_HANDLE *hdlptr = (DAT_PZ_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
/* PZ Exhaustion test loop */
if (hdlptr)
@@ -286,13 +287,14 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles(phead, &hptr, &count, sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: PZs created: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (DAT_PZ_HANDLE *)hptr;
ret = dat_pz_create (hdl_sets[w % cmd->width].ia_handle,
&hdlptr[w]);
if (ret != DAT_SUCCESS)
@@ -367,8 +369,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many CNOs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc (count * sizeof(DAT_CNO_HANDLE));
- DAT_CNO_HANDLE *hdlptr = (DAT_CNO_HANDLE *)hptr;
+ DAT_CNO_HANDLE *hdlptr = (DAT_CNO_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
/* CNO Exhaustion test loop */
if (hdlptr)
@@ -383,13 +385,14 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles(phead, &hptr, &count, sizeof (*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: CNOs created: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (DAT_CNO_HANDLE *)hptr;
ret = dat_cno_create (hdl_sets[w % cmd->width].ia_handle,
DAT_OS_WAIT_PROXY_AGENT_NULL,
&hdlptr[w]);
@@ -487,9 +490,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many EVDs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc(count * sizeof(DAT_EVD_HANDLE));
- DAT_EVD_HANDLE *hdlptr = (DAT_EVD_HANDLE *)hptr;
-
+ DAT_EVD_HANDLE *hdlptr = (DAT_EVD_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
DAT_EVD_FLAGS flags = ( DAT_EVD_DTO_FLAG
| DAT_EVD_RMR_BIND_FLAG
| DAT_EVD_CR_FLAG);
@@ -522,13 +524,14 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles(phead, &hptr, &count, sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: EVDs created: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (DAT_EVD_HANDLE *)hptr;
ret = DT_Tdep_evd_create (hdl_sets[w % cmd->width].ia_handle,
DFLT_QLEN,
hdl_sets[w % cmd->width].cno_handle,
@@ -606,8 +609,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many EPs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc(count * sizeof(DAT_EP_HANDLE));
- DAT_EP_HANDLE *hdlptr = (DAT_EP_HANDLE *)hptr;
+ DAT_EP_HANDLE *hdlptr = (DAT_EP_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
/* EP Exhaustion test loop */
if (hdlptr)
@@ -620,13 +623,14 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles(phead, &hptr, &count, sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: EPs created: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (DAT_EP_HANDLE *)hptr;
ret = dat_ep_create (hdl_sets[w % cmd->width].ia_handle,
hdl_sets[w % cmd->width].pz_handle,
hdl_sets[w % cmd->width].evd_handle,
@@ -676,10 +680,10 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many RSPs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc(count * sizeof (DAT_RSP_HANDLE));
- DAT_RSP_HANDLE *hdlptr = (DAT_RSP_HANDLE *)hptr;
- void *eptr = DT_Mdep_Malloc(count * sizeof (DAT_EP_HANDLE));
- DAT_EP_HANDLE *epptr = (DAT_EP_HANDLE *)eptr;
+ DAT_RSP_HANDLE *hdlptr = (DAT_RSP_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
+ DAT_EP_HANDLE *epptr = (DAT_EP_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*epptr));
/* RSP Exhaustion test loop */
if (hdlptr)
@@ -696,21 +700,23 @@ limit_test ( DT_Tdep_Print_Head *phead,
unsigned int count1 = count;
unsigned int count2 = count;
- if (!more_handles(phead, &hptr, &count1, sizeof(*hdlptr)))
+ if (!more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count1,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: RSPs created: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (DAT_RSP_HANDLE *)hptr;
-
- if (!more_handles (phead, &eptr, &count2, sizeof(*epptr)))
+ if (!more_handles (phead, (DAT_HANDLE **) &epptr,
+ &count2,
+ sizeof (*epptr)))
{
DT_Tdep_PT_Printf (phead, "%s: RSPs created: %d\n", module, w);
retval = true;
break;
}
- epptr = (DAT_EP_HANDLE *)eptr;
+
if (count1 != count2)
{
DT_Tdep_PT_Printf (phead, "%s: Mismatch in allocation of handle arrays at point %d\n",
@@ -810,8 +816,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many PSPs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc (count * sizeof (DAT_PSP_HANDLE));
- DAT_PSP_HANDLE *hdlptr = (DAT_PSP_HANDLE *)hptr;
+ DAT_PSP_HANDLE *hdlptr = (DAT_PSP_HANDLE *)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
/* PSP Exhaustion test loop */
if (hdlptr)
@@ -824,13 +830,14 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, &hptr, &count, sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: PSPs created: %d\n", module, w);
retval = true;
break;
}
- hdlptr = (DAT_PSP_HANDLE *)hptr;
ret = dat_psp_create (hdl_sets[w % cmd->width].ia_handle,
CONN_QUAL0 + w,
hdl_sets[w % cmd->width].evd_handle,
@@ -935,8 +942,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* See how many LMRs we can create
*/
unsigned int count = START_COUNT;
- void *hptr = DT_Mdep_Malloc (count * sizeof(Bpool*));
- Bpool **hdlptr = (Bpool **)hptr;
+ Bpool **hdlptr = (Bpool **)
+ DT_Mdep_Malloc (count * sizeof (*hdlptr));
/* LMR Exhaustion test loop */
if (hdlptr)
@@ -949,7 +956,9 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, &hptr, &count, sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: no memory for LMR handles\n",
module);
@@ -957,7 +966,6 @@ limit_test ( DT_Tdep_Print_Head *phead,
retval = true;
break;
}
- hdlptr = (Bpool **)hptr;
/*
* Let BpoolAlloc do the hard work; this means that
* we're testing unique memory registrations rather
@@ -1010,9 +1018,8 @@ limit_test ( DT_Tdep_Print_Head *phead,
* but that should be OK.
*/
unsigned int count = START_COUNT;
- void *hptr =
- DT_Mdep_Malloc(count * cmd->width * sizeof(DAT_LMR_TRIPLET));
- DAT_LMR_TRIPLET *hdlptr = (DAT_LMR_TRIPLET *)hptr;
+ DAT_LMR_TRIPLET *hdlptr = (DAT_LMR_TRIPLET *)
+ DT_Mdep_Malloc (count * cmd->width * sizeof (*hdlptr));
/* Recv-Post Exhaustion test loop */
if (hdlptr)
@@ -1026,8 +1033,9 @@ limit_test ( DT_Tdep_Print_Head *phead,
{
DT_Mdep_Schedule();
if (w == count
- && !more_handles (phead, &hptr, &count,
- cmd->width * sizeof(*hdlptr)))
+ && !more_handles (phead, (DAT_HANDLE **) &hdlptr,
+ &count,
+ cmd->width * sizeof (*hdlptr)))
{
DT_Tdep_PT_Printf (phead, "%s: no memory for IOVs \n",
module);
@@ -1039,7 +1047,6 @@ limit_test ( DT_Tdep_Print_Head *phead,
done = retval = true;
break;
}
- hdlptr = (DAT_LMR_TRIPLET *)hptr;
for (i = 0; i < cmd->width; i++)
{
DAT_LMR_TRIPLET *iovp = &hdlptr[w * cmd->width + i];
@@ -1344,7 +1351,7 @@ clean_up_now:
/*********************************************************************
* Framework to run through all of the limit tests
*/
-void
+DAT_RETURN
DT_cs_Limit (Params_t *params, Limit_Cmd_t * cmd)
{
DT_Tdep_Print_Head *phead;
@@ -1537,11 +1544,11 @@ DT_cs_Limit (Params_t *params, Limit_Cmd_t * cmd)
/* More tests TBS ... */
- return;
+ return DAT_SUCCESS;
error:
DT_Tdep_PT_Printf (phead, "error occurs, can not continue with limit test\n");
DT_Tdep_PT_Printf (phead, "%s\n", star);
- return;
+ return DAT_INSUFFICIENT_RESOURCES;
}
diff --git a/test/dapltest/test/dapl_performance_client.c b/test/dapltest/test/dapl_performance_client.c
index d1dec89..42e8257 100644
--- a/test/dapltest/test/dapl_performance_client.c
+++ b/test/dapltest/test/dapl_performance_client.c
@@ -33,7 +33,7 @@
#define MAX_CONN_RETRY 8
/****************************************************************************/
-void
+DAT_RETURN
DT_Performance_Test_Client (
Params_t *params_ptr,
Per_Test_Data_t *pt_ptr,
@@ -43,6 +43,7 @@ DT_Performance_Test_Client (
Performance_Test_t *test_ptr = NULL;
int connected = 1;
DT_Tdep_Print_Head *phead;
+ DAT_RETURN rc;
phead = pt_ptr->Params.phead;
@@ -85,6 +86,8 @@ DT_Performance_Test_Client (
#endif
DT_Tdep_PT_Debug (1,(phead,"Client: Finished performance test\n"));
+
+ return (connected ? DAT_SUCCESS : DAT_INSUFFICIENT_RESOURCES);
}
diff --git a/test/dapltest/test/dapl_transaction_test.c b/test/dapltest/test/dapl_transaction_test.c
index 82ee6f9..4abda1e 100644
--- a/test/dapltest/test/dapl_transaction_test.c
+++ b/test/dapltest/test/dapl_transaction_test.c
@@ -48,7 +48,7 @@
#define MAX_CONN_RETRY 8
/****************************************************************************/
-void
+DAT_RETURN
DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
DAT_IA_HANDLE ia_handle,
DAT_IA_ADDRESS_PTR remote_ia_addr)
@@ -56,6 +56,7 @@ DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
Transaction_Cmd_t *cmd = &pt_ptr->Params.u.Transaction_Cmd;
unsigned int i;
DT_Tdep_Print_Head *phead;
+ DAT_RETURN rc = DAT_SUCCESS;
phead = pt_ptr->Params.phead;
@@ -77,6 +78,7 @@ DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
remote_ia_addr))
{
DT_Tdep_PT_Printf (phead, "Client: Cannot Create Test!\n");
+ rc = DAT_INSUFFICIENT_RESOURCES;
break;
}
@@ -97,6 +99,7 @@ DT_Transaction_Test_Client (Per_Test_Data_t * pt_ptr,
&pt_ptr->Client_Stats,
cmd->num_threads,
cmd->eps_per_thread);
+ return rc;
}
@@ -1108,9 +1111,6 @@ retry:
*/
success = DT_Transaction_Run (phead, test_ptr);
- /* no sync at end of transaction run, wait before cleanup */
- sleep(1);
-
/*
* Now clean up and go home
*/
@@ -1202,21 +1202,8 @@ test_failure:
if ( test_ptr->ep_context[j].ep_handle == ep_handle )
{
test_ptr->ep_context[j].ep_handle = NULL;
- break;
- }
}
- if (j == test_ptr->cmd->eps_per_thread)
- {
- /* invalid ep_handle returned */
- DT_Tdep_PT_Printf(phead,
- "Test[" F64x "]: disconnect"
- " event with unknown EP=%p "
- " possible duplicate\n",
- test_ptr->base_port,
- ep_handle);
- ep_handle = NULL;
}
-
}
}
else /* !success - QP may be in error state */
diff --git a/test/dapltest/udapl/udapl_tdep.c b/test/dapltest/udapl/udapl_tdep.c
index 9b3c93f..da1269b 100644
--- a/test/dapltest/udapl/udapl_tdep.c
+++ b/test/dapltest/udapl/udapl_tdep.c
@@ -42,10 +42,10 @@ DT_Tdep_End (void)
DT_Mdep_LockDestroy (&g_PerfTestLock); /* For kDAPL, this is done in kdapl_module.c */
}
-void
+DAT_RETURN
DT_Tdep_Execute_Test (Params_t *params_ptr)
{
- DT_Execute_Test (params_ptr);
+ return DT_Execute_Test (params_ptr);
}
DAT_RETURN
diff --git a/test/dapltest/windows/SOURCES b/test/dapltest/windows/SOURCES
new file mode 100644
index 0000000..31570c3
--- /dev/null
+++ b/test/dapltest/windows/SOURCES
@@ -0,0 +1,33 @@
+!if $(FREEBUILD)
+TARGETNAME = dapl2test
+!else
+TARGETNAME = dapl2testd
+!endif
+
+TARGETPATH = ..\..\..\..\..\bin\user\obj$(BUILD_ALT_DIR)
+TARGETTYPE = PROGRAM
+UMTYPE = console
+USE_MSVCRT = 1
+
+SOURCES = \
+ dapltest.rc \
+ ..\dt_cmd.c \
+ ..\dt_test.c \
+ ..\dt_common.c \
+ ..\dt_udapl.c \
+ ..\dt_mdep.c
+
+INCLUDES=..\include;..\mdep\windows;..\..\..\dat\include;%DDK_INC_PATH%
+
+RCOPTIONS=/I..\..\..\..\..\inc;
+
+!if $(FREEBUILD)
+DATLIB = dat2.lib
+!else
+DATLIB = dat2d.lib
+!endif
+
+TARGETLIBS = $(TARGETPATH)\*\$(DATLIB) $(SDK_LIB_PATH)\ws2_32.lib
+
+# XXX do this ASAP - MSC_WARNING_LEVEL= /W3
+MSC_WARNING_LEVEL= /W1
diff --git a/test/dapltest/windows/dapltest.rc b/test/dapltest/windows/dapltest.rc
new file mode 100644
index 0000000..f41ac8b
--- /dev/null
+++ b/test/dapltest/windows/dapltest.rc
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2007 Intel Corporation. All rights reserved.
+ *
+ * This software is available to you under the OpenIB.org BSD license
+ * below:
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * - Redistributions of source code must retain the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials
+ * provided with the distribution.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ *
+ * $Id$
+ */
+
+
+#include <oib_ver.h>
+
+#define VER_FILETYPE VFT_APP
+#define VER_FILESUBTYPE VFT2_UNKNOWN
+
+#if DBG
+#define VER_FILEDESCRIPTION_STR "DAPL/DAT[2.0] test Application (Debug)"
+#define VER_INTERNALNAME_STR "dapl2testd.exe"
+#define VER_ORIGINALFILENAME_STR "dapl2testd.exe"
+
+#else
+#define VER_FILEDESCRIPTION_STR "DAPL/DAT[2.0] test Application"
+#define VER_INTERNALNAME_STR "dapl2test.exe"
+#define VER_ORIGINALFILENAME_STR "dapl2test.exe"
+
+#endif
+
+#include <common.ver>
diff --git a/test/dapltest/windows/makefile b/test/dapltest/windows/makefile
new file mode 100644
index 0000000..d493855
--- /dev/null
+++ b/test/dapltest/windows/makefile
@@ -0,0 +1,7 @@
+#
+# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
+# file to this component. This file merely indirects to the real make file
+# that is shared by all the driver components of the OpenIB Windows project.
+#
+
+!INCLUDE ..\..\..\..\..\inc\openib.def
More information about the general
mailing list