svn commit: r273069 - in projects/bhyve_svm: bin/sh bin/sh/tests/builtins contrib/binutils/bfd contrib/binutils/gas/config contrib/binutils/ld/emulparams contrib/libc++/include contrib/netbsd-tests...
Neel Natu
neel at FreeBSD.org
Tue Oct 14 03:39:44 UTC 2014
Author: neel
Date: Tue Oct 14 03:39:31 2014
New Revision: 273069
URL: https://svnweb.freebsd.org/changeset/base/273069
Log:
IFC @r273066
Added:
projects/bhyve_svm/bin/sh/tests/builtins/eval7.0
- copied unchanged from r273066, head/bin/sh/tests/builtins/eval7.0
projects/bhyve_svm/bin/sh/tests/builtins/eval8.7
- copied unchanged from r273066, head/bin/sh/tests/builtins/eval8.7
projects/bhyve_svm/lib/libevent/
- copied from r273066, head/lib/libevent/
projects/bhyve_svm/sys/arm/altera/socfpga/socfpga_mp.c
- copied unchanged from r273066, head/sys/arm/altera/socfpga/socfpga_mp.c
projects/bhyve_svm/sys/libkern/murmur3_32.c
- copied unchanged from r273066, head/sys/libkern/murmur3_32.c
Deleted:
projects/bhyve_svm/sys/arm/ti/am335x/files.beaglebone
projects/bhyve_svm/sys/arm/ti/am335x/std.beaglebone
projects/bhyve_svm/sys/arm/ti/omap3/
projects/bhyve_svm/sys/arm/ti/ti_mmchs.c
projects/bhyve_svm/sys/arm/ti/ti_mmchs.h
projects/bhyve_svm/usr.sbin/ftp-proxy/Makefile.inc
projects/bhyve_svm/usr.sbin/ftp-proxy/ftp-proxy/
projects/bhyve_svm/usr.sbin/ftp-proxy/libevent/
Modified:
projects/bhyve_svm/bin/sh/eval.c
projects/bhyve_svm/bin/sh/tests/builtins/Makefile
projects/bhyve_svm/contrib/binutils/bfd/elf32-ppc.c
projects/bhyve_svm/contrib/binutils/bfd/elf64-ppc.c
projects/bhyve_svm/contrib/binutils/gas/config/tc-ppc.c
projects/bhyve_svm/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh
projects/bhyve_svm/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh
projects/bhyve_svm/contrib/libc++/include/__config
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_glob.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_nice.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_raise.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_time.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_io.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/debug.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memmem.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_strerror.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_mktime.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_strptime.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_static_helper.c
projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls_dso/h_tls_dynamic.c
projects/bhyve_svm/contrib/tcp_wrappers/inetcf.h
projects/bhyve_svm/contrib/tcp_wrappers/mystdarg.h
projects/bhyve_svm/contrib/tcp_wrappers/tcpd.h
projects/bhyve_svm/contrib/tcp_wrappers/tli-sequent.h
projects/bhyve_svm/etc/defaults/rc.conf
projects/bhyve_svm/etc/devd/apple.conf
projects/bhyve_svm/etc/rc.d/bgfsck
projects/bhyve_svm/etc/rc.d/netif
projects/bhyve_svm/etc/rc.subr
projects/bhyve_svm/lib/Makefile
projects/bhyve_svm/lib/libcuse/cuse_lib.c
projects/bhyve_svm/sbin/ipfw/ipfw2.c
projects/bhyve_svm/sbin/ipfw/tables.c (contents, props changed)
projects/bhyve_svm/sbin/iscontrol/iscontrol.8
projects/bhyve_svm/share/man/man4/iscsi_initiator.4
projects/bhyve_svm/share/man/man4/tcp.4
projects/bhyve_svm/share/man/man8/rc.subr.8
projects/bhyve_svm/share/mk/bsd.progs.mk
projects/bhyve_svm/share/mk/src.libnames.mk
projects/bhyve_svm/sys/arm/altera/socfpga/files.socfpga
projects/bhyve_svm/sys/arm/altera/socfpga/socfpga_machdep.c
projects/bhyve_svm/sys/arm/conf/BEAGLEBONE
projects/bhyve_svm/sys/arm/conf/SOCKIT
projects/bhyve_svm/sys/arm/ti/am335x/files.am335x
projects/bhyve_svm/sys/arm/ti/files.ti
projects/bhyve_svm/sys/arm/ti/omap4/files.omap4
projects/bhyve_svm/sys/arm/ti/ti_cpuid.c
projects/bhyve_svm/sys/arm/ti/ti_cpuid.h
projects/bhyve_svm/sys/arm/ti/ti_gpio.c
projects/bhyve_svm/sys/arm/ti/ti_i2c.c
projects/bhyve_svm/sys/arm/ti/ti_sdhci.c
projects/bhyve_svm/sys/boot/fdt/dts/arm/socfpga-sockit.dts
projects/bhyve_svm/sys/boot/powerpc/ofw/ldscript.powerpc
projects/bhyve_svm/sys/boot/powerpc/ps3/ldscript.powerpc
projects/bhyve_svm/sys/boot/powerpc/uboot/ldscript.powerpc
projects/bhyve_svm/sys/cam/ctl/ctl.c
projects/bhyve_svm/sys/cam/ctl/ctl_backend.h
projects/bhyve_svm/sys/cam/ctl/ctl_backend_block.c
projects/bhyve_svm/sys/cam/ctl/ctl_cmd_table.c
projects/bhyve_svm/sys/cam/ctl/ctl_frontend_iscsi.c
projects/bhyve_svm/sys/cam/ctl/ctl_frontend_iscsi.h
projects/bhyve_svm/sys/cam/ctl/ctl_ioctl.h
projects/bhyve_svm/sys/cam/ctl/ctl_private.h
projects/bhyve_svm/sys/cam/ctl/scsi_ctl.c
projects/bhyve_svm/sys/cam/scsi/scsi_da.h
projects/bhyve_svm/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
projects/bhyve_svm/sys/conf/files
projects/bhyve_svm/sys/conf/ldscript.powerpc
projects/bhyve_svm/sys/conf/ldscript.powerpc64
projects/bhyve_svm/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h
projects/bhyve_svm/sys/ddb/db_access.c
projects/bhyve_svm/sys/ddb/db_break.c
projects/bhyve_svm/sys/ddb/db_command.c
projects/bhyve_svm/sys/ddb/db_examine.c
projects/bhyve_svm/sys/ddb/db_input.c
projects/bhyve_svm/sys/ddb/db_lex.c
projects/bhyve_svm/sys/ddb/db_output.c
projects/bhyve_svm/sys/ddb/db_output.h
projects/bhyve_svm/sys/ddb/db_print.c
projects/bhyve_svm/sys/ddb/db_ps.c
projects/bhyve_svm/sys/ddb/db_run.c
projects/bhyve_svm/sys/ddb/db_sym.c
projects/bhyve_svm/sys/ddb/db_sym.h
projects/bhyve_svm/sys/ddb/db_textdump.c
projects/bhyve_svm/sys/ddb/db_variables.h
projects/bhyve_svm/sys/ddb/db_watch.c
projects/bhyve_svm/sys/ddb/db_watch.h
projects/bhyve_svm/sys/ddb/db_write_cmd.c
projects/bhyve_svm/sys/dev/alc/if_alc.c
projects/bhyve_svm/sys/dev/amdtemp/amdtemp.c
projects/bhyve_svm/sys/dev/ctau/if_ct.c
projects/bhyve_svm/sys/dev/cx/if_cx.c
projects/bhyve_svm/sys/dev/digi/digi_isa.c
projects/bhyve_svm/sys/dev/e1000/if_igb.c
projects/bhyve_svm/sys/dev/iicbus/max6690.c
projects/bhyve_svm/sys/dev/isp/isp_library.c
projects/bhyve_svm/sys/dev/isp/ispmbox.h
projects/bhyve_svm/sys/dev/mc146818/mc146818.c
projects/bhyve_svm/sys/dev/mrsas/mrsas.c
projects/bhyve_svm/sys/dev/mrsas/mrsas.h
projects/bhyve_svm/sys/dev/mrsas/mrsas_cam.c
projects/bhyve_svm/sys/dev/mrsas/mrsas_fp.c
projects/bhyve_svm/sys/dev/mse/mse.c
projects/bhyve_svm/sys/dev/mse/mse_cbus.c
projects/bhyve_svm/sys/dev/mse/mse_isa.c
projects/bhyve_svm/sys/dev/mse/msevar.h
projects/bhyve_svm/sys/dev/msk/if_msk.c
projects/bhyve_svm/sys/dev/nfe/if_nfe.c
projects/bhyve_svm/sys/dev/random/ivy.c
projects/bhyve_svm/sys/dev/sdhci/sdhci_pci.c
projects/bhyve_svm/sys/dev/sk/if_sk.c
projects/bhyve_svm/sys/dev/uart/uart_dev_imx.c
projects/bhyve_svm/sys/fs/autofs/autofs_vnops.c
projects/bhyve_svm/sys/fs/ext2fs/ext2_vnops.c
projects/bhyve_svm/sys/fs/msdosfs/msdosfs_vnops.c
projects/bhyve_svm/sys/i386/xen/pmap.c
projects/bhyve_svm/sys/kern/subr_witness.c
projects/bhyve_svm/sys/net/if_epair.c
projects/bhyve_svm/sys/netinet/igmp.c
projects/bhyve_svm/sys/netinet/ip_divert.c
projects/bhyve_svm/sys/netinet/ip_fw.h
projects/bhyve_svm/sys/netinet/ip_mroute.c
projects/bhyve_svm/sys/netinet/ip_output.c
projects/bhyve_svm/sys/netinet/tcp_output.c
projects/bhyve_svm/sys/netinet/tcp_timer.c
projects/bhyve_svm/sys/netinet/tcp_usrreq.c
projects/bhyve_svm/sys/netinet6/icmp6.c
projects/bhyve_svm/sys/netinet6/ip6_mroute.c
projects/bhyve_svm/sys/netinet6/ip6_output.c
projects/bhyve_svm/sys/netpfil/ipfw/ip_fw_sockopt.c
projects/bhyve_svm/sys/netpfil/ipfw/ip_fw_table_algo.c
projects/bhyve_svm/sys/netpfil/ipfw/ip_fw_table_value.c (contents, props changed)
projects/bhyve_svm/sys/netpfil/pf/pf.c
projects/bhyve_svm/sys/powerpc/powermac/pmu.c
projects/bhyve_svm/sys/sparc64/sparc64/support.S
projects/bhyve_svm/sys/sys/hash.h
projects/bhyve_svm/sys/sys/param.h
projects/bhyve_svm/sys/ufs/ffs/ffs_vnops.c
projects/bhyve_svm/sys/vm/vm_fault.c
projects/bhyve_svm/tools/tools/netmap/pkt-gen.c
projects/bhyve_svm/usr.bin/kdump/kdump.c
projects/bhyve_svm/usr.bin/kdump/mksubr
projects/bhyve_svm/usr.bin/truss/syscall.h
projects/bhyve_svm/usr.bin/truss/syscalls.c
projects/bhyve_svm/usr.sbin/bsdinstall/partedit/partedit_x86.c
projects/bhyve_svm/usr.sbin/ctladm/ctladm.8
projects/bhyve_svm/usr.sbin/ctladm/ctladm.c
projects/bhyve_svm/usr.sbin/ctld/kernel.c
projects/bhyve_svm/usr.sbin/ftp-proxy/Makefile
projects/bhyve_svm/usr.sbin/pstat/pstat.8
projects/bhyve_svm/usr.sbin/rtadvd/advcap.c
projects/bhyve_svm/usr.sbin/rtadvd/config.c
projects/bhyve_svm/usr.sbin/rtsold/rtsol.c
Directory Properties:
projects/bhyve_svm/ (props changed)
projects/bhyve_svm/contrib/binutils/ (props changed)
projects/bhyve_svm/contrib/libc++/ (props changed)
projects/bhyve_svm/etc/ (props changed)
projects/bhyve_svm/sbin/ (props changed)
projects/bhyve_svm/sbin/ipfw/ (props changed)
projects/bhyve_svm/share/ (props changed)
projects/bhyve_svm/share/man/man4/ (props changed)
projects/bhyve_svm/sys/ (props changed)
projects/bhyve_svm/sys/boot/ (props changed)
projects/bhyve_svm/sys/boot/powerpc/ofw/ (props changed)
projects/bhyve_svm/sys/cddl/contrib/opensolaris/ (props changed)
projects/bhyve_svm/sys/conf/ (props changed)
projects/bhyve_svm/usr.sbin/rtadvd/ (props changed)
projects/bhyve_svm/usr.sbin/rtsold/ (props changed)
Modified: projects/bhyve_svm/bin/sh/eval.c
==============================================================================
--- projects/bhyve_svm/bin/sh/eval.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/bin/sh/eval.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -168,6 +168,8 @@ evalstring(char *s, int flags)
else
evaltree(n, flags);
any = 1;
+ if (evalskip)
+ break;
}
popstackmark(&smark);
setstackmark(&smark);
Modified: projects/bhyve_svm/bin/sh/tests/builtins/Makefile
==============================================================================
--- projects/bhyve_svm/bin/sh/tests/builtins/Makefile Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/bin/sh/tests/builtins/Makefile Tue Oct 14 03:39:31 2014 (r273069)
@@ -72,6 +72,8 @@ FILES+= eval3.0
FILES+= eval4.0
FILES+= eval5.0
FILES+= eval6.0
+FILES+= eval7.0
+FILES+= eval8.7
FILES+= exec1.0
FILES+= exec2.0
FILES+= exit1.0
Copied: projects/bhyve_svm/bin/sh/tests/builtins/eval7.0 (from r273066, head/bin/sh/tests/builtins/eval7.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/bhyve_svm/bin/sh/tests/builtins/eval7.0 Tue Oct 14 03:39:31 2014 (r273069, copy of r273066, head/bin/sh/tests/builtins/eval7.0)
@@ -0,0 +1,9 @@
+# $FreeBSD$
+# Assumes that break can break out of a loop outside eval.
+
+while :; do
+ eval "break
+echo bad1"
+ echo bad2
+ exit 3
+done
Copied: projects/bhyve_svm/bin/sh/tests/builtins/eval8.7 (from r273066, head/bin/sh/tests/builtins/eval8.7)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/bhyve_svm/bin/sh/tests/builtins/eval8.7 Tue Oct 14 03:39:31 2014 (r273069, copy of r273066, head/bin/sh/tests/builtins/eval8.7)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+f() {
+ eval "return 7
+echo bad2"
+}
+f
Modified: projects/bhyve_svm/contrib/binutils/bfd/elf32-ppc.c
==============================================================================
--- projects/bhyve_svm/contrib/binutils/bfd/elf32-ppc.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/binutils/bfd/elf32-ppc.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -7572,7 +7572,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
#define TARGET_LITTLE_NAME "elf32-powerpcle"
#define TARGET_BIG_SYM bfd_elf32_powerpc_vec
-#define TARGET_BIG_NAME "elf32-powerpc"
+#define TARGET_BIG_NAME "elf32-powerpc-freebsd"
#define ELF_ARCH bfd_arch_powerpc
#define ELF_MACHINE_CODE EM_PPC
#ifdef __QNXTARGET__
Modified: projects/bhyve_svm/contrib/binutils/bfd/elf64-ppc.c
==============================================================================
--- projects/bhyve_svm/contrib/binutils/bfd/elf64-ppc.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/binutils/bfd/elf64-ppc.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -58,7 +58,7 @@ static bfd_vma opd_entry_value
#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
#define TARGET_LITTLE_NAME "elf64-powerpcle"
#define TARGET_BIG_SYM bfd_elf64_powerpc_vec
-#define TARGET_BIG_NAME "elf64-powerpc"
+#define TARGET_BIG_NAME "elf64-powerpc-freebsd"
#define ELF_ARCH bfd_arch_powerpc
#define ELF_MACHINE_CODE EM_PPC64
#define ELF_MAXPAGESIZE 0x10000
Modified: projects/bhyve_svm/contrib/binutils/gas/config/tc-ppc.c
==============================================================================
--- projects/bhyve_svm/contrib/binutils/gas/config/tc-ppc.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/binutils/gas/config/tc-ppc.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -1210,7 +1210,7 @@ ppc_target_format (void)
return "elf32-powerpc-vxworks";
# else
return (target_big_endian
- ? (ppc_obj64 ? "elf64-powerpc" : "elf32-powerpc")
+ ? (ppc_obj64 ? "elf64-powerpc-freebsd" : "elf32-powerpc-freebsd")
: (ppc_obj64 ? "elf64-powerpcle" : "elf32-powerpcle"));
# endif
#endif
Modified: projects/bhyve_svm/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh
==============================================================================
--- projects/bhyve_svm/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/binutils/ld/emulparams/elf32ppc_fbsd.sh Tue Oct 14 03:39:31 2014 (r273069)
@@ -1,2 +1,4 @@
. ${srcdir}/emulparams/elf32ppc.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+
+OUTPUT_FORMAT="elf32-powerpc-freebsd"
Modified: projects/bhyve_svm/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh
==============================================================================
--- projects/bhyve_svm/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/binutils/ld/emulparams/elf64ppc_fbsd.sh Tue Oct 14 03:39:31 2014 (r273069)
@@ -1,3 +1,4 @@
. ${srcdir}/emulparams/elf64ppc.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-powerpc-freebsd"
Modified: projects/bhyve_svm/contrib/libc++/include/__config
==============================================================================
--- projects/bhyve_svm/contrib/libc++/include/__config Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/libc++/include/__config Tue Oct 14 03:39:31 2014 (r273069)
@@ -374,6 +374,7 @@ namespace std {
#define _LIBCPP_HAS_NO_VARIADICS
#define _LIBCPP_HAS_NO_RVALUE_REFERENCES
#define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS
+#define _LIBCPP_HAS_NO_STRONG_ENUMS
#else // __GXX_EXPERIMENTAL_CXX0X__
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/posix_spawn/t_fileactions.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -31,6 +31,9 @@
*/
+#if defined(__FreeBSD__)
+#include <sys/stat.h>
+#endif
#include <atf-c.h>
#include <stdio.h>
#include <stdlib.h>
@@ -248,6 +251,7 @@ ATF_TC_BODY(t_spawn_open_nonexistent, tc
posix_spawn_file_actions_destroy(&fa);
}
+#if defined(__NetBSD__)
ATF_TC(t_spawn_open_nonexistent_diag);
ATF_TC_HEAD(t_spawn_open_nonexistent_diag, tc)
@@ -283,6 +287,7 @@ ATF_TC_BODY(t_spawn_open_nonexistent_dia
posix_spawn_file_actions_destroy(&fa);
posix_spawnattr_destroy(&attr);
}
+#endif
ATF_TC(t_spawn_fileactions);
@@ -376,7 +381,9 @@ ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, t_spawn_fileactions);
ATF_TP_ADD_TC(tp, t_spawn_open_nonexistent);
+#if defined(__NetBSD__)
ATF_TP_ADD_TC(tp, t_spawn_open_nonexistent_diag);
+#endif
ATF_TP_ADD_TC(tp, t_spawn_reopen);
ATF_TP_ADD_TC(tp, t_spawn_openmode);
ATF_TP_ADD_TC(tp, t_spawn_empty_fileactions);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_getcwd.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -56,10 +56,12 @@ ATF_TC_BODY(getcwd_err, tc)
ATF_REQUIRE(getcwd(buf, 0) == NULL);
ATF_REQUIRE(errno == EINVAL);
+#if defined(__NetBSD__)
errno = 0;
ATF_REQUIRE(getcwd((void *)-1, sizeof(buf)) == NULL);
ATF_REQUIRE(errno == EFAULT);
+#endif
}
ATF_TC(getcwd_fts);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_glob.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_glob.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_glob.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -46,7 +46,13 @@ __RCSID("$NetBSD: t_glob.c,v 1.3 2013/01
#include <string.h>
#include <errno.h>
+#if defined(__FreeBSD__)
+#include "h_macros.h"
+#define __gl_stat_t struct stat
+#define _S_IFDIR S_IFDIR
+#else
#include "../../../h_macros.h"
+#endif
#ifdef DEBUG
@@ -132,7 +138,11 @@ gl_readdir(void *v)
dir.d_ino = dd->pos;
dir.d_type = f->dir ? DT_DIR : DT_REG;
DPRINTF(("readdir %s %d\n", dir.d_name, dir.d_type));
+#if defined(__FreeBSD__)
+ dir.d_reclen = -1; /* Does not have _DIRENT_RECLEN */
+#else
dir.d_reclen = _DIRENT_RECLEN(&dir, dir.d_namlen);
+#endif
return &dir;
}
return NULL;
@@ -213,6 +223,7 @@ run(const char *p, int flags, const char
}
+#if !defined(__FreeBSD__)
ATF_TC(glob_star);
ATF_TC_HEAD(glob_star, tc)
{
@@ -224,6 +235,7 @@ ATF_TC_BODY(glob_star, tc)
{
run("a/**", GLOB_STAR, glob_star, __arraycount(glob_star));
}
+#endif
ATF_TC(glob_star_not);
ATF_TC_HEAD(glob_star_not, tc)
@@ -260,7 +272,9 @@ ATF_TC_BODY(glob_nocheck, tc)
ATF_TP_ADD_TCS(tp)
{
+#if !defined(__FreeBSD__)
ATF_TP_ADD_TC(tp, glob_star);
+#endif
ATF_TP_ADD_TC(tp, glob_star_not);
/*
* Remove this test for now - the GLOB_NOCHECK return value has been
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_humanize_number.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -34,7 +34,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#if defined(__FreeBSD__)
+#include <libutil.h>
+#else
#include <util.h>
+#endif
const struct hnopts {
size_t ho_len;
@@ -78,6 +82,7 @@ const struct hnopts {
/*
* Truncated output. Rev. 1.7 produces "1.0 K".
*/
+#if !defined(__FreeBSD__)
{ 6, 1000, "A", HN_AUTOSCALE, HN_DECIMAL, -1, "" },
/*
@@ -90,6 +95,7 @@ const struct hnopts {
/* Similar case it prints 1000 where it shouldn't */
{ 5, 1023488, "",
HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL, 4, "1.0M" },
+#endif
{ 5, 1023999, "",
HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL, 4, "1.0M" },
};
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_nice.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_nice.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_nice.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -72,6 +72,11 @@ ATF_TC_BODY(nice_err, tc)
{
int i;
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("nice(incr) with incr < 0 fails with unprivileged "
+ "users and sets errno == EPERM; see PR # 189821 for more details");
+#endif
+
/*
* The call should fail with EPERM if the
* supplied parameter is negative and the
@@ -93,7 +98,11 @@ ATF_TC_HEAD(nice_priority, tc)
ATF_TC_BODY(nice_priority, tc)
{
+#if defined(__FreeBSD__)
+ int i, pri, pri2, nic;
+#else
int i, pri, nic;
+#endif
pid_t pid;
int sta;
@@ -106,8 +115,10 @@ ATF_TC_BODY(nice_priority, tc)
pri = getpriority(PRIO_PROCESS, 0);
ATF_REQUIRE(errno == 0);
+#if defined(__NetBSD__)
if (nic != pri)
atf_tc_fail("nice(3) and getpriority(2) conflict");
+#endif
/*
* Also verify that the nice(3) values
@@ -119,10 +130,18 @@ ATF_TC_BODY(nice_priority, tc)
if (pid == 0) {
errno = 0;
+#if defined(__FreeBSD__)
pri = getpriority(PRIO_PROCESS, 0);
+#else
+ pri2 = getpriority(PRIO_PROCESS, 0);
+#endif
ATF_REQUIRE(errno == 0);
+#if defined(__FreeBSD__)
+ if (pri != pri2)
+#else
if (nic != pri)
+#endif
_exit(EXIT_FAILURE);
_exit(EXIT_SUCCESS);
@@ -161,7 +180,11 @@ ATF_TC_HEAD(nice_thread, tc)
ATF_TC_BODY(nice_thread, tc)
{
pthread_t tid[5];
+#if defined(__FreeBSD__)
+ int pri, rv, val;
+#else
int rv, val;
+#endif
size_t i;
/*
@@ -173,7 +196,12 @@ ATF_TC_BODY(nice_thread, tc)
val = nice(i);
ATF_REQUIRE(val != -1);
+#if defined(__FreeBSD__)
+ pri = getpriority(PRIO_PROCESS, 0);
+ rv = pthread_create(&tid[i], NULL, threadfunc, &pri);
+#else
rv = pthread_create(&tid[i], NULL, threadfunc, &val);
+#endif
ATF_REQUIRE(rv == 0);
rv = pthread_join(tid[i], NULL);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_raise.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_raise.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_raise.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -43,7 +43,11 @@ static int count;
static void handler_err(int);
static void handler_ret(int);
static void handler_stress(int);
+#if defined(__FreeBSD__)
+static int sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2 };
+#else
static int sig[] = { SIGALRM, SIGIO, SIGUSR1, SIGUSR2, SIGPWR };
+#endif
static void
handler_stress(int signo)
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -63,8 +63,20 @@ ATF_TC_BODY(setdomainname_basic, tc)
(void)memset(name, 0, sizeof(name));
+#if defined(__FreeBSD__)
+ /*
+ * Sanity checks to ensure that the wrong invariant isn't being
+ * tested for per PR # 181127
+ */
+ ATF_REQUIRE_EQ(sizeof(domains[i]), MAXHOSTNAMELEN);
+ ATF_REQUIRE_EQ(sizeof(name), MAXHOSTNAMELEN);
+
+ ATF_REQUIRE(setdomainname(domains[i],sizeof(domains[i]) - 1) == 0);
+ ATF_REQUIRE(getdomainname(name, sizeof(name) - 1) == 0);
+#else
ATF_REQUIRE(setdomainname(domains[i],sizeof(domains[i])) == 0);
ATF_REQUIRE(getdomainname(name, sizeof(name)) == 0);
+#endif
ATF_REQUIRE(strcmp(domains[i], name) == 0);
}
@@ -89,6 +101,10 @@ ATF_TC_BODY(setdomainname_limit, tc)
(void)memset(name, 0, sizeof(name));
+#if defined(__FreeBSD__)
+ ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN - 1 ) == 0);
+ ATF_REQUIRE(setdomainname(name, MAXHOSTNAMELEN) == -1);
+#endif
ATF_REQUIRE(setdomainname(name, sizeof(name)) == -1);
}
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_sethostname.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -63,8 +63,20 @@ ATF_TC_BODY(sethostname_basic, tc)
(void)memset(name, 0, sizeof(name));
+#if defined(__FreeBSD__)
+ /*
+ * Sanity checks to ensure that the wrong invariant isn't being
+ * tested for per PR # 181127
+ */
+ ATF_REQUIRE_EQ(sizeof(hosts[i]), MAXHOSTNAMELEN);
+ ATF_REQUIRE_EQ(sizeof(name), MAXHOSTNAMELEN);
+
+ ATF_REQUIRE(sethostname(hosts[i], sizeof(hosts[i]) - 1) == 0);
+ ATF_REQUIRE(gethostname(name, sizeof(name) - 1) == 0);
+#else
ATF_REQUIRE(sethostname(hosts[i], sizeof(hosts[i])) == 0);
ATF_REQUIRE(gethostname(name, sizeof(name)) == 0);
+#endif
ATF_REQUIRE(strcmp(hosts[i], name) == 0);
}
@@ -94,6 +106,10 @@ ATF_TC_BODY(sethostname_limit, tc)
ATF_TC_CLEANUP(sethostname_limit, tc)
{
+#if defined(__FreeBSD__)
+ ATF_REQUIRE(sethostname(host, MAXHOSTNAMELEN - 1 ) == 0);
+ ATF_REQUIRE(sethostname(host, MAXHOSTNAMELEN) == -1);
+#endif
(void)sethostname(host, sizeof(host));
}
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_time.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_time.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_time.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -31,6 +31,9 @@
#include <sys/cdefs.h>
__RCSID("$NetBSD: t_time.c,v 1.2 2011/11/11 05:03:38 jruoho Exp $");
+#if defined(__FreeBSD__)
+#include <sys/time.h>
+#endif
#include <atf-c.h>
#include <errno.h>
#include <inttypes.h>
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -107,6 +107,9 @@ ATF_TC_BODY(ttyname_r_err, tc)
ATF_REQUIRE(rv == ERANGE);
}
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("FreeBSD returns ENOTTY instead of EBADF; see bin/191936");
+#endif
rv = ttyname_r(-1, buf, ttymax);
ATF_REQUIRE(rv == EBADF);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_io.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_io.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_io.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -56,6 +56,11 @@ ATF_TC_BODY(bad_big5_wprintf, tc)
/* XXX implementation detail knowledge (wchar_t encoding) */
wchar_t ibuf[] = { 0xcf10, 0 };
setlocale(LC_CTYPE, "zh_TW.Big5");
+
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("does not fail as expected (may be implementation "
+ "specific issue with the test)");
+#endif
ATF_REQUIRE_ERRNO(EILSEQ, wprintf(L"%ls\n", ibuf) < 0);
ATF_REQUIRE(ferror(stdout));
}
@@ -72,6 +77,11 @@ ATF_TC_BODY(bad_big5_swprintf, tc)
wchar_t ibuf[] = { 0xcf10, 0 };
wchar_t obuf[20];
setlocale(LC_CTYPE, "zh_TW.Big5");
+
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("does not fail as expected (may be implementation "
+ "specific issue with the test)");
+#endif
ATF_REQUIRE_ERRNO(EILSEQ,
swprintf(obuf, sizeof(obuf), L"%ls\n", ibuf) < 0);
}
@@ -161,6 +171,9 @@ ATF_TC_BODY(bad_big5_getwc, tc)
ATF_REQUIRE(fp != NULL);
setlocale(LC_CTYPE, "zh_TW.Big5");
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("does not return WEOF as expected");
+#endif
ATF_REQUIRE_EQ(getwc(fp), WEOF);
fclose(fp);
}
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbrtowc.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -132,7 +132,14 @@ h_ctype2(const struct test *t, bool use_
size_t n;
ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+#if defined(__NetBSD__)
ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
+#else
+ if (setlocale(LC_CTYPE, t->locale) == NULL) {
+ fprintf(stderr, "Locale %s not found.\n", t->locale);
+ return;
+ }
+#endif
(void)strvis(buf, t->data, VIS_WHITE | VIS_OCTAL);
(void)printf("Checking string: \"%s\"\n", buf);
@@ -238,6 +245,9 @@ ATF_TC_BODY(mbrtowc_internal, tc)
{
struct test *t;
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("ja_* locale fails");
+#endif
for (t = &tests[0]; t->data != NULL; ++t)
h_ctype2(t, false);
}
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbstowcs.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -150,7 +150,14 @@ ATF_TC_BODY(mbstowcs_basic, tc)
int i;
ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+#if defined(__NetBSD__)
ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
+#else
+ if (setlocale(LC_CTYPE, t->locale) == NULL) {
+ fprintf(stderr, "Locale %s not found.\n", t->locale);
+ continue;
+ }
+#endif
(void)strvis(visbuf, t->data, VIS_WHITE | VIS_OCTAL);
(void)printf("Checking string: \"%s\"\n", visbuf);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_mbtowc.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -76,7 +76,14 @@ h_mbtowc(const char *locale, const char
char *str;
ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+#if defined(__NetBSD__)
ATF_REQUIRE(setlocale(LC_CTYPE, locale) != NULL);
+#else
+ if (setlocale(LC_CTYPE, locale) == NULL) {
+ fprintf(stderr, "Locale %s not found.\n", locale);
+ return;
+ }
+#endif
ATF_REQUIRE((str = setlocale(LC_ALL, NULL)) != NULL);
(void)printf("Using locale: %s\n", str);
@@ -130,9 +137,16 @@ ATF_TC_BODY(mbtowc, tc)
h_mbtowc("ja_JP.ISO2022-JP", "\033$B", "\033$B$\"\033(B");
h_mbtowc("ja_JP.SJIS", "\202", "\202\240");
h_mbtowc("ja_JP.eucJP", "\244", "\244\242");
+#if !defined(__FreeBSD__)
+ /* Moved last as it fails */
h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
+#endif
h_mbtowc("zh_TW.Big5", "\241", "\241@");
h_mbtowc("zh_TW.eucTW", "\241", "\241\241");
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("zh_CN.GB18030");
+ h_mbtowc("zh_CN.GB18030", "\241", "\241\241");
+#endif
}
ATF_TP_ADD_TCS(tp)
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wcstod.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -66,6 +66,10 @@ __RCSID("$NetBSD: t_wcstod.c,v 1.3 2011/
#include <atf-c.h>
+#if defined(__FreeBSD__)
+#include <stdio.h>
+#endif
+
#define ALT_HUGE_VAL -1
#define ALT_MINUS_HUGE_VAL -2
#define ALT_NAN -3
@@ -234,7 +238,7 @@ static struct test {
{ L" -0X.", 12, 0, 0 },
#endif
/* XXX: FIXME */
-#if defined(__NetBSD__) || defined(__linux__)
+#if defined(__NetBSD__) || defined(__linux__) || defined(__FreeBSD__)
{ L"0X.0", 4, 0, 0 },
{ L"+0X.0", 5, 0, 0 },
{ L"-0X.0", 5, 0, 0 },
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/locale/t_wctomb.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -109,7 +109,14 @@ h_wctomb(const struct test *t, char tc)
size_t sz, ret, i;
ATF_REQUIRE_STREQ(setlocale(LC_ALL, "C"), "C");
+#if defined(__NetBSD__)
ATF_REQUIRE(setlocale(LC_CTYPE, t->locale) != NULL);
+#else
+ if (setlocale(LC_CTYPE, t->locale) == NULL) {
+ fprintf(stderr, "Locale %s not found.\n", t->locale);
+ return;
+ }
+#endif
(void)strvis(buf, t->data, VIS_WHITE | VIS_OCTAL);
(void)printf("Checking sequence: \"%s\"\n", buf);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/debug.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/debug.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/debug.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -34,6 +34,10 @@
#include <string.h>
#include <sys/types.h>
+#if defined(__FreeBSD__)
+#include <wchar.h>
+#include <wctype.h>
+#endif
/* Don't sort these! */
#include "utils.h"
@@ -50,6 +54,7 @@ static char *regchar(int);
void
regprint(regex_t *r, FILE *d)
{
+#if defined(__NetBSD__)
struct re_guts *g = r->re_g;
int c;
int last;
@@ -111,6 +116,7 @@ regprint(regex_t *r, FILE *d)
}
fprintf(d, "\n");
}
+#endif
}
/*
@@ -171,6 +177,7 @@ s_print(struct re_guts *g, FILE *d)
break;
case OANYOF:
fprintf(d, "[(%ld)", (long)opnd);
+#if defined(__NetBSD__)
cs = &g->sets[opnd];
last = -1;
for (size_t i = 0; i < g->csetsize+1; i++) /* +1 flushes */
@@ -187,6 +194,7 @@ s_print(struct re_guts *g, FILE *d)
last = -1;
}
}
+#endif
fprintf(d, "]");
break;
case OBACK_:
@@ -242,7 +250,11 @@ s_print(struct re_guts *g, FILE *d)
fprintf(d, ">");
break;
default:
+#if defined(__FreeBSD__)
+ fprintf(d, "!%ld(%ld)!", OP(*s), opnd);
+#else
fprintf(d, "!%d(%d)!", OP(*s), opnd);
+#endif
break;
}
if (!done)
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_exhaust.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -45,6 +45,9 @@ __RCSID("$NetBSD: t_exhaust.c,v 1.7 2011
#include <stdlib.h>
#include <err.h>
#include <atf-c.h>
+#if defined(__FreeBSD__)
+#include <sys/resource.h>
+#endif
#ifndef REGEX_MAXSIZE
#define REGEX_MAXSIZE 9999
@@ -176,14 +179,25 @@ ATF_TC_HEAD(regcomp_too_big, tc)
" crash, but return a proper error code");
// libtre needs it.
atf_tc_set_md_var(tc, "timeout", "600");
+#if defined(__FreeBSD__)
+ atf_tc_set_md_var(tc, "require.memory", "64M");
+#else
atf_tc_set_md_var(tc, "require.memory", "120M");
+#endif
}
ATF_TC_BODY(regcomp_too_big, tc)
{
regex_t re;
+#if defined(__FreeBSD__)
+ struct rlimit limit;
+#endif
int e;
+#if defined(__FreeBSD__)
+ limit.rlim_cur = limit.rlim_max = 64 * 1024 * 1024;
+ ATF_REQUIRE(setrlimit(RLIMIT_VMEM, &limit) != -1);
+#endif
for (size_t i = 0; i < __arraycount(tests); i++) {
char *d = (*tests[i].pattern)(REGEX_MAXSIZE);
e = regcomp(&re, d, tests[i].type);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/regex/t_regex_att.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -48,6 +48,9 @@ __RCSID("$NetBSD: t_regex_att.c,v 1.1 20
#include <vis.h>
#include <ctype.h>
#include <atf-c.h>
+#if defined(__FreeBSD__)
+#include <libutil.h>
+#endif
static const char sep[] = "\r\n\t";
static const char delim[3] = "\\\\\0";
@@ -374,7 +377,11 @@ checkmatches(const char *matches, size_t
" cur=%d, max=%zu", res, l, len - off);
off += l;
}
+#if defined(__FreeBSD__)
+ ATF_CHECK_STREQ_MSG(res, matches, " at line %zu", lineno);
+#else
ATF_REQUIRE_STREQ_MSG(res, matches, " at line %zu", lineno);
+#endif
free(res);
}
@@ -573,6 +580,9 @@ ATF_TC_BODY(leftassoc, tc)
* any explation. Mark as broken here, but I don't know why. */
atf_tc_expect_fail("Reason for breakage unknown");
#endif
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("The expected and matched groups are mismatched on FreeBSD");
+#endif
att_test(tc, "leftassoc");
}
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/h_getopt_long.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -36,6 +36,9 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#if defined(__FreeBSD__)
+#include <libutil.h>
+#endif
#define SKIPWS(p) while (isspace((int)(*p))) p++
#define WS "\t\n "
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_getenv.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_getenv.c,v 1.2 2011/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#if defined(__FreeBSD__)
+#include <signal.h>
+#endif
extern char **environ;
@@ -152,6 +155,15 @@ ATF_TC_BODY(setenv_basic, tc)
ATF_CHECK_ERRNO(EINVAL, setenv(NULL, "val", 1) == -1);
ATF_CHECK_ERRNO(EINVAL, setenv("", "val", 1) == -1);
ATF_CHECK_ERRNO(EINVAL, setenv("v=r", "val", 1) == -1);
+#if defined(__FreeBSD__)
+ /*
+ Both FreeBSD and OS/X does not validate the second
+ argument to setenv(3)
+ */
+ atf_tc_expect_signal(SIGSEGV, "FreeBSD does not validate the second "
+ "argument to setenv(3); see bin/189805");
+#endif
+
ATF_CHECK_ERRNO(EINVAL, setenv("var", NULL, 1) == -1);
ATF_CHECK(setenv("var", "=val", 1) == 0);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_hsearch.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -75,6 +75,7 @@ __RCSID("$NetBSD: t_hsearch.c,v 1.4 2014
#define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno))
+#if defined(__NetBSD__)
ATF_TC(hsearch_basic);
ATF_TC_HEAD(hsearch_basic, tc)
{
@@ -123,6 +124,7 @@ ATF_TC_BODY(hsearch_basic, tc)
hdestroy1(free, NULL);
}
+#endif
ATF_TC(hsearch_duplicate);
ATF_TC_HEAD(hsearch_duplicate, tc)
@@ -229,6 +231,7 @@ ATF_TC_BODY(hsearch_two, tc)
hdestroy();
}
+#if defined(__NetBSD__)
ATF_TC(hsearch_r_basic);
ATF_TC_HEAD(hsearch_r_basic, tc)
{
@@ -276,6 +279,7 @@ ATF_TC_BODY(hsearch_r_basic, tc)
hdestroy1_r(&t, free, NULL);
}
+#endif
ATF_TC(hsearch_r_duplicate);
ATF_TC_HEAD(hsearch_r_duplicate, tc)
@@ -385,12 +389,16 @@ ATF_TC_BODY(hsearch_r_two, tc)
ATF_TP_ADD_TCS(tp)
{
+#if defined(__NetBSD__)
ATF_TP_ADD_TC(tp, hsearch_basic);
+#endif
ATF_TP_ADD_TC(tp, hsearch_duplicate);
ATF_TP_ADD_TC(tp, hsearch_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_two);
+#if defined(__NetBSD__)
ATF_TP_ADD_TC(tp, hsearch_r_basic);
+#endif
ATF_TP_ADD_TC(tp, hsearch_r_duplicate);
ATF_TP_ADD_TC(tp, hsearch_r_nonexistent);
ATF_TP_ADD_TC(tp, hsearch_r_two);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/stdlib/t_strtod.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -221,7 +221,9 @@ ATF_TC_BODY(strtold_nan, tc)
volatile long double ld = strtold(nan_string, &end);
ATF_REQUIRE(isnan(ld) != 0);
+#if !defined(__FreeBSD__)
ATF_REQUIRE(__isnanl(ld) != 0);
+#endif
ATF_REQUIRE(strcmp(end, "y") == 0);
# else
atf_tc_skip("Requires long double support");
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memcpy.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memcpy.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -51,7 +51,11 @@ unsigned char *start[BLOCKTYPES] = {
};
char result[100];
+#if defined(__NetBSD__)
const char goodResult[] = "7b405d24bc03195474c70ddae9e1f8fb";
+#else
+const char goodResult[] = "217b4fbe456916bf62a2f85df752e4ab";
+#endif
static void
runTest(unsigned char *b1, unsigned char *b2)
@@ -89,7 +93,15 @@ ATF_TC_BODY(memcpy_basic, tc)
start[2] = auto1;
start[3] = auto2;
+#if defined(__NetBSD__)
srandom(0L);
+#else
+ /*
+ * random() shall produce by default a sequence of numbers that can be
+ * duplicated by calling srandom() with 1 as the seed.
+ */
+ srandom(1);
+#endif
MD5Init(mc);
for (i = 0; i < BLOCKTYPES; ++i)
for (j = 0; j < BLOCKTYPES; ++j)
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memmem.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memmem.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_memmem.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -75,8 +75,13 @@ ATF_TC_HEAD(memmem_basic, tc)
ATF_TC_BODY(memmem_basic, tc)
{
+#if defined(__darwin__) || defined(__FreeBSD__)
+ expect(memmem(b2, lb2, p0, lp0) == NULL);
+ expect(memmem(b0, lb0, p0, lp0) == NULL);
+#else
expect(memmem(b2, lb2, p0, lp0) == b2);
expect(memmem(b0, lb0, p0, lp0) == b0);
+#endif
expect(memmem(b0, lb0, p1, lp1) == NULL);
expect(memmem(b1, lb1, p1, lp1) == NULL);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_strerror.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_strerror.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/string/t_strerror.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -37,6 +37,10 @@ __RCSID("$NetBSD: t_strerror.c,v 1.3 201
#include <locale.h>
#include <string.h>
+#if defined(__FreeBSD__)
+#include <stdio.h>
+#endif
+
ATF_TC(strerror_basic);
ATF_TC_HEAD(strerror_basic, tc)
{
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_mktime.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_mktime.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_mktime.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -72,7 +72,12 @@ ATF_TC_BODY(mktime_negyear, tc)
errno = 0;
t = mktime(&tms);
+#if defined(__FreeBSD__)
+ /* Open Group says "and may set errno to indicate the error" */
+ ATF_REQUIRE(t == (time_t)-1);
+#else
ATF_REQUIRE_ERRNO(0, t != (time_t)-1);
+#endif
}
ATF_TC(timegm_epoch);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_strptime.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_strptime.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/time/t_strptime.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -49,6 +49,17 @@ h_pass(const char *buf, const char *fmt,
exp = buf + len;
ret = strptime(buf, fmt, &tm);
+#if defined(__FreeBSD__)
+ ATF_CHECK_MSG(ret == exp,
+ "strptime(\"%s\", \"%s\", tm): incorrect return code: "
+ "expected: %p, got: %p", buf, fmt, exp, ret);
+
+#define H_REQUIRE_FIELD(field) \
+ ATF_CHECK_MSG(tm.field == field, \
+ "strptime(\"%s\", \"%s\", tm): incorrect %s: " \
+ "expected: %d, but got: %d", buf, fmt, \
+ ___STRING(field), field, tm.field)
+#else
ATF_REQUIRE_MSG(ret == exp,
"strptime(\"%s\", \"%s\", tm): incorrect return code: "
"expected: %p, got: %p", buf, fmt, exp, ret);
@@ -58,6 +69,7 @@ h_pass(const char *buf, const char *fmt,
"strptime(\"%s\", \"%s\", tm): incorrect %s: " \
"expected: %d, but got: %d", buf, fmt, \
___STRING(field), field, tm.field)
+#endif
H_REQUIRE_FIELD(tm_sec);
H_REQUIRE_FIELD(tm_min);
@@ -76,8 +88,13 @@ h_fail(const char *buf, const char *fmt)
{
struct tm tm = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, NULL };
+#if defined(__FreeBSD__)
+ ATF_CHECK_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", "
+ "\"%s\", &tm) should fail, but it didn't", buf, fmt);
+#else
ATF_REQUIRE_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", "
"\"%s\", &tm) should fail, but it didn't", buf, fmt);
+#endif
}
ATF_TC(common);
@@ -91,6 +108,10 @@ ATF_TC_HEAD(common, tc)
ATF_TC_BODY(common, tc)
{
+#if defined(__FreeBSD__)
+ atf_tc_expect_fail("There are various issues with strptime on FreeBSD");
+#endif
+
h_pass("Tue Jan 20 23:27:46 1998", "%a %b %d %T %Y",
24, 46, 27, 23, 20, 0, 98, 2, -1);
h_pass("Tue Jan 20 23:27:46 1998", "%a %b %d %H:%M:%S %Y",
@@ -168,9 +189,17 @@ ATF_TC_BODY(day, tc)
h_pass("mon", "%a", 3, -1, -1, -1, -1, -1, -1, 1, -1);
h_pass("tueSDay", "%A", 7, -1, -1, -1, -1, -1, -1, 2, -1);
h_pass("sunday", "%A", 6, -1, -1, -1, -1, -1, -1, 0, -1);
+#if defined(__NetBSD__)
h_fail("sunday", "%EA");
+#else
+ h_pass("Sunday", "%EA", 6, -1, -1, -1, -1, -1, -1, 0, -1);
+#endif
h_pass("SaturDay", "%A", 8, -1, -1, -1, -1, -1, -1, 6, -1);
+#if defined(__NetBSD__)
h_fail("SaturDay", "%OA");
+#else
+ h_pass("SaturDay", "%OA", 8, -1, -1, -1, -1, -1, -1, 6, -1);
+#endif
}
ATF_TC(month);
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/dso/h_tls_dlopen.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -36,7 +36,9 @@ __RCSID("$NetBSD: h_tls_dlopen.c,v 1.5 2
#include <atf-c.h>
#include <unistd.h>
+#if defined(__NetBSD__)
#include <sys/tls.h>
+#endif
#ifdef __HAVE_NO___THREAD
#define __thread
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dlopen.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -39,7 +39,9 @@ __RCSID("$NetBSD: t_tls_dlopen.c,v 1.3 2
#include <pthread.h>
#include <unistd.h>
+#if defined(__NetBSD__)
#include <sys/tls.h>
+#endif
#ifdef __HAVE_NO___THREAD
#define __thread
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_dynamic.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -38,7 +38,9 @@ __RCSID("$NetBSD: t_tls_dynamic.c,v 1.3
#include <pthread.h>
#include <unistd.h>
+#if defined(__NetBSD__)
#include <sys/tls.h>
+#endif
#ifdef __HAVE_NO___THREAD
#define __thread
Modified: projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c
==============================================================================
--- projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c Tue Oct 14 03:22:37 2014 (r273068)
+++ projects/bhyve_svm/contrib/netbsd-tests/lib/libc/tls/t_tls_static.c Tue Oct 14 03:39:31 2014 (r273069)
@@ -37,7 +37,9 @@ __RCSID("$NetBSD: t_tls_static.c,v 1.2 2
#include <atf-c.h>
#include <pthread.h>
+#if defined(__NetBSD__)
#include <sys/tls.h>
+#endif
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list