[WinVerbs] added .rc files to perftests; fixed missing hostname of '-h hostname'...
authorstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 12 Dec 2008 00:42:33 +0000 (00:42 +0000)
committerstansmith <stansmith@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Fri, 12 Dec 2008 00:42:33 +0000 (00:42 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@1783 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

27 files changed:
tests/perftest/rdma_bw/SOURCES
tests/perftest/rdma_bw/rdma_bw.c
tests/perftest/rdma_bw/rdma_bw.rc [new file with mode: 0644]
tests/perftest/rdma_lat/SOURCES
tests/perftest/rdma_lat/rdma_lat.c
tests/perftest/rdma_lat/rdma_lat.rc [new file with mode: 0644]
tests/perftest/read_bw/SOURCES
tests/perftest/read_bw/read_bw.c
tests/perftest/read_bw/read_bw.rc [new file with mode: 0644]
tests/perftest/read_lat/SOURCES
tests/perftest/read_lat/read_lat.c
tests/perftest/read_lat/read_lat.rc [new file with mode: 0644]
tests/perftest/send_bw/SOURCES
tests/perftest/send_bw/send_bw.c
tests/perftest/send_bw/send_bw.rc [new file with mode: 0644]
tests/perftest/send_lat/SOURCES
tests/perftest/send_lat/send_lat.c
tests/perftest/send_lat/send_lat.rc [new file with mode: 0644]
tests/perftest/write_bw/SOURCES
tests/perftest/write_bw/write_bw.c
tests/perftest/write_bw/write_bw.rc [new file with mode: 0644]
tests/perftest/write_bw_postlist/SOURCES
tests/perftest/write_bw_postlist/write_bw_postlist.c
tests/perftest/write_bw_postlist/write_bw_postlist.rc [new file with mode: 0644]
tests/perftest/write_lat/SOURCES
tests/perftest/write_lat/write_lat.c
tests/perftest/write_lat/write_lat.rc [new file with mode: 0644]

index 3cf87d1..d8f5ffc 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       rdma_bw.rc              \\r
        rdma_bw.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index f657b8b..b43d161 100644 (file)
@@ -957,8 +957,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       data.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               data.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/rdma_bw/rdma_bw.rc b/tests/perftest/rdma_bw/rdma_bw.rc
new file mode 100644 (file)
index 0000000..70745e7
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_lat.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA Bandwidth Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA Bandwidth Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_rdma_bw.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_rdma_bw.exe"\r
+\r
+#include <common.ver>\r
index 25da021..1e09419 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       rdma_lat.rc             \\r
        rdma_lat.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index 6ade2b7..15c0ed0 100644 (file)
@@ -1120,11 +1120,16 @@ int main(int argc, char *argv[])
                }
        }
 
