Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Nov 2014 00:56:26 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274075 - in head: etc/mtree lib/libc lib/libc/tests lib/libc/tests/c063 lib/libc/tests/db lib/libc/tests/gen lib/libc/tests/gen/execve lib/libc/tests/gen/posix_spawn lib/libc/tests/has...
Message-ID:  <201411040056.sA40uQTp033127@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Tue Nov  4 00:56:25 2014
New Revision: 274075
URL: https://svnweb.freebsd.org/changeset/base/274075

Log:
  Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately
  500 new testcases
  
  Various TODOs have been sprinkled around the Makefiles for items that even need
  to be ported (missing features), testcases have issues with building/linking, or
  issues at runtime.
  
  A variant of this code has been tested extensively on amd64 and i386
  10-STABLE/11-CURRENT for several months without issue. It builds on other
  architectures, but the code will remain off until I have prove it works on
  virtual hardware or real hardware on other architectures
  
  In collaboration with: pho, Casey Peel <casey.peel@isilon.com>
  Sponsored by: EMC / Isilon Storage Division

Added:
  head/lib/libc/Makefile.amd64   (contents, props changed)
  head/lib/libc/Makefile.i386   (contents, props changed)
  head/lib/libc/tests/
  head/lib/libc/tests/Makefile   (contents, props changed)
  head/lib/libc/tests/Makefile.netbsd-tests   (contents, props changed)
  head/lib/libc/tests/c063/
  head/lib/libc/tests/c063/Makefile   (contents, props changed)
  head/lib/libc/tests/db/
  head/lib/libc/tests/db/Makefile   (contents, props changed)
  head/lib/libc/tests/gen/
  head/lib/libc/tests/gen/Makefile   (contents, props changed)
  head/lib/libc/tests/gen/execve/
  head/lib/libc/tests/gen/execve/Makefile   (contents, props changed)
  head/lib/libc/tests/gen/posix_spawn/
  head/lib/libc/tests/gen/posix_spawn/Makefile   (contents, props changed)
  head/lib/libc/tests/hash/
  head/lib/libc/tests/hash/Makefile   (contents, props changed)
  head/lib/libc/tests/inet/
  head/lib/libc/tests/inet/Makefile   (contents, props changed)
  head/lib/libc/tests/locale/
  head/lib/libc/tests/locale/Makefile   (contents, props changed)
  head/lib/libc/tests/net/
  head/lib/libc/tests/net/Makefile   (contents, props changed)
  head/lib/libc/tests/net/getaddrinfo/
  head/lib/libc/tests/net/getaddrinfo/Makefile   (contents, props changed)
  head/lib/libc/tests/regex/
  head/lib/libc/tests/regex/Makefile   (contents, props changed)
  head/lib/libc/tests/rpc/
  head/lib/libc/tests/rpc/Makefile   (contents, props changed)
  head/lib/libc/tests/setjmp/
  head/lib/libc/tests/setjmp/Makefile   (contents, props changed)
  head/lib/libc/tests/ssp/
  head/lib/libc/tests/ssp/Makefile   (contents, props changed)
  head/lib/libc/tests/stdio/
  head/lib/libc/tests/stdio/Makefile   (contents, props changed)
  head/lib/libc/tests/stdlib/
  head/lib/libc/tests/stdlib/Makefile   (contents, props changed)
  head/lib/libc/tests/string/
  head/lib/libc/tests/string/Makefile   (contents, props changed)
  head/lib/libc/tests/sys/
  head/lib/libc/tests/sys/Makefile   (contents, props changed)
  head/lib/libc/tests/termios/
  head/lib/libc/tests/termios/Makefile   (contents, props changed)
  head/lib/libc/tests/time/
  head/lib/libc/tests/time/Makefile   (contents, props changed)
  head/lib/libc/tests/tls/
  head/lib/libc/tests/tls/Makefile   (contents, props changed)
  head/lib/libc/tests/tls/dso/
  head/lib/libc/tests/tls/dso/Makefile   (contents, props changed)
  head/lib/libc/tests/tls_dso/
  head/lib/libc/tests/tls_dso/Makefile   (contents, props changed)
  head/lib/libc/tests/ttyio/
  head/lib/libc/tests/ttyio/Makefile   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/lib/libc/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==============================================================================
