Index: stable/10/etc/mtree/BSD.tests.dist =================================================================== --- stable/10/etc/mtree/BSD.tests.dist (revision 277440) +++ stable/10/etc/mtree/BSD.tests.dist (revision 277441) @@ -1,348 +1,398 @@ # $FreeBSD$ # # Please see the file src/etc/mtree/README before making changes to this file. # /set type=dir uname=root gname=wheel mode=0755 . include atf-c .. atf-c++ .. .. share atf .. doc atf .. pjdfstest .. .. .. tests bin date .. mv .. pax .. pkill .. sh builtins .. errors .. execution .. expansion .. parameters .. parser .. set-e .. .. sleep .. test .. .. cddl lib .. sbin .. usr.bin .. usr.sbin .. .. etc .. games .. gnu lib .. usr.bin diff .. .. .. lib atf libatf-c detail .. .. libatf-c++ detail .. .. 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 .. librt .. libthr dlopen .. .. libutil .. msun .. .. libexec atf atf-check .. atf-sh .. .. .. sbin dhclient .. devd .. growfs .. mdconfig .. .. secure lib .. libexec .. usr.bin .. usr.sbin .. .. share examples tests atf .. plain .. .. .. .. sys kern .. netinet .. pjdfstest chflags .. chmod .. chown .. ftruncate .. granular .. link .. mkdir .. mkfifo .. mknod .. open .. rename .. rmdir .. symlink .. truncate .. unlink .. .. .. usr.bin apply .. basename .. bmake archives fmt_44bsd .. fmt_44bsd_mod .. fmt_oldbsd .. .. basic t0 .. t1 .. t2 .. t3 .. .. execution ellipsis .. empty .. joberr .. plus .. .. shell builtin .. meta .. path .. path_select .. replace .. select .. .. suffixes basic .. src_wild1 .. src_wild2 .. .. syntax directive-t0 .. enl .. funny-targets .. semi .. .. sysmk t0 2 1 .. .. mk .. .. t1 2 1 .. .. mk .. .. t2 2 1 .. .. mk .. .. .. variables modifier_M .. modifier_t .. opt_V .. t0 .. .. .. calendar .. cmp .. comm .. cut .. dirname .. file2c .. grep .. gzip .. join .. jot .. lastcomm .. m4 .. ncal .. opensm .. printf .. sed regress.multitest.out .. .. tr .. truncate .. uudecode .. uuencode .. xargs .. yacc yacc .. .. .. usr.sbin etcupdate .. newsyslog .. nmtree .. pw .. sa .. .. .. .. # vim: set expandtab ts=4 sw=4: Index: stable/10/lib/libc/Makefile =================================================================== --- stable/10/lib/libc/Makefile (revision 277440) +++ stable/10/lib/libc/Makefile (revision 277441) @@ -1,174 +1,176 @@ # @(#)Makefile 8.2 (Berkeley) 2/3/94 # $FreeBSD$ SHLIBDIR?= /lib .include # Pick the current architecture directory for libc. In general, this is # named MACHINE_CPUARCH, but some ABIs are different enough to require # their own libc, so allow a directory named MACHINE_ARCH to override this. .if exists(${.CURDIR}/${MACHINE_ARCH}) LIBC_ARCH=${MACHINE_ARCH} .else LIBC_ARCH=${MACHINE_CPUARCH} .endif # All library objects contain FreeBSD revision strings by default; they may be # excluded as a space-saving measure. To produce a library that does # not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS # below. Note: there are no IDs for syscall stubs whose sources are generated. # To include legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS # to CFLAGS below. -DSYSLIBC_SCCS affects just the system call stubs. LIB=c SHLIB_MAJOR= 7 SHLIB_LDSCRIPT=libc.ldscript WARNS?= 2 CFLAGS+=-I${.CURDIR}/include -I${.CURDIR}/../../include CFLAGS+=-I${.CURDIR}/${LIBC_ARCH} .if ${MK_NLS} != "no" CFLAGS+=-DNLS .endif CLEANFILES+=tags INSTALL_PIC_ARCHIVE= PRECIOUSLIB= .ifndef NO_THREAD_STACK_UNWIND CANCELPOINTS_CFLAGS=-fexceptions CFLAGS+=${CANCELPOINTS_CFLAGS} .endif # # Only link with static libgcc.a (no libgcc_eh.a). # DPADD+= ${LIBGCC} LDFLAGS+= -nodefaultlibs LDADD+= -lgcc .if ${MK_SSP} != "no" DPADD+= ${LIBSSP_NONSHARED} LDADD+= -lssp_nonshared .endif # Extras that live in either libc.a or libc_nonshared.a LIBC_NONSHARED_SRCS= # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: MDSRCS= MISRCS= MDASM= MIASM= NOASM= .include "${.CURDIR}/${LIBC_ARCH}/Makefile.inc" .include "${.CURDIR}/db/Makefile.inc" .include "${.CURDIR}/compat-43/Makefile.inc" .include "${.CURDIR}/gdtoa/Makefile.inc" .include "${.CURDIR}/gen/Makefile.inc" .include "${.CURDIR}/gmon/Makefile.inc" .if ${MK_ICONV} != "no" .include "${.CURDIR}/iconv/Makefile.inc" .endif .include "${.CURDIR}/inet/Makefile.inc" .include "${.CURDIR}/isc/Makefile.inc" .include "${.CURDIR}/locale/Makefile.inc" .include "${.CURDIR}/md/Makefile.inc" .include "${.CURDIR}/nameser/Makefile.inc" .include "${.CURDIR}/net/Makefile.inc" .include "${.CURDIR}/nls/Makefile.inc" .include "${.CURDIR}/posix1e/Makefile.inc" .if ${LIBC_ARCH} != "amd64" && \ ${LIBC_ARCH} != "ia64" && \ ${LIBC_ARCH} != "powerpc64" && \ ${LIBC_ARCH} != "sparc64" && \ ${MACHINE_ARCH:Mmipsn32*} == "" && \ ${MACHINE_ARCH:Mmips64*} == "" .include "${.CURDIR}/quad/Makefile.inc" .endif .include "${.CURDIR}/regex/Makefile.inc" .include "${.CURDIR}/resolv/Makefile.inc" .include "${.CURDIR}/stdio/Makefile.inc" .include "${.CURDIR}/stdlib/Makefile.inc" .include "${.CURDIR}/stdlib/jemalloc/Makefile.inc" .include "${.CURDIR}/stdtime/Makefile.inc" .include "${.CURDIR}/string/Makefile.inc" .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/rpc/Makefile.inc" .include "${.CURDIR}/uuid/Makefile.inc" .include "${.CURDIR}/xdr/Makefile.inc" .if ${LIBC_ARCH} == "arm" || ${LIBC_ARCH} == "mips" .include "${.CURDIR}/softfloat/Makefile.inc" .endif .if ${MK_NIS} != "no" CFLAGS+= -DYP .include "${.CURDIR}/yp/Makefile.inc" .endif .include "${.CURDIR}/capability/Makefile.inc" .if ${MK_HESIOD} != "no" CFLAGS+= -DHESIOD .endif .if ${MK_FP_LIBC} == "no" CFLAGS+= -DNO_FLOATING_POINT .endif .if ${MK_NS_CACHING} != "no" CFLAGS+= -DNS_CACHING .endif .if defined(_FREEFALL_CONFIG) CFLAGS+=-D_FREEFALL_CONFIG .endif STATICOBJS+=${LIBC_NONSHARED_SRCS:S/.c$/.o/} VERSION_DEF=${.CURDIR}/Versions.def SYMBOL_MAPS=${SYM_MAPS} CFLAGS+= -DSYMBOL_VERSIONING # If there are no machine dependent sources, append all the # machine-independent sources: .if empty(MDSRCS) SRCS+= ${MISRCS} .else # Append machine-dependent sources, then append machine-independent sources # for which there is no machine-dependent variant. SRCS+= ${MDSRCS} .for _src in ${MISRCS} .if ${MDSRCS:R:M${_src:R}} == "" SRCS+= ${_src} .endif .endfor .endif KQSRCS= adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \ lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \ subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c mcount.c strcat.c strchr.c \ strcmp.c strcpy.c strlen.c strncpy.c strrchr.c libkern: libkern.gen libkern.${LIBC_ARCH} libkern.gen: ${KQSRCS} ${KSRCS} cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern libkern.${LIBC_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif .if !defined(WITHOUT_SYSCALL_COMPAT) CFLAGS+=-DSYSCALL_COMPAT .endif +.include + .include # Disable warnings in contributed sources. CWARNFLAGS:= ${.IMPSRC:Ngdtoa_*.c:C/^.+$/${CWARNFLAGS}/:C/^$/-w/} # XXX For now, we don't allow libc to be compiled with # -fstack-protector-all because it breaks rtld. We may want to make a librtld # in the future to circumvent this. SSP_CFLAGS:= ${SSP_CFLAGS:S/^-fstack-protector-all$/-fstack-protector/} # Disable stack protection for SSP symbols. SSP_CFLAGS:= ${.IMPSRC:N*/stack_protector.c:C/^.+$/${SSP_CFLAGS}/} # Generate stack unwinding tables for cancellation points CANCELPOINTS_CFLAGS:= ${.IMPSRC:Mcancelpoints_*:C/^.+$/${CANCELPOINTS_CFLAGS}/:C/^$//} Index: stable/10/lib/libc/Makefile.amd64 =================================================================== --- stable/10/lib/libc/Makefile.amd64 (nonexistent) +++ stable/10/lib/libc/Makefile.amd64 (revision 277441) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Property changes on: stable/10/lib/libc/Makefile.amd64 ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/Makefile.i386 =================================================================== --- stable/10/lib/libc/Makefile.i386 (nonexistent) +++ stable/10/lib/libc/Makefile.i386 (revision 277441) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Property changes on: stable/10/lib/libc/Makefile.i386 ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/Makefile =================================================================== --- stable/10/lib/libc/tests/Makefile (nonexistent) +++ stable/10/lib/libc/tests/Makefile (revision 277441) @@ -0,0 +1,32 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/gen/Makefile =================================================================== --- stable/10/lib/libc/tests/gen/Makefile (nonexistent) +++ stable/10/lib/libc/tests/gen/Makefile (revision 277441) @@ -0,0 +1,61 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/libc/gen + +ATF_TESTS_C= arc4random_test +ATF_TESTS_C+= fpclassify2_test + +# 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 Property changes on: stable/10/lib/libc/tests/gen/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/gen/arc4random_test.c =================================================================== --- stable/10/lib/libc/tests/gen/arc4random_test.c (nonexistent) +++ stable/10/lib/libc/tests/gen/arc4random_test.c (revision 277441) @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * BUFSIZE is the number of bytes of rc4 output to compare. The probability + * that this test fails spuriously is 2**(-BUFSIZE * 8). + */ +#define BUFSIZE 8 + +/* + * Test whether arc4random_buf() returns the same sequence of bytes in both + * parent and child processes. (Hint: It shouldn't.) + */ +ATF_TC_WITHOUT_HEAD(test_arc4random); +ATF_TC_BODY(test_arc4random, tc) +{ + struct shared_page { + char parentbuf[BUFSIZE]; + char childbuf[BUFSIZE]; + } *page; + pid_t pid; + char c; + + printf("1..1\n"); + + page = mmap(NULL, sizeof(struct shared_page), PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0); + if (page == MAP_FAILED) { + printf("fail 1 - mmap\n"); + exit(1); + } + + arc4random_buf(&c, 1); + + pid = fork(); + ATF_REQUIRE(0 <= pid); + if (pid == 0) { + /* child */ + arc4random_buf(page->childbuf, BUFSIZE); + exit(0); + } else { + /* parent */ + int status; + arc4random_buf(page->parentbuf, BUFSIZE); + wait(&status); + } + ATF_CHECK_MSG(memcmp(page->parentbuf, page->childbuf, BUFSIZE) != 0, + "sequences are the same"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_arc4random); + + return (atf_no_error()); +} Property changes on: stable/10/lib/libc/tests/gen/arc4random_test.c ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/gen/fpclassify2_test.c =================================================================== --- stable/10/lib/libc/tests/gen/fpclassify2_test.c (nonexistent) +++ stable/10/lib/libc/tests/gen/fpclassify2_test.c (revision 277441) @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2003 Mike Barcroft + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. 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. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include + +ATF_TC_WITHOUT_HEAD(test_fpclassify); +ATF_TC_BODY(test_fpclassify, tc) +{ + + ATF_CHECK(fpclassify((float)0) == FP_ZERO); + ATF_CHECK(fpclassify((float)-0.0) == FP_ZERO); + ATF_CHECK(fpclassify((float)1) == FP_NORMAL); + ATF_CHECK(fpclassify((float)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((float)HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((float)HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify(NAN) == FP_NAN); + + ATF_CHECK(fpclassify((double)0) == FP_ZERO); + ATF_CHECK(fpclassify((double)-0) == FP_ZERO); + ATF_CHECK(fpclassify((double)1) == FP_NORMAL); + ATF_CHECK(fpclassify((double)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((double)HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((double)HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify((double)NAN) == FP_NAN); + + ATF_CHECK(fpclassify((long double)0) == FP_ZERO); + ATF_CHECK(fpclassify((long double)-0.0) == FP_ZERO); + ATF_CHECK(fpclassify((long double)1) == FP_NORMAL); + ATF_CHECK(fpclassify((long double)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)NAN) == FP_NAN); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_fpclassify); + + return (atf_no_error()); +} Property changes on: stable/10/lib/libc/tests/gen/fpclassify2_test.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/10/lib/libc/tests/gen/execve/Makefile =================================================================== --- stable/10/lib/libc/tests/gen/execve/Makefile (nonexistent) +++ stable/10/lib/libc/tests/gen/execve/Makefile (revision 277441) @@ -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 + +TESTSDIR= ${TESTSBASE}/lib/libc/gen/execve + +NETBSD_ATF_TESTS_C= execve_test + +.include "../../Makefile.netbsd-tests" + +.include Property changes on: stable/10/lib/libc/tests/gen/execve/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/gen/posix_spawn/Makefile =================================================================== --- stable/10/lib/libc/tests/gen/posix_spawn/Makefile (nonexistent) +++ stable/10/lib/libc/tests/gen/posix_spawn/Makefile (revision 277441) @@ -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 + +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 Property changes on: stable/10/lib/libc/tests/gen/posix_spawn/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/Makefile.netbsd-tests =================================================================== --- stable/10/lib/libc/tests/Makefile.netbsd-tests (nonexistent) +++ stable/10/lib/libc/tests/Makefile.netbsd-tests (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/Makefile.netbsd-tests ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/c063/Makefile =================================================================== --- stable/10/lib/libc/tests/c063/Makefile (nonexistent) +++ stable/10/lib/libc/tests/c063/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/c063/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/db/Makefile =================================================================== --- stable/10/lib/libc/tests/db/Makefile (nonexistent) +++ stable/10/lib/libc/tests/db/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/db/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/hash/Makefile =================================================================== --- stable/10/lib/libc/tests/hash/Makefile (nonexistent) +++ stable/10/lib/libc/tests/hash/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/hash/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/inet/Makefile =================================================================== --- stable/10/lib/libc/tests/inet/Makefile (nonexistent) +++ stable/10/lib/libc/tests/inet/Makefile (revision 277441) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/libc/inet + +NETBSD_ATF_TESTS_C= inet_network_test + +.include "../Makefile.netbsd-tests" + +.include Property changes on: stable/10/lib/libc/tests/inet/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/locale/Makefile =================================================================== --- stable/10/lib/libc/tests/locale/Makefile (nonexistent) +++ stable/10/lib/libc/tests/locale/Makefile (revision 277441) @@ -0,0 +1,22 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/locale/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/net/Makefile =================================================================== --- stable/10/lib/libc/tests/net/Makefile (nonexistent) +++ stable/10/lib/libc/tests/net/Makefile (revision 277441) @@ -0,0 +1,39 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/net/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/net/getaddrinfo/Makefile =================================================================== --- stable/10/lib/libc/tests/net/getaddrinfo/Makefile (nonexistent) +++ stable/10/lib/libc/tests/net/getaddrinfo/Makefile (revision 277441) @@ -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 + +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 Property changes on: stable/10/lib/libc/tests/net/getaddrinfo/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/regex/Makefile =================================================================== --- stable/10/lib/libc/tests/regex/Makefile (nonexistent) +++ stable/10/lib/libc/tests/regex/Makefile (revision 277441) @@ -0,0 +1,59 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/regex/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/rpc/Makefile =================================================================== --- stable/10/lib/libc/tests/rpc/Makefile (nonexistent) +++ stable/10/lib/libc/tests/rpc/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/rpc/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/setjmp/Makefile =================================================================== --- stable/10/lib/libc/tests/setjmp/Makefile (nonexistent) +++ stable/10/lib/libc/tests/setjmp/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/setjmp/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/ssp/Makefile =================================================================== --- stable/10/lib/libc/tests/ssp/Makefile (nonexistent) +++ stable/10/lib/libc/tests/ssp/Makefile (revision 277441) @@ -0,0 +1,45 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/ssp/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/stdio/Makefile =================================================================== --- stable/10/lib/libc/tests/stdio/Makefile (nonexistent) +++ stable/10/lib/libc/tests/stdio/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/stdio/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/stdlib/Makefile =================================================================== --- stable/10/lib/libc/tests/stdlib/Makefile (nonexistent) +++ stable/10/lib/libc/tests/stdlib/Makefile (revision 277441) @@ -0,0 +1,44 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/stdlib/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/string/Makefile =================================================================== --- stable/10/lib/libc/tests/string/Makefile (nonexistent) +++ stable/10/lib/libc/tests/string/Makefile (revision 277441) @@ -0,0 +1,33 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/string/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/sys/Makefile =================================================================== --- stable/10/lib/libc/tests/sys/Makefile (nonexistent) +++ stable/10/lib/libc/tests/sys/Makefile (revision 277441) @@ -0,0 +1,85 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/sys/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/termios/Makefile =================================================================== --- stable/10/lib/libc/tests/termios/Makefile (nonexistent) +++ stable/10/lib/libc/tests/termios/Makefile (revision 277441) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/libc/termios + +NETBSD_ATF_TESTS_C= tcsetpgrp_test + +.include "../Makefile.netbsd-tests" + +.include Property changes on: stable/10/lib/libc/tests/termios/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/time/Makefile =================================================================== --- stable/10/lib/libc/tests/time/Makefile (nonexistent) +++ stable/10/lib/libc/tests/time/Makefile (revision 277441) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +.include + +TESTSDIR= ${TESTSBASE}/lib/libc/time + +NETBSD_ATF_TESTS_C= mktime_test +NETBSD_ATF_TESTS_C+= strptime_test + +.include "../Makefile.netbsd-tests" + +.include Property changes on: stable/10/lib/libc/tests/time/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/tls/Makefile =================================================================== --- stable/10/lib/libc/tests/tls/Makefile (nonexistent) +++ stable/10/lib/libc/tests/tls/Makefile (revision 277441) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/tls/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/tls/dso/Makefile =================================================================== --- stable/10/lib/libc/tests/tls/dso/Makefile (nonexistent) +++ stable/10/lib/libc/tests/tls/dso/Makefile (revision 277441) @@ -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 Property changes on: stable/10/lib/libc/tests/tls/dso/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/tls_dso/Makefile =================================================================== --- stable/10/lib/libc/tests/tls_dso/Makefile (nonexistent) +++ stable/10/lib/libc/tests/tls_dso/Makefile (revision 277441) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/tls_dso/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/lib/libc/tests/ttyio/Makefile =================================================================== --- stable/10/lib/libc/tests/ttyio/Makefile (nonexistent) +++ stable/10/lib/libc/tests/ttyio/Makefile (revision 277441) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +.include + +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 Property changes on: stable/10/lib/libc/tests/ttyio/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/10/tools/regression/lib/libc/gen/test-arc4random.c =================================================================== --- stable/10/tools/regression/lib/libc/gen/test-arc4random.c (revision 277440) +++ stable/10/tools/regression/lib/libc/gen/test-arc4random.c (nonexistent) @@ -1,89 +0,0 @@ -/*- - * Copyright (c) 2011 David Schultz - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -__FBSDID("$FreeBSD$"); - -#include -#include -#include -#include -#include -#include -#include - -/* - * BUFSIZE is the number of bytes of rc4 output to compare. The probability - * that this test fails spuriously is 2**(-BUFSIZE * 8). - */ -#define BUFSIZE 8 - -/* - * Test whether arc4random_buf() returns the same sequence of bytes in both - * parent and child processes. (Hint: It shouldn't.) - */ -int main(int argc, char *argv[]) { - struct shared_page { - char parentbuf[BUFSIZE]; - char childbuf[BUFSIZE]; - } *page; - pid_t pid; - char c; - - printf("1..1\n"); - - page = mmap(NULL, sizeof(struct shared_page), PROT_READ | PROT_WRITE, - MAP_ANON | MAP_SHARED, -1, 0); - if (page == MAP_FAILED) { - printf("fail 1 - mmap\n"); - exit(1); - } - - arc4random_buf(&c, 1); - - pid = fork(); - if (pid < 0) { - printf("fail 1 - fork\n"); - exit(1); - } - if (pid == 0) { - /* child */ - arc4random_buf(page->childbuf, BUFSIZE); - exit(0); - } else { - /* parent */ - int status; - arc4random_buf(page->parentbuf, BUFSIZE); - wait(&status); - } - if (memcmp(page->parentbuf, page->childbuf, BUFSIZE) == 0) { - printf("fail 1 - sequences are the same\n"); - exit(1); - } - - printf("ok 1 - sequences are different\n"); - exit(0); -} Property changes on: stable/10/tools/regression/lib/libc/gen/test-arc4random.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: stable/10/tools/regression/lib/libc/gen/test-fpclassify.c =================================================================== --- stable/10/tools/regression/lib/libc/gen/test-fpclassify.c (revision 277440) +++ stable/10/tools/regression/lib/libc/gen/test-fpclassify.c (nonexistent) @@ -1,76 +0,0 @@ -/*- - * Copyright (c) 2003 Mike Barcroft - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. 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. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#include -#include -#include -#include - -int -main(void) -{ - - assert(fpclassify((float)0) == FP_ZERO); - assert(fpclassify((float)-0.0) == FP_ZERO); - assert(fpclassify((float)1) == FP_NORMAL); - assert(fpclassify((float)1000) == FP_NORMAL); -#ifndef __alpha__ - assert(fpclassify(0x1.2p-150f) == FP_SUBNORMAL); -#endif - assert(fpclassify(HUGE_VALF) == FP_INFINITE); - assert(fpclassify((float)HUGE_VAL) == FP_INFINITE); - assert(fpclassify((float)HUGE_VALL) == FP_INFINITE); - assert(fpclassify(NAN) == FP_NAN); - - assert(fpclassify((double)0) == FP_ZERO); - assert(fpclassify((double)-0) == FP_ZERO); - assert(fpclassify((double)1) == FP_NORMAL); - assert(fpclassify((double)1000) == FP_NORMAL); -#ifndef __alpha__ - assert(fpclassify(0x1.2p-1075) == FP_SUBNORMAL); -#endif - assert(fpclassify(HUGE_VAL) == FP_INFINITE); - assert(fpclassify((double)HUGE_VALF) == FP_INFINITE); - assert(fpclassify((double)HUGE_VALL) == FP_INFINITE); - assert(fpclassify((double)NAN) == FP_NAN); - - assert(fpclassify((long double)0) == FP_ZERO); - assert(fpclassify((long double)-0.0) == FP_ZERO); - assert(fpclassify((long double)1) == FP_NORMAL); - assert(fpclassify((long double)1000) == FP_NORMAL); -#ifndef __alpha__ - assert(fpclassify(0x1.2p-16383L) == FP_SUBNORMAL); -#endif - assert(fpclassify(HUGE_VALL) == FP_INFINITE); - assert(fpclassify((long double)HUGE_VALF) == FP_INFINITE); - assert(fpclassify((long double)HUGE_VAL) == FP_INFINITE); - assert(fpclassify((long double)NAN) == FP_NAN); - - printf("PASS fpclassify()\n"); - exit(0); -} Property changes on: stable/10/tools/regression/lib/libc/gen/test-fpclassify.c ___________________________________________________________________ Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Index: stable/10/tools/regression/lib/libc/gen/Makefile =================================================================== --- stable/10/tools/regression/lib/libc/gen/Makefile (revision 277440) +++ stable/10/tools/regression/lib/libc/gen/Makefile (revision 277441) @@ -1,16 +1,16 @@ # $FreeBSD$ -TESTS= test-arc4random test-fmtcheck test-fmtmsg test-fnmatch \ - test-fpclassify test-ftw test-popen test-posix_spawn test-wordexp +TESTS= test-fmtcheck test-fmtmsg test-fnmatch \ + test-ftw test-popen test-posix_spawn test-wordexp .PHONY: tests tests: ${TESTS} for p in ${TESTS}; do ${.OBJDIR}/$$p; done .PHONY: clean clean: -rm -f ${TESTS} sh-tests: test-fnmatch ./test-fnmatch -s 1 >../../../bin/sh/builtins/case2.0 ./test-fnmatch -s 2 >../../../bin/sh/builtins/case3.0 Index: stable/10 =================================================================== --- stable/10 (revision 277440) +++ stable/10 (revision 277441) Property changes on: stable/10 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r274075,274581-274582,274595