-       if (optind == argc - 1)
+       if (optind == argc - 1) {
+               if (!argv[optind]) {
+                       usage(argv[0]);
+                       return 6;
+               }
                data.servername = strdupa(argv[optind]);
+       }
        else if (optind < argc) {
                usage(argv[0]);
-               return 6;
+               return 7;
        }
 
        /*
diff --git a/tests/perftest/rdma_lat/rdma_lat.rc b/tests/perftest/rdma_lat/rdma_lat.rc
new file mode 100644 (file)
index 0000000..96b1955
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_lat.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA Latency Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA Latency Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_rdma_lat.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_rdma_lat.exe"\r
+\r
+#include <common.ver>\r
index 49938d7..63e25c2 100644 (file)
@@ -10,7 +10,8 @@ USE_STL = 1
 USE_NATIVE_EH = 1\r
 USE_IOSTREAM = 1\r
 \r
-SOURCES =                      \\r
+SOURCES =              \\r
+       read_bw.rc      \\r
        read_bw.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index c047947..9ca73bd 100644 (file)
@@ -694,8 +694,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       user_param.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               user_param.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/read_bw/read_bw.rc b/tests/perftest/read_bw/read_bw.rc
new file mode 100644 (file)
index 0000000..2f13152
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_bw.rc 1611 2006-08-20 14:48:55Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA read Bandwidth Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA read Bandwidth Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_read_bw.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_read_bw.exe"\r
+\r
+#include <common.ver>\r
index 584b6cd..f87fc2b 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       read_lat.rc             \\r
        read_lat.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index 936bac9..f99e13c 100644 (file)
@@ -838,8 +838,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       user_param.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               user_param.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/read_lat/read_lat.rc b/tests/perftest/read_lat/read_lat.rc
new file mode 100644 (file)
index 0000000..b35d832
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_bw.rc 1611 2006-08-20 14:48:55Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef _DEBUG_\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA read Latency Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA read Latency Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_read_lat.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_read_lat.exe"\r
+\r
+#include <common.ver>\r
index 86bbd12..9c6eb61 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       send_bw.rc              \\r
        send_bw.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index 82353cb..c128b88 100644 (file)
@@ -1059,8 +1059,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       user_param.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               user_param.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/send_bw/send_bw.rc b/tests/perftest/send_bw/send_bw.rc
new file mode 100644 (file)
index 0000000..192ed11
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: send_bw.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - Send/Recv Bandwidth Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - Send/Recv Bandwidth Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_send_bw.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_send_bw.exe"\r
+\r
+#include <common.ver>\r
index 2db1b9d..a3fc985 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       send_lat.rc             \\r
        send_lat.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index a24f053..9fb3899 100644 (file)
@@ -1105,8 +1105,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       user_param.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               user_param.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/send_lat/send_lat.rc b/tests/perftest/send_lat/send_lat.rc
new file mode 100644 (file)
index 0000000..f70c64d
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: send_lat.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - Send/Recv Latency Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - Send/Recv Latency Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_send_lat.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_send_lat.exe"\r
+\r
+#include <common.ver>\r
index d674026..c0e15cd 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       write_bw.rc             \\r
        write_bw.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index 9ed3e28..eb9a5a2 100644 (file)
@@ -787,8 +787,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       user_param.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               user_param.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/write_bw/write_bw.rc b/tests/perftest/write_bw/write_bw.rc
new file mode 100644 (file)
index 0000000..fc997c6
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_bw.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA write Bandwidth Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA write Bandwidth Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_write_bw.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_write_bw.exe"\r
+\r
+#include <common.ver>\r
index 61fcbc9..c31e756 100644 (file)
@@ -10,7 +10,8 @@ USE_STL = 1
 USE_NATIVE_EH = 1\r
 USE_IOSTREAM = 1\r
 \r
-SOURCES =                      \\r
+SOURCES =                                      \\r
+       write_bw_postlist.rc    \\r
        write_bw_postlist.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index 87903c0..d80a7a5 100644 (file)
@@ -797,8 +797,13 @@ int main(int argc, char *argv[])
                }
        }
 
-       if (optind == argc - 1)
+       if (optind == argc - 1) {
+               if (!argv[optind]) {
+                       usage(argv[0]);
+                       return 1;
+               }
                user_param.servername = strdupa(argv[optind]);
+       }
        else if (optind < argc) {
                usage(argv[0]);
                return 1;
diff --git a/tests/perftest/write_bw_postlist/write_bw_postlist.rc b/tests/perftest/write_bw_postlist/write_bw_postlist.rc
new file mode 100644 (file)
index 0000000..0f144d3
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_lat.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA_Write Post List BW Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA_Write Post List BW Test"\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_write_lat.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_write_lat.exe"\r
+\r
+#include <common.ver>\r
index 2da200e..316a625 100644 (file)
@@ -11,6 +11,7 @@ USE_NATIVE_EH = 1
 USE_IOSTREAM = 1\r
 \r
 SOURCES =                      \\r
+       write_lat.rc    \\r
        write_lat.c\r
        \r
 INCLUDES = ..\..\..\ulp\libibverbs\include;..\..\..\inc;..\..\..\inc\user;\r
index 3e04e83..95748aa 100644 (file)
@@ -863,8 +863,10 @@ int __cdecl main(int argc, char *argv[])
                        break;\r
 \r
                case 'h':\r
-                       user_param.servername = _strdup(optarg);\r
-                       break;\r
+                       if (optarg) {\r
+                               user_param.servername = _strdup(optarg);\r
+                               break;\r
+                       }\r
 \r
                default:\r
                        usage(argv[0]);\r
diff --git a/tests/perftest/write_lat/write_lat.rc b/tests/perftest/write_lat/write_lat.rc
new file mode 100644 (file)
index 0000000..4d028fd
--- /dev/null
@@ -0,0 +1,47 @@
+/*\r
+ * Copyright (c) 2005 Mellanox Technologies.  All rights reserved.\r
+ *\r
+ * This software is available to you under the OpenIB.org BSD license\r
+ * below:\r
+ *\r
+ *     Redistribution and use in source and binary forms, with or\r
+ *     without modification, are permitted provided that the following\r
+ *     conditions are met:\r
+ *\r
+ *      - Redistributions of source code must retain the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer.\r
+ *\r
+ *      - Redistributions in binary form must reproduce the above\r
+ *        copyright notice, this list of conditions and the following\r
+ *        disclaimer in the documentation and/or other materials\r
+ *        provided with the distribution.\r
+ *\r
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
+ * SOFTWARE.\r
+ *\r
+ * $Id: write_lat.rc 474 2006-08-31 08:57:19Z sleybo $\r
+ */\r
+\r
+\r
+#include <oib_ver.h>\r
+\r
+#define VER_FILETYPE                   VFT_APP\r
+#define VER_FILESUBTYPE                        VFT2_UNKNOWN\r
+\r
+#ifdef DBG\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA write Latency Test (Debug)"\r
+#else\r
+#define VER_FILEDESCRIPTION_STR                "winverbs - RDMA write Latency Test "\r
+#endif\r
+\r
+#define VER_INTERNALNAME_STR           "ibv_write_lat.exe"\r
+#define VER_ORIGINALFILENAME_STR       "ibv_write_lat.exe"\r
+\r
+#include <common.ver>\r