summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-01-11 14:22:00 +0000
committerhselasky <hselasky@FreeBSD.org>2015-01-11 14:22:00 +0000
commit490d9ace1ccb7218cb51040995c3ebb60e1de3e1 (patch)
tree7ae9e48925fe257eed8315645594c72772fb3b3c
parent66c12db3df424c4159524f3fd6c8b136618a84be (diff)
downloadFreeBSD-src-490d9ace1ccb7218cb51040995c3ebb60e1de3e1.zip
FreeBSD-src-490d9ace1ccb7218cb51040995c3ebb60e1de3e1.tar.gz
MFC r276823:
Add makefile for the "osmtest" utility. While at it: - Fix depend target by removing a space after an "-I" inclusion option. - Fix some minor compile issues in the "osmtest" utility. PR: 196580
-rw-r--r--contrib/ofed/management/opensm/osmtest/osmt_multicast.c1
-rw-r--r--contrib/ofed/management/opensm/osmtest/osmtest.c2
-rw-r--r--contrib/ofed/usr.bin/Makefile10
-rw-r--r--contrib/ofed/usr.bin/osmtest/Makefile34
-rw-r--r--contrib/ofed/usr.lib/Makefile4
-rw-r--r--etc/mtree/BSD.tests.dist2
6 files changed, 47 insertions, 6 deletions
diff --git a/contrib/ofed/management/opensm/osmtest/osmt_multicast.c b/contrib/ofed/management/opensm/osmtest/osmt_multicast.c
index 165457c..8329a2b 100644
--- a/contrib/ofed/management/opensm/osmtest/osmt_multicast.c
+++ b/contrib/ofed/management/opensm/osmtest/osmt_multicast.c
@@ -42,6 +42,7 @@
#ifndef __WIN__
#include <unistd.h>
#endif
+#include <sys/socket.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/contrib/ofed/management/opensm/osmtest/osmtest.c b/contrib/ofed/management/opensm/osmtest/osmtest.c
index 243d0b2..57476a5 100644
--- a/contrib/ofed/management/opensm/osmtest/osmtest.c
+++ b/contrib/ofed/management/opensm/osmtest/osmtest.c
@@ -3013,7 +3013,7 @@ Exit:
/**********************************************************************
**********************************************************************/
-inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec)
+static inline uint32_t osmtest_path_rec_key_get(IN const ib_path_rec_t * const p_rec)
{
return (p_rec->dlid << 16 | p_rec->slid);
}
diff --git a/contrib/ofed/usr.bin/Makefile b/contrib/ofed/usr.bin/Makefile
index aa27a51..8bef65f 100644
--- a/contrib/ofed/usr.bin/Makefile
+++ b/contrib/ofed/usr.bin/Makefile
@@ -1,7 +1,11 @@
.include <bsd.own.mk>
-SUBDIR = ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat
-SUBDIR += ibsysstat ibtracert opensm perfquery saquery
-SUBDIR += sminfo smpdump smpquery vendstat
+SUBDIR= ibaddr ibnetdiscover ibping ibportstate ibroute ibsendtrap ibstat \
+ ibsysstat ibtracert opensm perfquery saquery \
+ sminfo smpdump smpquery vendstat
+
+.if ${MK_TESTS} != "no"
+SUBDIR+= osmtest
+.endif
.include <bsd.subdir.mk>
diff --git a/contrib/ofed/usr.bin/osmtest/Makefile b/contrib/ofed/usr.bin/osmtest/Makefile
new file mode 100644
index 0000000..fef67a0
--- /dev/null
+++ b/contrib/ofed/usr.bin/osmtest/Makefile
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+.include "../Makefile.inc"
+
+OPENSM= ${.CURDIR}/../../management/opensm
+.PATH: ${OPENSM}/osmtest ${OPENSM}/man
+
+BINDIR= ${TESTSBASE}/usr.bin/opensm
+PROG= osmtest
+
+SRCS= main.c \
+ osmt_inform.c \
+ osmt_mtl_regular_qp.c \
+ osmt_multicast.c \
+ osmt_service.c \
+ osmt_slvl_vl_arb.c \
+ osmtest.c
+
+LDADD= -libcommon \
+ -libmad \
+ -libumad \
+ -losmvendor \
+ -losmcomp \
+ -lopensm \
+ -lpthread
+
+CFLAGS= -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP \
+ -I${OPENSM}/osmtest/include
+
+MAN= osmtest.8
+
+WARNS?= 1
+
+.include <bsd.prog.mk>
diff --git a/contrib/ofed/usr.lib/Makefile b/contrib/ofed/usr.lib/Makefile
index a26440b..ba7973c 100644
--- a/contrib/ofed/usr.lib/Makefile
+++ b/contrib/ofed/usr.lib/Makefile
@@ -1,6 +1,6 @@
.include <bsd.own.mk>
-SUBDIR = libibcommon libibmad libibumad libibverbs libmlx4 libmthca
-SUBDIR += libopensm libosmcomp libosmvendor libibcm librdmacm libsdp
+SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \
+ libopensm libosmcomp libosmvendor libibcm librdmacm libsdp
.include <bsd.subdir.mk>
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index edb6ae7..e188a2c 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -307,6 +307,8 @@
..
ncal
..
+ opensm
+ ..
printf
..
sed
OpenPOWER on IntegriCloud