--- head/etc/mtree/BSD.tests.dist	Tue Nov  4 00:19:10 2014	(r274074)
+++ head/etc/mtree/BSD.tests.dist	Tue Nov  4 00:56:25 2014	(r274075)
@@ -89,6 +89,56 @@
                 test-programs
                 ..
             ..
+            libc
+                c063
+                ..
+                db
+                ..
+                gen
+                    execve
+                    ..
+                    posix_spawn
+                    ..
+                ..
+                hash
+                    data
+                    ..
+                ..
+                inet
+                ..
+                locale
+                ..
+                net
+                    getaddrinfo
+                        data
+                        ..
+                    ..
+                ..
+                regex
+                    data
+                    ..
+                ..
+                ssp
+                ..
+                stdio
+                ..
+                stdlib
+                ..
+                string
+                ..
+                sys
+                ..
+                time
+                ..
+                tls
+                    dso
+                    ..
+                ..
+                termios
+                ..
+                ttyio
+                ..
+            ..
             libcrypt
             ..
             libmp

Modified: head/lib/libc/Makefile
==============================================================================
--- head/lib/libc/Makefile	Tue Nov  4 00:19:10 2014	(r274074)
+++ head/lib/libc/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -158,6 +158,8 @@ libkern.${LIBC_ARCH}:: ${KMSRCS}
 	cp -fp ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH}
 .endif
 
+.include <bsd.arch.inc.mk>
+
 .include <bsd.lib.mk>
 
 # Disable warnings in contributed sources.

Added: head/lib/libc/Makefile.amd64
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/Makefile.amd64	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+.if ${MK_TESTS} != "no"
+SUBDIR+=	tests
+.endif
+

Added: head/lib/libc/Makefile.i386
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/Makefile.i386	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+.if ${MK_TESTS} != "no"
+SUBDIR+=	tests
+.endif
+

Added: head/lib/libc/tests/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+.include <src.opts.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc
+
+SUBDIR=		tls_dso
+
+TESTS_SUBDIRS=	c063
+TESTS_SUBDIRS+=	db
+TESTS_SUBDIRS+=	gen
+TESTS_SUBDIRS+=	hash
+TESTS_SUBDIRS+=	inet
+TESTS_SUBDIRS+=	net
+TESTS_SUBDIRS+=	regex
+TESTS_SUBDIRS+=	stdio
+TESTS_SUBDIRS+=	stdlib
+TESTS_SUBDIRS+=	string
+TESTS_SUBDIRS+=	sys
+TESTS_SUBDIRS+=	termios
+TESTS_SUBDIRS+=	tls
+TESTS_SUBDIRS+=	ttyio
+
+.if ${MK_LOCALES} != "no"
+TESTS_SUBDIRS+=	locale
+.endif
+
+.if ${MK_SSP} != "no"
+TESTS_SUBDIRS+=	ssp
+.endif
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/Makefile.netbsd-tests
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/Makefile.netbsd-tests	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+OBJTOP?=	${.OBJDIR:H:H:H:H}
+SRCTOP?=	${.CURDIR:H:H:H:H}
+TESTSRC?=	${SRCTOP}/contrib/netbsd-tests/lib/libc/${.CURDIR:T}
+
+.include <netbsd-tests.test.mk>

