svn commit: r274578 - in head: etc/mtree lib/libthr lib/libthr/tests lib/libthr/tests/dlopen lib/libthr/tests/dlopen/dso

Garrett Cooper ngie at FreeBSD.org
Sun Nov 16 06:35:23 UTC 2014


Author: ngie
Date: Sun Nov 16 06:35:20 2014
New Revision: 274578
URL: https://svnweb.freebsd.org/changeset/base/274578

Log:
  Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread as
  lib/libthr/tests
  
  A variant of this code has been tested on amd64/i386 for some time by
  EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the
  code will remain off until it's proven it works on virtual hardware or real
  hardware on other architectures
  
  Original work by: pho
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/lib/libthr/Makefile.amd64   (contents, props changed)
  head/lib/libthr/Makefile.i386   (contents, props changed)
  head/lib/libthr/tests/
  head/lib/libthr/tests/Makefile   (contents, props changed)
  head/lib/libthr/tests/dlopen/
  head/lib/libthr/tests/dlopen/Makefile   (contents, props changed)
  head/lib/libthr/tests/dlopen/dso/
  head/lib/libthr/tests/dlopen/dso/Makefile   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/lib/libthr/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==============================================================================
--- head/etc/mtree/BSD.tests.dist	Sun Nov 16 05:13:39 2014	(r274577)
+++ head/etc/mtree/BSD.tests.dist	Sun Nov 16 06:35:20 2014	(r274578)
@@ -149,6 +149,10 @@
             ..
             libproc
             ..
+            libthr
+                dlopen
+                ..
+            ..
             libutil
             ..
         ..

Modified: head/lib/libthr/Makefile
==============================================================================
--- head/lib/libthr/Makefile	Sun Nov 16 05:13:39 2014	(r274577)
+++ head/lib/libthr/Makefile	Sun Nov 16 06:35:20 2014	(r274578)
@@ -64,4 +64,6 @@ SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpth
 CFLAGS+=-DSYSCALL_COMPAT
 .endif
 
+.include <bsd.arch.inc.mk>
+
 .include <bsd.lib.mk>

Added: head/lib/libthr/Makefile.amd64
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libthr/Makefile.amd64	Sun Nov 16 06:35:20 2014	(r274578)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+.if ${MK_TESTS} != "no"
+SUBDIR+=	tests
+.endif
+

Added: head/lib/libthr/Makefile.i386
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libthr/Makefile.i386	Sun Nov 16 06:35:20 2014	(r274578)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+.if ${MK_TESTS} != "no"
+SUBDIR+=	tests
+.endif
+

Added: head/lib/libthr/tests/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libthr/tests/Makefile	Sun Nov 16 06:35:20 2014	(r274578)
@@ -0,0 +1,58 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libpthread
+
+TESTSDIR=	${TESTSBASE}/lib/libthr
+
+# TODO: t_name (missing pthread_getname_np support in FreeBSD)
+NETBSD_ATF_TESTS_C=	barrier_test
+NETBSD_ATF_TESTS_C+=	cond_test
+NETBSD_ATF_TESTS_C+=	condwait_test
+NETBSD_ATF_TESTS_C+=	detach_test
+NETBSD_ATF_TESTS_C+=	equal_test
+NETBSD_ATF_TESTS_C+=	fork_test
+NETBSD_ATF_TESTS_C+=	fpu_test
+NETBSD_ATF_TESTS_C+=	join_test
+NETBSD_ATF_TESTS_C+=	kill_test
+NETBSD_ATF_TESTS_C+=	mutex_test
+NETBSD_ATF_TESTS_C+=	once_test
+NETBSD_ATF_TESTS_C+=	preempt_test
+NETBSD_ATF_TESTS_C+=	rwlock_test
+NETBSD_ATF_TESTS_C+=	sem_test
+NETBSD_ATF_TESTS_C+=	sigmask_test
+NETBSD_ATF_TESTS_C+=	sigsuspend_test
+NETBSD_ATF_TESTS_C+=	siglongjmp_test
+NETBSD_ATF_TESTS_C+=	sleep_test
+NETBSD_ATF_TESTS_C+=	swapcontext_test
+
+NETBSD_ATF_TESTS_SH=	atexit_test
+NETBSD_ATF_TESTS_SH+=	cancel_test
+NETBSD_ATF_TESTS_SH+=	exit_test
+NETBSD_ATF_TESTS_SH+=	resolv_test
+
+DPADD+=		${LIBPTHREAD}
+LDADD+=		-lpthread
+DPADD.fpu_test+=	${LIBM}
+LDADD.fpu_test+=	-lm
+DPADD.sem_test+=	${LIBRT}
+LDADD.sem_test+=	-lrt
+
+BINDIR=		${TESTSDIR}
+
+PROGS=		h_atexit
+PROGS+=		h_cancel
+PROGS+=		h_exit
+PROGS+=		h_resolv
+
+FILESDIR=	${TESTSDIR}
+FILES=		d_mach
+
+TESTS_SUBDIRS=		dlopen
+
+.include <netbsd-tests.test.mk>
+
+CFLAGS.condwait_test+=	-I${SRCTOP}/contrib/netbsd-tests/lib/libc/gen
+
+.include <bsd.test.mk>

Added: head/lib/libthr/tests/dlopen/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libthr/tests/dlopen/Makefile	Sun Nov 16 06:35:20 2014	(r274578)
@@ -0,0 +1,30 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libthr/dlopen
+
+CFLAGS+=	-DTESTDIR=\"${TESTSDIR:Q}/\"
+LDFLAGS+=	-L${.OBJDIR}/dso -Wl,-rpath=${TESTDIR}
+
+.if !defined(NO_PIC)
+SUBDIR+=	dso
+
+NETBSD_ATF_TESTS_C=	dlopen_test
+NETBSD_ATF_TESTS_C+=	main_pthread_create_test
+# XXX: this blocks running the testcase
+#NETBSD_ATF_TESTS_C+=	dso_pthread_create_test
+
+.for t in dlopen_test main_pthread_create_test
+DPADD.$t+=	${LIBPTHREAD}
+LDADD.$t+=	-lpthread
+.endfor
+.endif
+
+.include <netbsd-tests.test.mk>
+
+.include <bsd.test.mk>

Added: head/lib/libthr/tests/dlopen/dso/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libthr/tests/dlopen/dso/Makefile	Sun Nov 16 06:35:20 2014	(r274578)
@@ -0,0 +1,19 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libpthread/dlopen/dso
+
+SHLIB=		h_pthread_dlopen
+SHLIB_MAJOR=    1
+SHLIB_NAME=	h_pthread_dlopen.so.${SHLIB_MAJOR}
+SRCS=		h_pthread_dlopen.c
+
+DPADD+=		${LIBPTHREAD}
+LDADD+=		-lpthread
+
+LIBDIR=         ${TESTSBASE}/lib/libthr/dlopen
+
+.include <netbsd-tests.test.mk>
+
+.include <bsd.lib.mk>


More information about the svn-src-head mailing list