Added: head/lib/libc/tests/c063/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/c063/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,24 @@
+# $FreeBSD$
+
+TESTSDIR=	${TESTSBASE}/lib/libc/c063
+
+#TODO: t_o_search, t_utimensat
+
+NETBSD_ATF_TESTS_C=	t_faccessat
+NETBSD_ATF_TESTS_C+=	t_fchmodat
+NETBSD_ATF_TESTS_C+=	t_fchownat
+NETBSD_ATF_TESTS_C+=	t_fexecve
+NETBSD_ATF_TESTS_C+=	t_fstatat
+NETBSD_ATF_TESTS_C+=	t_linkat
+NETBSD_ATF_TESTS_C+=	t_mkdirat
+NETBSD_ATF_TESTS_C+=	t_mkfifoat
+NETBSD_ATF_TESTS_C+=	t_mknodat
+NETBSD_ATF_TESTS_C+=	t_openat
+NETBSD_ATF_TESTS_C+=	t_readlinkat
+NETBSD_ATF_TESTS_C+=	t_renameat
+NETBSD_ATF_TESTS_C+=	t_symlinkat
+NETBSD_ATF_TESTS_C+=	t_unlinkat
+
+CFLAGS+= -D_INCOMPLETE_XOPEN_C063
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/db/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/db/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+TESTSDIR=	${TESTSBASE}/lib/libc/db
+
+BINDIR=		${TESTSDIR}
+
+PROGS=		h_db
+
+FILESDIR=	${TESTSDIR}
+
+FILES=		README
+
+NETBSD_ATF_TESTS_SH+=	db_test
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/gen/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/gen/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,58 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/gen
+
+# TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep
+# TODO: t_siginfo (fixes require further inspection)
+# TODO: t_sethostname_test (consistently screws up the hostname)
+
+NETBSD_ATF_TESTS_C=	alarm_test
+NETBSD_ATF_TESTS_C+=	assert_test
+NETBSD_ATF_TESTS_C+=	basedirname_test
+NETBSD_ATF_TESTS_C+=	dir_test
+NETBSD_ATF_TESTS_C+=	floatunditf_test
+NETBSD_ATF_TESTS_C+=	fnmatch_test
+NETBSD_ATF_TESTS_C+=	fpclassify_test
+NETBSD_ATF_TESTS_C+=	fpsetmask_test
+NETBSD_ATF_TESTS_C+=	fpsetround_test
+NETBSD_ATF_TESTS_C+=	ftok_test
+NETBSD_ATF_TESTS_C+=	getcwd_test
+NETBSD_ATF_TESTS_C+=	getgrent_test
+NETBSD_ATF_TESTS_C+=	glob_test
+NETBSD_ATF_TESTS_C+=	humanize_number_test
+NETBSD_ATF_TESTS_C+=	isnan_test
+NETBSD_ATF_TESTS_C+=	nice_test
+NETBSD_ATF_TESTS_C+=	pause_test
+NETBSD_ATF_TESTS_C+=	raise_test
+NETBSD_ATF_TESTS_C+=	realpath_test
+NETBSD_ATF_TESTS_C+=	setdomainname_test
+NETBSD_ATF_TESTS_C+=	sethostname_test
+NETBSD_ATF_TESTS_C+=	sleep_test
+NETBSD_ATF_TESTS_C+=	syslog_test
+NETBSD_ATF_TESTS_C+=	time_test
+NETBSD_ATF_TESTS_C+=	ttyname_test
+NETBSD_ATF_TESTS_C+=	vis_test
+
+.include "../Makefile.netbsd-tests"
+
+LDADD.humanize_number_test+=	-lutil
+DPADD.humanize_number_test+=	${LIBUTIL}
+
+LDADD.fpclassify_test+=	-lm
+DPADD.fpclassify_test+=	${LIBM}
+LDADD.fpsetround_test+=	-lm
+DPADD.fpsetround_test+=	${LIBM}
+LDADD.siginfo_test+=	-lm
+DPADD.siginfo_test+=	${LIBM}
+
+LDADD.nice_test+=	-lpthread
+DPADD.nice_test+=	${LIBPTHREAD}
+LDADD.syslog_test+=	-lpthread
+DPADD.syslog_test+=	${LIBPTHREAD}
+
+TESTS_SUBDIRS=	execve
+TESTS_SUBDIRS+=	posix_spawn
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/gen/execve/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/gen/execve/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T}
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/gen/execve
+
+NETBSD_ATF_TESTS_C=	execve_test
+
+.include "../../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/gen/posix_spawn/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/gen/posix_spawn/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,34 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libc/gen/${.CURDIR:T}
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/gen/posix_spawn
+
+BINDIR=		${TESTSDIR}
+
+# TODO: t_spawnattr (fix from pho@ needs additional review)
+NETBSD_ATF_TESTS_C=	fileactions_test
+NETBSD_ATF_TESTS_C+=	spawn_test
+
+PROGS=		h_fileactions
+PROGS+=		h_spawn
+PROGS+=		h_spawnattr
+
+SCRIPTS=	h_nonexec
+SCRIPTS+=	h_zero
+
+.include "../../Makefile.netbsd-tests"
+
+h_zero:
+	dd if=/dev/zero of=h_zero bs=1k count=2
+	chmod a+x h_zero
+
+CLEANFILES+=	h_zero
+
+WARNS?=3
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/hash/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/hash/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+TESTSDIR=	${TESTSBASE}/lib/libc/hash
+
+NETBSD_ATF_TESTS_C=	sha2_test
+
+NETBSD_ATF_TESTS_SH=	hash_test
+
+BINDIR=		${TESTSDIR}
+
+PROGS+=		h_hash
+
+FILESDIR=	${TESTSDIR}/data
+
+FILES+=		data/md5test-in
+FILES+=		data/md5test-out
+FILES+=		data/sha1test-in
+FILES+=		data/sha1test-out
+FILES+=		data/sha1test2-out
+
+DPADD+=		${LIBMD}
+LDADD+=		-lmd
+DPADD.sha2_test+=	${LIBCRYPTO}
+LDADD.sha2_test+=	-lcrypto
+
+CFLAGS.sha2_test+=	-I${.CURDIR}/../../../../crypto/openssh/openbsd-compat
+CFLAGS.sha2_test+=	-I${.CURDIR}/../../../../crypto/openssh
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/inet/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/inet/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/inet
+
+NETBSD_ATF_TESTS_C=	inet_network_test
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/locale/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/locale/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,22 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/locale
+
+NETBSD_ATF_TESTS_C=	io_test
+NETBSD_ATF_TESTS_C+=	mbrtowc_test
+NETBSD_ATF_TESTS_C+=	mbstowcs_test
+NETBSD_ATF_TESTS_C+=	mbsnrtowcs_test
+NETBSD_ATF_TESTS_C+=	mbtowc_test
+NETBSD_ATF_TESTS_C+=	wcscspn_test
+NETBSD_ATF_TESTS_C+=	wcspbrk_test
+NETBSD_ATF_TESTS_C+=	wcsspn_test
+NETBSD_ATF_TESTS_C+=	wcstod_test
+NETBSD_ATF_TESTS_C+=	wctomb_test
+
+CFLAGS.t_wctomb.c+= -Wno-stack-protector
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/net/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/net/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,39 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/net
+
+BINDIR=		${TESTSDIR}
+
+NETBSD_ATF_TESTS_C=	getprotoent_test
+NETBSD_ATF_TESTS_C+=	ether_aton_test
+
+SRCS.t_ether_aton=	aton_ether_subr.c t_ether_aton.c
+
+aton_ether_subr.c: gen_ether_subr ${.CURDIR:H:H:H:H}/sys/net/if_ethersubr.c
+	${HOST_SH} ${.ALLSRC} ${.TARGET}
+
+# TODO: hostent_test
+NETBSD_ATF_TESTS_SH=	nsdispatch_test
+NETBSD_ATF_TESTS_SH+=	protoent_test
+NETBSD_ATF_TESTS_SH+=	servent_test
+
+PROGS=		h_nsd_recurse
+PROGS+=		h_protoent
+PROGS+=		h_servent
+PROGS+=		h_dns_server
+
+DPADD.h_nsd_recurse+=	${LIBPTHREAD}
+LDADD.h_nsd_recurse+=	-lpthread
+
+CLEANFILES+=	aton_ether_subr.c
+
+.include "../Makefile.netbsd-tests"
+
+# TODO: the testcases needs to be ported to FreeBSD
+#TESTS_SUBDIRS=	getaddrinfo
+FILES=	hosts
+FILES+=	resolv.conf
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/net/getaddrinfo/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/net/getaddrinfo/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,31 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libc/net/${.CURDIR:T}
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/net/getaddrinfo
+
+BINDIR=		${TESTSDIR}
+
+.error "This testcase needs to be ported to FreeBSD (the output from getaddrinfo_test differs from NetBSD)"
+
+NETBSD_ATF_TESTS_SH=	getaddrinfo_test
+
+PROGS=		h_gai
+
+FILESDIR=	${TESTSDIR}/data
+
+FILES=		basics_v4.exp	basics_v4v6.exp
+FILES+=		no_host_v4.exp	no_host_v4v6.exp
+FILES+=		no_serv_v4.exp	no_serv_v4v6.exp
+FILES+=		sock_raw_v4.exp	sock_raw_v4v6.exp
+FILES+=		spec_fam_v4.exp	spec_fam_v4v6.exp
+FILES+=		scoped.exp
+FILES+=		unsup_fam.exp
+
+.include "../../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/regex/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/regex/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,59 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+BINDIR=		${TESTSDIR}
+
+TESTSDIR=	${TESTSBASE}/lib/libc/regex
+
+IMPLEMENTATION?=      -DREGEX_SPENCER
+
+CFLAGS.h_regex+=-I${TESTSRC} -I${.CURDIR:H:H}/regex
+PROGS+=		h_regex
+SRCS.h_regex=	main.c split.c debug.c
+
+NETBSD_ATF_TESTS_SH=	regex_test
+
+FILESDIR=	${TESTSDIR}/data
+FILES+=		README
+FILES+=		data/anchor.in
+FILES+=		data/backref.in
+FILES+=		data/basic.in
+FILES+=		data/bracket.in
+FILES+=		data/c_comments.in
+FILES+=		data/complex.in
+FILES+=		data/error.in
+FILES+=		data/meta.in
+FILES+=		data/nospec.in
+FILES+=		data/paren.in
+FILES+=		data/regress.in
+FILES+=		data/repet_bounded.in
+FILES+=		data/repet_multi.in
+FILES+=		data/repet_ordinary.in
+FILES+=		data/startend.in
+FILES+=		data/subexp.in
+FILES+=		data/subtle.in
+FILES+=		data/word_bound.in
+FILES+=		data/zero.in
+#FILES+=		data/att/README
+FILES+=		data/att/basic.dat
+FILES+=		data/att/categorization.dat
+FILES+=		data/att/forcedassoc.dat
+FILES+=		data/att/leftassoc.dat
+FILES+=		data/att/nullsubexpr.dat
+FILES+=		data/att/repetition.dat
+FILES+=		data/att/rightassoc.dat
+
+NETBSD_ATF_TESTS_C=	exhaust_test
+NETBSD_ATF_TESTS_C+=	regex_att_test
+
+.for t in ${NETBSD_ATF_TESTS_C}
+CFLAGS.$t+=	-I${TESTSRC} ${IMPLEMENTATION}
+.endfor
+
+.include "../Makefile.netbsd-tests"
+
+DPADD.regex_att_test+=	${LIBUTIL}
+LDADD.regex_att_test+=	-lutil
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/rpc/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/rpc/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,27 @@
+# $FreeBSD$
+
+TESTSDIR=		${TESTSBASE}/lib/libc/rpc
+SRCS.xdr_test=		${RPCSRC:.x=_xdr.c} t_xdr.c ${RPCSRC:.x=.h}
+
+NETBSD_ATF_TESTS_C=	rpc_test
+NETBSD_ATF_TESTS_C+=	xdr_test
+
+RPCSRC=			h_testbits.x
+RPCGEN=			RPCGEN_CPP=${CPP:Q} rpcgen -L -C
+
+h_testbits.h: ${RPCSRC}
+	${RPCGEN} -h -o ${.TARGET} ${.ALLSRC}
+
+h_testbits_xdr.c: ${RPCSRC} h_testbits.h
+	${RPCGEN} ${.ALLSRC:M*.x}
+
+CLEANFILES+=	${RPCSRC:.x=.h} ${RPCSRC:.x=.c} h_testbits_xdr.c
+CFLAGS+=	-I${.OBJDIR}
+DPSRCS+=	h_testbits.h
+
+LDADD+=		-lrpcsvc -lutil
+DPADD+=		${LIBRPCSVC} ${LIBUTIL}
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/setjmp/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/setjmp/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+TESTSDIR=	${TESTSBASE}/lib/libc/setjmp
+
+NETBSD_ATF_TESTS_C=	t_setjmp
+NETBSD_ATF_TESTS_C+=	t_threadjmp
+
+DPADD.t_threadjmp+= ${LIBPTHREAD}
+LDADD.t_threadjmp+= -lpthread
+
+WARNS?=	4
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/ssp/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/ssp/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,45 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/ssp
+
+NO_WERROR=
+WARNS?=	2
+
+CFLAGS.h_raw+=	-fstack-protector-all -Wstack-protector
+.if ${COMPILER_TYPE} == "clang"
+CFLAGS.h_raw+=	-fsanitize=bounds
+.elif ${COMPILER_TYPE} == "gcc"
+CFLAGS.h_raw+=	--param ssp-buffer-size=1
+DPADD+=		${LIBSSP}
+LDADD+=		-lssp
+.endif
+
+NETBSD_ATF_TESTS_SH=	ssp_test
+
+BINDIR=		${TESTSDIR}
+
+PROGS=		h_fgets
+PROGS+=		h_gets
+PROGS+=		h_getcwd
+PROGS+=		h_memcpy
+PROGS+=		h_memmove
+PROGS+=		h_memset
+PROGS+=		h_raw
+PROGS+=		h_read
+PROGS+=		h_readlink
+PROGS+=		h_snprintf
+PROGS+=		h_sprintf
+PROGS+=		h_stpcpy
+PROGS+=		h_stpncpy
+PROGS+=		h_strcat
+PROGS+=		h_strcpy
+PROGS+=		h_strncat
+PROGS+=		h_strncpy
+PROGS+=		h_vsnprintf
+PROGS+=		h_vsprintf
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/stdio/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/stdio/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+TESTSDIR=	${TESTSBASE}/lib/libc/stdio
+
+NETBSD_ATF_TESTS_C=	clearerr_test
+NETBSD_ATF_TESTS_C+=	fflush_test
+NETBSD_ATF_TESTS_C+=	fmemopen_test
+NETBSD_ATF_TESTS_C+=	fopen_test
+NETBSD_ATF_TESTS_C+=	fputc_test
+NETBSD_ATF_TESTS_C+=	mktemp_test
+NETBSD_ATF_TESTS_C+=	popen_test
+NETBSD_ATF_TESTS_C+=	printf_test
+NETBSD_ATF_TESTS_C+=	scanf_test
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/stdlib/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/stdlib/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,44 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/stdlib
+
+# TODO: t_getenv_thread, t_mi_vector_hash
+NETBSD_ATF_TESTS_C=	abs_test
+NETBSD_ATF_TESTS_C+=	atoi_test
+NETBSD_ATF_TESTS_C+=	div_test
+NETBSD_ATF_TESTS_C+=	getenv_test
+NETBSD_ATF_TESTS_C+=	exit_test
+NETBSD_ATF_TESTS_C+=	hsearch_test
+NETBSD_ATF_TESTS_C+=	posix_memalign_test
+NETBSD_ATF_TESTS_C+=	random_test
+NETBSD_ATF_TESTS_C+=	strtod_test
+NETBSD_ATF_TESTS_C+=	strtol_test
+NETBSD_ATF_TESTS_C+=	system_test
+
+# TODO: need to come up with a correct explanation of what the patch pho does
+# with h_atexit
+#ATF_TESTS_SH=	atexit_test
+NETBSD_ATF_TESTS_SH=	getopt_test
+
+.include "../Makefile.netbsd-tests"
+
+BINDIR=		${TESTSDIR}
+
+# TODO: see comment above
+#PROGS+=		h_atexit
+PROGS+=		h_getopt h_getopt_long
+
+.for t in h_getopt h_getopt_long
+CFLAGS.$t+=	-I${LIBNETBSD_SRCDIR} -I${SRCTOP}/contrib/netbsd-tests
+LDFLAGS.$t+=	-L${LIBNETBSD_OBJDIR}
+
+DPADD.$t+=	${LIBNETBSD} ${LIBUTIL}
+LDADD.$t+=	-lnetbsd -lutil
+.endfor
+
+DPADD.strtod_test+=		${LIBM}
+LDADD.strtod_test+=		-lm
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/string/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/string/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,33 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/string
+
+# TODO: popcount, stresep
+
+NETBSD_ATF_TESTS_C+=	memchr
+NETBSD_ATF_TESTS_C+=	memcpy
+NETBSD_ATF_TESTS_C+=	memmem
+NETBSD_ATF_TESTS_C+=	memset
+NETBSD_ATF_TESTS_C+=	strcat
+NETBSD_ATF_TESTS_C+=	strchr
+NETBSD_ATF_TESTS_C+=	strcmp
+NETBSD_ATF_TESTS_C+=	strcpy
+NETBSD_ATF_TESTS_C+=	strcspn
+NETBSD_ATF_TESTS_C+=	strerror
+NETBSD_ATF_TESTS_C+=	strlen
+NETBSD_ATF_TESTS_C+=	strpbrk
+NETBSD_ATF_TESTS_C+=	strrchr
+NETBSD_ATF_TESTS_C+=	strspn
+NETBSD_ATF_TESTS_C+=	swab
+
+.include "../Makefile.netbsd-tests"
+
+LDADD.memchr+=	-lmd
+DPADD.memchr+=	${LIBMD}
+
+LDADD.memcpy+=	-lmd
+DPADD.memcpy+=	${LIBMD}
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/sys/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/sys/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,85 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=		${TESTSBASE}/lib/libc/sys
+
+# TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg,
+# swapcontext
+NETBSD_ATF_TESTS_C+=		access_test
+NETBSD_ATF_TESTS_C+=		chroot_test
+NETBSD_ATF_TESTS_C+=		clock_gettime_test
+NETBSD_ATF_TESTS_C+=		connect_test
+NETBSD_ATF_TESTS_C+=		dup_test
+NETBSD_ATF_TESTS_C+=		fsync_test
+NETBSD_ATF_TESTS_C+=		getcontext_test
+NETBSD_ATF_TESTS_C+=		getgroups_test
+NETBSD_ATF_TESTS_C+=		getitimer_test
+NETBSD_ATF_TESTS_C+=		getlogin_test
+NETBSD_ATF_TESTS_C+=		getpid_test
+NETBSD_ATF_TESTS_C+=		getrusage_test
+NETBSD_ATF_TESTS_C+=		getsid_test
+NETBSD_ATF_TESTS_C+=		gettimeofday_test
+NETBSD_ATF_TESTS_C+=		issetugid_test
+NETBSD_ATF_TESTS_C+=		kevent_test
+NETBSD_ATF_TESTS_C+=		kill_test
+NETBSD_ATF_TESTS_C+=		link_test
+NETBSD_ATF_TESTS_C+=		listen_test
+NETBSD_ATF_TESTS_C+=		mincore_test
+NETBSD_ATF_TESTS_C+=		mkdir_test
+NETBSD_ATF_TESTS_C+=		mkfifo_test
+NETBSD_ATF_TESTS_C+=		mknod_test
+NETBSD_ATF_TESTS_C+=		mlock_test
+NETBSD_ATF_TESTS_C+=		mmap_test
+NETBSD_ATF_TESTS_C+=		mprotect_test
+NETBSD_ATF_TESTS_C+=		msgctl_test
+NETBSD_ATF_TESTS_C+=		msgget_test
+NETBSD_ATF_TESTS_C+=		msgrcv_test
+NETBSD_ATF_TESTS_C+=		msgsnd_test
+NETBSD_ATF_TESTS_C+=		msync_test
+NETBSD_ATF_TESTS_C+=		nanosleep_test
+NETBSD_ATF_TESTS_C+=		pipe_test
+NETBSD_ATF_TESTS_C+=		pipe2_test
+NETBSD_ATF_TESTS_C+=		poll_test
+NETBSD_ATF_TESTS_C+=		revoke_test
+NETBSD_ATF_TESTS_C+=		select_test
+NETBSD_ATF_TESTS_C+=		setrlimit_test
+NETBSD_ATF_TESTS_C+=		setuid_test
+NETBSD_ATF_TESTS_C+=		sigaction_test
+NETBSD_ATF_TESTS_C+=		sigqueue_test
+NETBSD_ATF_TESTS_C+=		sigtimedwait_test
+NETBSD_ATF_TESTS_C+=		socketpair_test
+NETBSD_ATF_TESTS_C+=		stat_test
+NETBSD_ATF_TESTS_C+=		timer_create_test
+NETBSD_ATF_TESTS_C+=		truncate_test
+NETBSD_ATF_TESTS_C+=		ucontext_test
+NETBSD_ATF_TESTS_C+=		umask_test
+NETBSD_ATF_TESTS_C+=		unlink_test
+NETBSD_ATF_TESTS_C+=		write_test
+
+DPADD.getpid_test+=	${LIBPTHREAD}
+LDADD.getpid_test+=	-lpthread
+DPADD.timer_create_test+=	${LIBRT}
+LDADD.timer_create_test+=	-lrt
+
+.include "../Makefile.netbsd-tests"
+
+.if ${COMPILER_TYPE} == "gcc"
+WARNS?=			3
+.else
+WARNS?=			4
+.endif
+
+FILESGROUPS=		FILES truncate_test_FILES
+
+truncate_test_FILES=	truncate_test.root_owned
+truncate_test_FILESDIR=	${TESTSDIR}
+truncate_test_FILESMODE= 0600
+truncate_test_FILESOWNER= root
+truncate_test_FILESGRP= wheel
+
+CLEANFILES=	truncate_test.root_owned
+truncate_test.root_owned:
+	dd if=/dev/null bs=1 count=1 of=${.TARGET}
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/termios/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/termios/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/termios
+
+NETBSD_ATF_TESTS_C=	tcsetpgrp_test
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/time/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/time/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/time
+
+NETBSD_ATF_TESTS_C=	mktime_test
+NETBSD_ATF_TESTS_C+=	strptime_test
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/tls/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/tls/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,35 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/tls
+.if !defined(NO_PIC)
+SUBDIR+=	dso
+.endif
+
+# TODO: doesn't link properly (for some odd reason it's trying to link in
+#       libatf.so)
+#NETBSD_ATF_TESTS_C=	tls_static_test
+.if !defined(NO_PIC)
+NETBSD_ATF_TESTS_C+=	tls_dlopen_test
+NETBSD_ATF_TESTS_C+=	tls_dynamic_test
+.endif
+
+.include "../Makefile.netbsd-tests"
+
+DSODIR=		${.OBJDIR}/../tls_dso
+
+DPADD.tls_static_test+=		${LIBPTHREAD}
+LDADD.tls_static_test+=		-lpthread
+LDFLAGS.tls_static_test+=	-static
+SRCS.tls_static_test=		t_tls_static.c t_tls_static_helper.c
+
+DPADD.tls_dynamic_test+=	${LIBPTHREAD} ${DSODIR}/libh_tls_dynamic.so
+LDADD.tls_dynamic_test+=	-lpthread -lh_tls_dynamic
+LDFLAGS.tls_dynamic_test+=	-Wl,-rpath,${TESTSDIR} -L${DSODIR}
+
+DPADD.tls_dlopen_test+=		${LIBPTHREAD}
+LDADD.tls_dlopen_test+=		-lpthread
+LDFLAGS.tls_dlopen_test+=	-Wl,-rpath,${TESTSDIR} -Wl,-export-dynamic
+
+.include <bsd.test.mk>

Added: head/lib/libc/tests/tls/dso/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/tls/dso/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,18 @@
+# $FreeBSD$
+
+OBJTOP=		${.OBJDIR:H:H:H:H:H}
+SRCTOP=		${.CURDIR:H:H:H:H:H}
+TESTSRC=	${SRCTOP}/contrib/netbsd-tests/lib/libc/tls/${.CURDIR:T}
+
+LIB=		h_tls_dlopen
+SHLIB_NAME=	h_tls_dlopen.so
+SRCS=		h_tls_dlopen.c
+
+MAN=
+
+LIBDIR=		${TESTSBASE}/lib/libc/tls
+SHLIB_MAJOR=	1
+
+.include "../../Makefile.netbsd-tests"
+
+.include <bsd.lib.mk>

Added: head/lib/libc/tests/tls_dso/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/tls_dso/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,20 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+LIB=		h_tls_dynamic
+SRCS=		h_tls_dynamic.c
+
+LIBDIR=		${TESTSBASE}/lib/libc/tls
+SHLIBDIR=	${TESTSBASE}/lib/libc/tls
+SHLIB_MAJOR=	1
+
+WITHOUT_STATIC=
+WITHOUT_PROFILE=
+WITHOUT_PIC=
+
+MAN=
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.lib.mk>

Added: head/lib/libc/tests/ttyio/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lib/libc/tests/ttyio/Makefile	Tue Nov  4 00:56:25 2014	(r274075)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+
+.include <bsd.own.mk>
+
+TESTSDIR=	${TESTSBASE}/lib/libc/ttyio
+
+# TODO: ptm_test
+NETBSD_ATF_TESTS_C=	ttyio_test
+
+DPADD.ttyio_test+=	${LIBUTIL}
+LDADD.ttyio_test+=	-lutil
+
+.include "../Makefile.netbsd-tests"
+
+.include <bsd.test.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411040056.sA40uQTp033127>