svn commit: r321585 - in projects/runtime-coverage: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs cddl/contrib/opensolar...

Ngie Cooper ngie at FreeBSD.org
Wed Jul 26 21:09:15 UTC 2017


Author: ngie
Date: Wed Jul 26 21:09:10 2017
New Revision: 321585
URL: https://svnweb.freebsd.org/changeset/base/321585

Log:
  MFhead at r321584

Added:
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c
     - copied unchanged from r321584, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
     - copied unchanged from r321584, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe
Modified:
  projects/runtime-coverage/Makefile.inc1
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
  projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
  projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/probes/Makefile
  projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile
  projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
  projects/runtime-coverage/kerberos5/lib/libkafs5/Makefile
  projects/runtime-coverage/lib/libc/x86/sys/__vdso_gettc.c
  projects/runtime-coverage/lib/msun/tests/Makefile
  projects/runtime-coverage/lib/msun/tests/trig_test.c
  projects/runtime-coverage/share/mk/bsd.dep.mk
  projects/runtime-coverage/share/mk/bsd.stand.mk
  projects/runtime-coverage/sys/arm/include/ucontext.h
  projects/runtime-coverage/sys/arm64/arm64/trap.c
  projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  projects/runtime-coverage/sys/compat/cloudabi/cloudabi_fd.c
  projects/runtime-coverage/sys/compat/cloudabi/cloudabi_mem.c
  projects/runtime-coverage/sys/compat/cloudabi/cloudabi_sock.c
  projects/runtime-coverage/sys/compat/cloudabi/cloudabi_util.h
  projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_proto.h
  projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_sock.c
  projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscall.h
  projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscalls.c
  projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_sysent.c
  projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_systrace_args.c
  projects/runtime-coverage/sys/compat/cloudabi64/cloudabi64_proto.h
  projects/runtime-coverage/sys/compat/cloudabi64/cloudabi64_sock.c
  projects/runtime-coverage/sys/compat/cloudabi64/cloudabi64_syscall.h
  projects/runtime-coverage/sys/compat/cloudabi64/cloudabi64_syscalls.c
  projects/runtime-coverage/sys/compat/cloudabi64/cloudabi64_sysent.c
  projects/runtime-coverage/sys/compat/cloudabi64/cloudabi64_systrace_args.c
  projects/runtime-coverage/sys/conf/kern.post.mk
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi32_types.h
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi64_types.h
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi_types_common.h
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi_vdso_armv6.S
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi_vdso_i686.S
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
  projects/runtime-coverage/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
  projects/runtime-coverage/sys/contrib/cloudabi/syscalls32.master
  projects/runtime-coverage/sys/contrib/cloudabi/syscalls64.master
  projects/runtime-coverage/sys/dev/bnxt/bnxt.h
  projects/runtime-coverage/sys/dev/bnxt/bnxt_hwrm.c
  projects/runtime-coverage/sys/dev/bnxt/bnxt_hwrm.h
  projects/runtime-coverage/sys/dev/bnxt/bnxt_sysctl.c
  projects/runtime-coverage/sys/dev/bnxt/if_bnxt.c
  projects/runtime-coverage/sys/dev/cxgbe/common/common.h
  projects/runtime-coverage/sys/dev/cxgbe/common/t4_hw.c
  projects/runtime-coverage/sys/dev/cxgbe/t4_main.c
  projects/runtime-coverage/sys/dev/cxgbe/t4_sge.c
  projects/runtime-coverage/sys/dev/iicbus/iicbus.h
  projects/runtime-coverage/sys/dev/iicbus/iiconf.c
  projects/runtime-coverage/sys/dev/iicbus/iiconf.h
  projects/runtime-coverage/sys/dev/iwm/if_iwm.c
  projects/runtime-coverage/sys/dev/iwm/if_iwm_scan.c
  projects/runtime-coverage/sys/dev/iwm/if_iwm_sta.c
  projects/runtime-coverage/sys/dev/iwm/if_iwm_util.c
  projects/runtime-coverage/sys/dev/iwm/if_iwm_util.h
  projects/runtime-coverage/sys/dev/iwm/if_iwmreg.h
  projects/runtime-coverage/sys/dev/iwm/if_iwmvar.h
  projects/runtime-coverage/sys/dev/ixgbe/ix_txrx.c
  projects/runtime-coverage/sys/dev/mmc/mmcsd.c
  projects/runtime-coverage/sys/dev/mpr/mpr_sas.c
  projects/runtime-coverage/sys/fs/fdescfs/fdesc.h
  projects/runtime-coverage/sys/fs/nfsclient/nfs_clbio.c
  projects/runtime-coverage/sys/fs/smbfs/smbfs_io.c
  projects/runtime-coverage/sys/net/if_lagg.c
  projects/runtime-coverage/sys/netinet/cc/cc_cdg.c
  projects/runtime-coverage/sys/netinet/cc/cc_chd.c
  projects/runtime-coverage/sys/netinet/cc/cc_cubic.c
  projects/runtime-coverage/sys/netinet/cc/cc_dctcp.c
  projects/runtime-coverage/sys/netinet/cc/cc_htcp.c
  projects/runtime-coverage/sys/netinet/cc/cc_newreno.c
  projects/runtime-coverage/sys/netinet/sctp_indata.c
  projects/runtime-coverage/sys/netinet/tcp_input.c
  projects/runtime-coverage/sys/netinet/tcp_stacks/fastpath.c
  projects/runtime-coverage/sys/sys/pctrie.h
  projects/runtime-coverage/sys/vm/vnode_pager.c
  projects/runtime-coverage/sys/vm/vnode_pager.h
  projects/runtime-coverage/usr.bin/indent/args.c
  projects/runtime-coverage/usr.bin/indent/indent.1
  projects/runtime-coverage/usr.bin/indent/indent.c
  projects/runtime-coverage/usr.bin/indent/indent_globs.h
  projects/runtime-coverage/usr.bin/indent/io.c
  projects/runtime-coverage/usr.bin/indent/pr_comment.c
  projects/runtime-coverage/usr.bin/truss/syscalls.c
Directory Properties:
  projects/runtime-coverage/   (props changed)
  projects/runtime-coverage/cddl/   (props changed)
  projects/runtime-coverage/cddl/contrib/opensolaris/   (props changed)
  projects/runtime-coverage/sys/cddl/contrib/opensolaris/   (props changed)

Modified: projects/runtime-coverage/Makefile.inc1
==============================================================================
--- projects/runtime-coverage/Makefile.inc1	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/Makefile.inc1	Wed Jul 26 21:09:10 2017	(r321585)
@@ -761,12 +761,13 @@ _worldtmp: .PHONY
 	rm -rf ${LIBCOMPATTMP}
 .endif
 .else
+	@echo ">>> Deleting stale files in build tree..."
 	${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
-	    delete-old delete-old-libs
+	    delete-old delete-old-libs >/dev/null
 .if defined(LIBCOMPAT)
 	${_+_}cd ${.CURDIR}; ${WMAKE} -DBATCH_DELETE_OLD_FILES \
 	    DESTDIR=${LIBCOMPATTMP} \
-	    delete-old delete-old-libs
+	    delete-old delete-old-libs >/dev/null
 .endif
 	rm -rf ${WORLDTMP}/legacy/usr/include
 .if ${USING_SYSTEM_COMPILER} == "yes"
@@ -2336,11 +2337,12 @@ _cddl_lib_libumem= cddl/lib/libumem
 _cddl_lib_libnvpair= cddl/lib/libnvpair
 _cddl_lib_libavl= cddl/lib/libavl
 _cddl_lib_libuutil= cddl/lib/libuutil
+.if ${MK_ZFS} != "no"
 _cddl_lib_libzfs_core= cddl/lib/libzfs_core
+cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
+.endif
 _cddl_lib_libctf= cddl/lib/libctf
 _cddl_lib= cddl/lib
-cddl/lib/libzfs_core__L: cddl/lib/libnvpair__L
-cddl/lib/libzfs__L: lib/libgeom__L
 cddl/lib/libctf__L: lib/libz__L
 .endif
 # cddl/lib/libdtrace requires lib/libproc and lib/librtld_db; it's only built

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.DestructWithFunction.d.ksh	Wed Jul 26 21:09:10 2017	(r321585)
@@ -38,6 +38,14 @@
 ##
 
 
+reader()
+{
+	while true
+	do
+		sleep 0.1
+		cat /etc/motd > /dev/null
+	done
+}
 
 if [ $# != 1 ]; then
 	echo expected one argument: '<'dtrace-path'>'
@@ -46,11 +54,16 @@ fi
 
 dtrace=$1
 
+reader &
+child=$!
+
 $dtrace -qwf read'{chill(15); printf("Done chilling"); exit(0);}'
 status=$?
 
 if [ "$status" -ne 0 ]; then
 	echo $tst: dtrace failed
 fi
+
+kill $child
 
 exit $status

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroFunctionProbes.d.ksh	Wed Jul 26 21:09:10 2017	(r321585)
@@ -39,6 +39,15 @@
 ##
 
 
+reader()
+{
+	while true
+	do
+		sleep 0.1
+		cat /etc/motd > /dev/null
+	done
+}
+
 if [ $# != 1 ]; then
 	echo expected one argument: '<'dtrace-path'>'
 	exit 2
@@ -46,6 +55,9 @@ fi
 
 dtrace=$1
 
+reader &
+child=$!
+
 $dtrace -qZf wassup'{printf("Iamkool");}' \
 -qf read'{printf("I am done"); exit(0);}'
 
@@ -54,5 +66,7 @@ status=$?
 if [ "$status" -ne 0 ]; then
 	echo $tst: dtrace failed
 fi
+
+kill $child
 
 exit $status

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d	Wed Jul 26 21:09:10 2017	(r321585)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #pragma D option quiet
+#pragma D option dynvarsize=2m
 
 /*
  * This test verifies that the basename() and dirname() functions are working
@@ -54,12 +55,16 @@ BEGIN
 	dir[i++] = "f";
 	dir[i++] = "f/";
 	dir[i++] = "/////";
+	/*
+	 * basename(3) and basename(1) return different results for the empty
+	 * string on FreeBSD, so we need special handling.
 	dir[i++] = "";
+	*/
 
 	end = i;
 	i = 0;
 
-	printf("#!/usr/bin/ksh\n\n");
+	printf("#!/usr/bin/env ksh\n\n");
 }
 
 tick-1ms
@@ -83,5 +88,19 @@ tick-1ms
 tick-1ms
 /i == end/
 {
+	dir[i] = "";
+	printf("if [ \"`basename \"%s\"`\" != \"%s\" -a \".\" != \"%s\" ]; then\n",
+	    dir[i], basename(dir[i]), basename(dir[i]));
+	printf("	echo \"basename(\\\"%s\\\") is \\\"%s\\\"; ",
+	    dir[i], basename(dir[i]));
+	printf("expected \\\"`basename \"%s\"`\\\" or \\\".\\\"\"\n", dir[i]);
+	printf("fi\n\n");
+	printf("if [ `dirname \"%s\"` != \"%s\" ]; then\n",
+	    dir[i], dirname(dir[i]));
+	printf("	echo \"dirname(\\\"%s\\\") is \\\"%s\\\"; ",
+	    dir[i], dirname(dir[i]));
+	printf("expected \\\"`dirname \"%s\"`\"\\\"\n", dir[i]);
+	printf("fi\n\n");
+
 	exit(0);
 }

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.basename.d.out	Wed Jul 26 21:09:10 2017	(r321585)
@@ -1,4 +1,4 @@
-#!/usr/bin/ksh
+#!/usr/bin/env ksh
 
 if [ `basename "/foo/bar/baz"` != "baz" ]; then
 	echo "basename(\"/foo/bar/baz\") is \"baz\"; expected \"`basename "/foo/bar/baz"`"\"
@@ -152,8 +152,8 @@ if [ `dirname "/////"` != "/" ]; then
 	echo "dirname(\"/////\") is \"/\"; expected \"`dirname "/////"`"\"
 fi
 
-if [ `basename ""` != "." ]; then
-	echo "basename(\"\") is \".\"; expected \"`basename ""`"\"
+if [ "`basename ""`" != "." -a "." != "." ]; then
+	echo "basename(\"\") is \".\"; expected \"`basename ""`\" or \".\""
 fi
 
 if [ `dirname ""` != "." ]; then

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.cleanpath.d	Wed Jul 26 21:09:10 2017	(r321585)
@@ -27,6 +27,7 @@
 #pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #pragma D option quiet
+#pragma D option dynvarsize=2m
 
 BEGIN
 {

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh	Wed Jul 26 21:09:10 2017	(r321585)
@@ -31,11 +31,12 @@ fi
 
 dtrace=$1
 
-$dtrace -ln 'syscall::*$1:entry' read | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::$1*:entry' read | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::re$1*:entry' ad | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::$1l*:entry' read | awk '{print $(NF-1),$NF}' | sort
-$dtrace -ln 'syscall::p$1[0-9][0-9]:entry' read | awk '{print $(NF-1),$NF}' | \
- sort
+$dtrace -ln 'syscall:freebsd:*$1:entry' read | \
+	awk '{print $(NF-1),$NF}' | grep -v -E 'compat.\.' | sort
+$dtrace -ln 'syscall:freebsd:$1*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall:freebsd:re$1*:entry' ad | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall:freebsd:$1l*:entry' read | awk '{print $(NF-1),$NF}' | sort
+$dtrace -ln 'syscall:freebsd:w$1[0-9]:entry' ait | \
+	awk '{print $(NF-1),$NF}' | sort
 
 exit $status

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/tst.macroglob.ksh.out	Wed Jul 26 21:09:10 2017	(r321585)
@@ -1,15 +1,22 @@
 FUNCTION NAME
+aio_read entry
+obs_vread entry
 pread entry
 read entry
+rtprio_thread entry
 FUNCTION NAME
 read entry
 readlink entry
+readlinkat entry
 readv entry
 FUNCTION NAME
 read entry
 readlink entry
+readlinkat entry
 readv entry
 FUNCTION NAME
 readlink entry
+readlinkat entry
 FUNCTION NAME
-pread64 entry
+wait4 entry
+wait6 entry

Copied: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c (from r321584, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c	Wed Jul 26 21:09:10 2017	(r321585, copy of r321584, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.c)
@@ -0,0 +1,47 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2017 Li-Wen Hsu <lwhsu at FreeBSD.org>
+ */
+
+#include <signal.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main(void)
+{
+
+    sigset_t set;
+    siginfo_t info;
+    struct timespec timeout;
+
+    (void)sigemptyset(&set);
+    (void)sigaddset(&set, SIGHUP);
+    timeout.tv_sec = 1;
+    timeout.tv_nsec = 0;
+
+    for (;;)
+        (void)sigtimedwait(&set, &info, &timeout);
+
+    return (0);
+}

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/probes/tst.probestar.d	Wed Jul 26 21:09:10 2017	(r321585)
@@ -45,6 +45,7 @@ BEGIN
 }
 
 syscall::*wait*:entry
+/pid == $1/
 {
 	exit(0);
 }

Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d
==============================================================================
--- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.d	Wed Jul 26 21:09:10 2017	(r321585)
@@ -39,6 +39,7 @@
 BEGIN
 {
 	i = 0;
+	notused = $1;
 }
 
 syscall::open:entry

Copied: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe (from r321584, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe	Wed Jul 26 21:09:10 2017	(r321585, copy of r321584, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.NoSpecBuffer.exe)
@@ -0,0 +1,30 @@
+#!/usr/bin/env ksh
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2017 Li-Wen Hsu <lwhsu at FreeBSD.org>
+
+while true
+do
+	sleep 0.1
+	cat /etc/motd > /dev/null
+done

Modified: projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/probes/Makefile
==============================================================================
--- projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/probes/Makefile	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/probes/Makefile	Wed Jul 26 21:09:10 2017	(r321585)
@@ -32,6 +32,7 @@ TESTEXES= \
 
 
 CFILES= \
+     tst.probestar.c  \
 
 
 

Modified: projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile
==============================================================================
--- projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile	Wed Jul 26 21:09:10 2017	(r321585)
@@ -68,6 +68,7 @@ ${PACKAGE}FILES= \
      tst.zerosize.d  \
 
 TESTEXES= \
+     tst.NoSpecBuffer.exe  \
 
 
 CFILES= \

Modified: projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/tools/dtest.sh
==============================================================================
--- projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/tools/dtest.sh	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/cddl/usr.sbin/dtrace/tests/tools/dtest.sh	Wed Jul 26 21:09:10 2017	(r321585)
@@ -1,3 +1,5 @@
+#!/bin/sh
+
 # $FreeBSD$
 
 usage()
@@ -83,6 +85,12 @@ runtest()
         retval=1
         ;;
     esac
+
+    if [ $retval -eq 0 ] && \
+        head -n 1 $STDOUT | grep -q -E '^#!/.*ksh$'; then
+        ksh $STDOUT
+        retval=$?
+    fi
 
     return $retval
 }

Modified: projects/runtime-coverage/kerberos5/lib/libkafs5/Makefile
==============================================================================
--- projects/runtime-coverage/kerberos5/lib/libkafs5/Makefile	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/kerberos5/lib/libkafs5/Makefile	Wed Jul 26 21:09:10 2017	(r321585)
@@ -26,7 +26,7 @@ SRCS=	afssys.c afskrb5.c common.c krb5_err.h
 
 CFLAGS+=	-I${KRB5DIR}/lib/kafs \
 		-I${KRB5DIR}/lib/krb5 \
-		-I${.OBJDIR:H}/libkrb5/ \
+		-I${.OBJDIR:H}/libkrb5 \
 		-I${KRB5DIR}/lib/roken
 
 CLEANFILES= kafs5.3

Modified: projects/runtime-coverage/lib/libc/x86/sys/__vdso_gettc.c
==============================================================================
--- projects/runtime-coverage/lib/libc/x86/sys/__vdso_gettc.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/lib/libc/x86/sys/__vdso_gettc.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -158,7 +158,7 @@ __vdso_init_hpet(uint32_t u)
 	if (atomic_cmpset_rel_ptr((volatile uintptr_t *)&hpet_dev_map[u],
 	    (uintptr_t)old_map, (uintptr_t)new_map) == 0 &&
 	    new_map != MAP_FAILED)
-	munmap((void *)new_map, PAGE_SIZE);
+		munmap((void *)new_map, PAGE_SIZE);
 
 	return;
 fail:

Modified: projects/runtime-coverage/lib/msun/tests/Makefile
==============================================================================
--- projects/runtime-coverage/lib/msun/tests/Makefile	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/lib/msun/tests/Makefile	Wed Jul 26 21:09:10 2017	(r321585)
@@ -84,6 +84,10 @@ SRCS.ilogb2_test=	ilogb_test.c
 
 LIBADD+=	m
 
+.if ${MACHINE_CPUARCH} == "i386"
+# XXX: __fldcw macro mismatch between fenv.h and ieeefp.h .
+CWARNFLAGS.clang+=	-Wno-error=macro-redefined
+.endif
 WARNS?=		1
 
 # Copied from lib/msun/Makefile

Modified: projects/runtime-coverage/lib/msun/tests/trig_test.c
==============================================================================
--- projects/runtime-coverage/lib/msun/tests/trig_test.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/lib/msun/tests/trig_test.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -156,10 +156,6 @@ ATF_TC_BODY(reduction, tc)
 		9.8477555741888350649e+4314L,
 		1.6061597222105160737e+4326L,
 	};
-#elif LDBL_MANT_DIG == 113
-	static const long double ld_pi_odd[] = {
-		/* XXX */
-	};
 #endif
 
 #if defined(__clang__) && \
@@ -205,7 +201,7 @@ ATF_TC_BODY(reduction, tc)
 		ATF_CHECK(fabs(tan(-d_pi_odd[i] * 2)) < 2 * DBL_EPSILON);
 	}
 
-#if LDBL_MANT_DIG > 53
+#if LDBL_MANT_DIG == 64 /* XXX: || LDBL_MANT_DIG == 113 */
 	for (i = 0; i < nitems(ld_pi_odd); i++) {
 		ATF_CHECK(fabsl(sinl(ld_pi_odd[i])) < LDBL_EPSILON);
 		ATF_CHECK(cosl(ld_pi_odd[i]) == -1.0);

Modified: projects/runtime-coverage/share/mk/bsd.dep.mk
==============================================================================
--- projects/runtime-coverage/share/mk/bsd.dep.mk	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/share/mk/bsd.dep.mk	Wed Jul 26 21:09:10 2017	(r321585)
@@ -88,7 +88,7 @@ _meta_filemon=	1
 # Also skip generating or including .depend.* files if in meta+filemon mode
 # since it will track dependencies itself.  OBJS_DEPEND_GUESS is still used
 # for _meta_filemon but not for _SKIP_DEPEND.
-.if defined(_SKIP_BUILD)
+.if !defined(NO_SKIP_DEPEND) && defined(_SKIP_BUILD)
 _SKIP_DEPEND=	1
 .endif
 .if ${MK_DIRDEPS_BUILD} == "no"

Modified: projects/runtime-coverage/share/mk/bsd.stand.mk
==============================================================================
--- projects/runtime-coverage/share/mk/bsd.stand.mk	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/share/mk/bsd.stand.mk	Wed Jul 26 21:09:10 2017	(r321585)
@@ -21,6 +21,9 @@ CFLAGS+=	-fPIC -mno-red-zone
 .if ${MACHINE_CPUARCH} == "aarch64"
 CFLAGS+=	-fPIC -mgeneral-regs-only
 .endif
+.if ${MACHINE_CPUARCH} == "arm"
+CFLAGS+=	-fPIC
+.endif
 .if ${MACHINE_CPUARCH} == "mips"
 CFLAGS+=	-G0 -fno-pic -mno-abicalls
 .endif

Modified: projects/runtime-coverage/sys/arm/include/ucontext.h
==============================================================================
--- projects/runtime-coverage/sys/arm/include/ucontext.h	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/arm/include/ucontext.h	Wed Jul 26 21:09:10 2017	(r321585)
@@ -78,7 +78,7 @@ typedef struct {
 	 * Originally, rest of this structure was named __fpu, 35 * 4 bytes
 	 * long, never accessed from kernel. 
 	 */
-	size_t		mc_vfp_size;
+	__size_t	mc_vfp_size;
 	void 		*mc_vfp_ptr;
 	unsigned int	mc_spare[33];
 } mcontext_t;

Modified: projects/runtime-coverage/sys/arm64/arm64/trap.c
==============================================================================
--- projects/runtime-coverage/sys/arm64/arm64/trap.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/arm64/arm64/trap.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -265,6 +265,7 @@ print_registers(struct trapframe *frame)
 void
 do_el1h_sync(struct thread *td, struct trapframe *frame)
 {
+	struct trapframe *oframe;
 	uint32_t exception;
 	uint64_t esr, far;
 
@@ -281,6 +282,18 @@ do_el1h_sync(struct thread *td, struct trapframe *fram
 	    "do_el1_sync: curthread: %p, esr %lx, elr: %lx, frame: %p", td,
 	    esr, frame->tf_elr, frame);
 
+	oframe = td->td_frame;
+
+	switch (exception) {
+	case EXCP_BRK:
+	case EXCP_WATCHPT_EL1:
+	case EXCP_SOFTSTP_EL1:
+		break;
+	default:
+		td->td_frame = frame;
+		break;
+	}
+
 	switch(exception) {
 	case EXCP_FP_SIMD:
 	case EXCP_TRAP_FP:
@@ -313,7 +326,8 @@ do_el1h_sync(struct thread *td, struct trapframe *fram
 	case EXCP_WATCHPT_EL1:
 	case EXCP_SOFTSTP_EL1:
 #ifdef KDB
-		kdb_trap(exception, 0, frame);
+		kdb_trap(exception, 0,
+		    (td->td_frame != NULL) ? td->td_frame : frame);
 #else
 		panic("No debugger in kernel.\n");
 #endif
@@ -323,6 +337,8 @@ do_el1h_sync(struct thread *td, struct trapframe *fram
 		panic("Unknown kernel exception %x esr_el1 %lx\n", exception,
 		    esr);
 	}
+
+	td->td_frame = oframe;
 }
 
 /*

Modified: projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -4270,6 +4270,16 @@ spa_import_rootpool(const char *name)
 
 		if ((spa = spa_lookup(pname)) != NULL) {
 			/*
+			 * The pool could already be imported,
+			 * e.g., after reboot -r.
+			 */
+			if (spa->spa_state == POOL_STATE_ACTIVE) {
+				mutex_exit(&spa_namespace_lock);
+				nvlist_free(config);
+				return (0);
+			}
+
+			/*
 			 * Remove the existing root pool from the namespace so
 			 * that we can replace it with the correct config
 			 * we just read in.

Modified: projects/runtime-coverage/sys/compat/cloudabi/cloudabi_fd.c
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi/cloudabi_fd.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi/cloudabi_fd.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -111,8 +111,6 @@ cloudabi_sys_fd_create1(struct thread *td,
 		return (kern_shm_open(td, SHM_ANON, O_RDWR, 0, &fcaps));
 	case CLOUDABI_FILETYPE_SOCKET_DGRAM:
 		return (kern_socket(td, AF_UNIX, SOCK_DGRAM, 0));
-	case CLOUDABI_FILETYPE_SOCKET_SEQPACKET:
-		return (kern_socket(td, AF_UNIX, SOCK_SEQPACKET, 0));
 	case CLOUDABI_FILETYPE_SOCKET_STREAM:
 		return (kern_socket(td, AF_UNIX, SOCK_STREAM, 0));
 	default:
@@ -145,9 +143,6 @@ cloudabi_sys_fd_create2(struct thread *td,
 	case CLOUDABI_FILETYPE_SOCKET_DGRAM:
 		error = kern_socketpair(td, AF_UNIX, SOCK_DGRAM, 0, fds);
 		break;
-	case CLOUDABI_FILETYPE_SOCKET_SEQPACKET:
-		error = kern_socketpair(td, AF_UNIX, SOCK_SEQPACKET, 0, fds);
-		break;
 	case CLOUDABI_FILETYPE_SOCKET_STREAM:
 		error = kern_socketpair(td, AF_UNIX, SOCK_STREAM, 0, fds);
 		break;
@@ -245,8 +240,6 @@ cloudabi_convert_filetype(const struct file *fp)
 		switch (so->so_type) {
 		case SOCK_DGRAM:
 			return (CLOUDABI_FILETYPE_SOCKET_DGRAM);
-		case SOCK_SEQPACKET:
-			return (CLOUDABI_FILETYPE_SOCKET_SEQPACKET);
 		case SOCK_STREAM:
 			return (CLOUDABI_FILETYPE_SOCKET_STREAM);
 		default:
@@ -400,7 +393,6 @@ cloudabi_remove_conflicting_rights(cloudabi_filetype_t
 		*inheriting = 0;
 		break;
 	case CLOUDABI_FILETYPE_SOCKET_DGRAM:
-	case CLOUDABI_FILETYPE_SOCKET_SEQPACKET:
 	case CLOUDABI_FILETYPE_SOCKET_STREAM:
 		*base &= CLOUDABI_RIGHT_FD_READ |
 		    CLOUDABI_RIGHT_FD_STAT_PUT_FLAGS |

Modified: projects/runtime-coverage/sys/compat/cloudabi/cloudabi_mem.c
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi/cloudabi_mem.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi/cloudabi_mem.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -90,14 +90,6 @@ cloudabi_sys_mem_advise(struct thread *td,
 }
 
 int
-cloudabi_sys_mem_lock(struct thread *td, struct cloudabi_sys_mem_lock_args *uap)
-{
-
-	return (kern_mlock(td->td_proc, td->td_ucred,
-	    __DECONST(uintptr_t, uap->mapping), uap->mapping_len));
-}
-
-int
 cloudabi_sys_mem_map(struct thread *td, struct cloudabi_sys_mem_map_args *uap)
 {
 	int error, flags, prot;
@@ -158,15 +150,6 @@ cloudabi_sys_mem_sync(struct thread *td, struct clouda
 
 	return (kern_msync(td, (uintptr_t)uap->mapping, uap->mapping_len,
 	    flags));
-}
-
-int
-cloudabi_sys_mem_unlock(struct thread *td,
-    struct cloudabi_sys_mem_unlock_args *uap)
-{
-
-	return (kern_munlock(td, __DECONST(uintptr_t, uap->mapping),
-	    uap->mapping_len));
 }
 
 int

Modified: projects/runtime-coverage/sys/compat/cloudabi/cloudabi_sock.c
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi/cloudabi_sock.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi/cloudabi_sock.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -49,43 +49,6 @@ __FBSDID("$FreeBSD$");
 #include <compat/cloudabi/cloudabi_proto.h>
 #include <compat/cloudabi/cloudabi_util.h>
 
-/* Converts FreeBSD's struct sockaddr to CloudABI's cloudabi_sockaddr_t. */
-static void
-cloudabi_convert_sockaddr(const struct sockaddr *sa, socklen_t sal,
-    cloudabi_sockaddr_t *rsa)
-{
-	const struct sockaddr_in *sin;
-	const struct sockaddr_in6 *sin6;
-
-	/* Zero-sized socket address. */
-	if (sal < offsetof(struct sockaddr, sa_family) + sizeof(sa->sa_family))
-		return;
-
-	switch (sa->sa_family) {
-	case AF_INET:
-		if (sal < sizeof(struct sockaddr_in))
-			return;
-		sin = (const struct sockaddr_in *)sa;
-		rsa->sa_family = CLOUDABI_AF_INET;
-		memcpy(&rsa->sa_inet.addr, &sin->sin_addr,
-		    sizeof(rsa->sa_inet.addr));
-		rsa->sa_inet.port = ntohs(sin->sin_port);
-		return;
-	case AF_INET6:
-		if (sal < sizeof(struct sockaddr_in6))
-			return;
-		sin6 = (const struct sockaddr_in6 *)sa;
-		rsa->sa_family = CLOUDABI_AF_INET6;
-		memcpy(&rsa->sa_inet6.addr, &sin6->sin6_addr,
-		    sizeof(rsa->sa_inet6.addr));
-		rsa->sa_inet6.port = ntohs(sin6->sin6_port);
-		return;
-	case AF_UNIX:
-		rsa->sa_family = CLOUDABI_AF_UNIX;
-		return;
-	}
-}
-
 /* Copies a pathname into a UNIX socket address structure. */
 static int
 copyin_sockaddr_un(const char *path, size_t pathlen, struct sockaddr_un *sun)
@@ -112,27 +75,8 @@ int
 cloudabi_sys_sock_accept(struct thread *td,
     struct cloudabi_sys_sock_accept_args *uap)
 {
-	struct sockaddr *sa;
-	cloudabi_sockstat_t ss = {};
-	socklen_t sal;
-	int error;
 
-	if (uap->buf == NULL) {
-		/* Only return the new file descriptor number. */
-		return (kern_accept(td, uap->sock, NULL, NULL, NULL));
-	} else {
-		/* Also return properties of the new socket descriptor. */
-		sal = MAX(sizeof(struct sockaddr_in),
-		    sizeof(struct sockaddr_in6));
-		error = kern_accept(td, uap->sock, (void *)&sa, &sal, NULL);
-		if (error != 0)
-			return (error);
-
-		/* TODO(ed): Fill the other members of cloudabi_sockstat_t. */
-		cloudabi_convert_sockaddr(sa, sal, &ss.ss_peername);
-		free(sa, M_SONAME);
-		return (copyout(&ss, uap->buf, sizeof(ss)));
-	}
+	return (kern_accept(td, uap->sock, NULL, NULL, NULL));
 }
 
 int
@@ -200,7 +144,6 @@ cloudabi_sys_sock_stat_get(struct thread *td,
 	cloudabi_sockstat_t ss = {};
 	cap_rights_t rights;
 	struct file *fp;
-	struct sockaddr *sa;
 	struct socket *so;
 	int error;
 
@@ -210,27 +153,6 @@ cloudabi_sys_sock_stat_get(struct thread *td,
 		return (error);
 	so = fp->f_data;
 
-	CURVNET_SET(so->so_vnet);
-
-	/* Set ss_sockname. */
-	error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
-	if (error == 0) {
-		cloudabi_convert_sockaddr(sa, sa->sa_len, &ss.ss_sockname);
-		free(sa, M_SONAME);
-	}
-
-	/* Set ss_peername. */
-	if ((so->so_state & (SS_ISCONNECTED | SS_ISCONFIRMING)) != 0) {
-		error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa);
-		if (error == 0) {
-			cloudabi_convert_sockaddr(sa, sa->sa_len,
-			    &ss.ss_peername);
-			free(sa, M_SONAME);
-		}
-	}
-
-	CURVNET_RESTORE();
-
 	/* Set ss_error. */
 	SOCK_LOCK(so);
 	ss.ss_error = cloudabi_convert_errno(so->so_error);
@@ -249,8 +171,8 @@ cloudabi_sys_sock_stat_get(struct thread *td,
 int
 cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd, struct iovec *data,
     size_t datalen, cloudabi_fd_t *fds, size_t fdslen,
-    cloudabi_msgflags_t flags, size_t *rdatalen, size_t *rfdslen,
-    cloudabi_sockaddr_t *peername, cloudabi_msgflags_t *rflags)
+    cloudabi_riflags_t flags, size_t *rdatalen, size_t *rfdslen,
+    cloudabi_roflags_t *rflags)
 {
 	struct sockaddr_storage ss;
 	struct msghdr hdr = {
@@ -263,9 +185,9 @@ cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd
 	int error;
 
 	/* Convert flags. */
-	if (flags & CLOUDABI_MSG_PEEK)
+	if (flags & CLOUDABI_SOCK_RECV_PEEK)
 		hdr.msg_flags |= MSG_PEEK;
-	if (flags & CLOUDABI_MSG_WAITALL)
+	if (flags & CLOUDABI_SOCK_RECV_WAITALL)
 		hdr.msg_flags |= MSG_WAITALL;
 
 	control = NULL;
@@ -278,13 +200,9 @@ cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd
 	*rdatalen = td->td_retval[0];
 	td->td_retval[0] = 0;
 	*rfdslen = 0;
-	cloudabi_convert_sockaddr((struct sockaddr *)&ss,
-	    MIN(hdr.msg_namelen, sizeof(ss)), peername);
 	*rflags = 0;
-	if (hdr.msg_flags & MSG_EOR)
-		*rflags |= CLOUDABI_MSG_EOR;
 	if (hdr.msg_flags & MSG_TRUNC)
-		*rflags |= CLOUDABI_MSG_TRUNC;
+		*rflags |= CLOUDABI_SOCK_RECV_DATA_TRUNCATED;
 
 	/* Extract file descriptors from SCM_RIGHTS messages. */
 	if (control != NULL) {
@@ -303,7 +221,8 @@ cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd
 				if (nfds > fdslen) {
 					/* Unable to store file descriptors. */
 					nfds = fdslen;
-					*rflags |= CLOUDABI_MSG_CTRUNC;
+					*rflags |=
+					    CLOUDABI_SOCK_RECV_FDS_TRUNCATED;
 				}
 				error = copyout(CMSG_DATA(chdr), fds,
 				    nfds * sizeof(int));
@@ -323,21 +242,15 @@ cloudabi_sock_recv(struct thread *td, cloudabi_fd_t fd
 
 int
 cloudabi_sock_send(struct thread *td, cloudabi_fd_t fd, struct iovec *data,
-    size_t datalen, const cloudabi_fd_t *fds, size_t fdslen,
-    cloudabi_msgflags_t flags, size_t *rdatalen)
+    size_t datalen, const cloudabi_fd_t *fds, size_t fdslen, size_t *rdatalen)
 {
 	struct msghdr hdr = {
 		.msg_iov = data,
 		.msg_iovlen = datalen,
 	};
 	struct mbuf *control;
-	int error, mflags;
+	int error;
 
-	/* Convert flags. */
-	mflags = MSG_NOSIGNAL;
-	if (flags & CLOUDABI_MSG_EOR)
-		mflags |= MSG_EOR;
-
 	/* Convert file descriptor array to an SCM_RIGHTS message. */
 	if (fdslen > MCLBYTES || CMSG_SPACE(fdslen * sizeof(int)) > MCLBYTES) {
 		return (EINVAL);
@@ -361,7 +274,7 @@ cloudabi_sock_send(struct thread *td, cloudabi_fd_t fd
 		control = NULL;
 	}
 
-	error = kern_sendit(td, fd, &hdr, mflags, control, UIO_USERSPACE);
+	error = kern_sendit(td, fd, &hdr, MSG_NOSIGNAL, control, UIO_USERSPACE);
 	if (error != 0)
 		return (error);
 	*rdatalen = td->td_retval[0];

Modified: projects/runtime-coverage/sys/compat/cloudabi/cloudabi_util.h
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi/cloudabi_util.h	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi/cloudabi_util.h	Wed Jul 26 21:09:10 2017	(r321585)
@@ -75,10 +75,10 @@ int cloudabi_futex_lock_wrlock(struct thread *, clouda
 
 /* Socket operations. */
 int cloudabi_sock_recv(struct thread *, cloudabi_fd_t, struct iovec *, size_t,
-    cloudabi_fd_t *, size_t, cloudabi_msgflags_t, size_t *, size_t *,
-    cloudabi_sockaddr_t *, cloudabi_msgflags_t *);
+    cloudabi_fd_t *, size_t, cloudabi_riflags_t, size_t *, size_t *,
+    cloudabi_roflags_t *);
 int cloudabi_sock_send(struct thread *, cloudabi_fd_t, struct iovec *, size_t,
-    const cloudabi_fd_t *, size_t, cloudabi_msgflags_t, size_t *);
+    const cloudabi_fd_t *, size_t, size_t *);
 
 /* vDSO setup and teardown. */
 void cloudabi_vdso_init(struct sysentvec *, char *, char *);

Modified: projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_proto.h
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_proto.h	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_proto.h	Wed Jul 26 21:09:10 2017	(r321585)
@@ -200,10 +200,6 @@ struct cloudabi_sys_mem_advise_args {
 	char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)];
 	char advice_l_[PADL_(cloudabi_advice_t)]; cloudabi_advice_t advice; char advice_r_[PADR_(cloudabi_advice_t)];
 };
-struct cloudabi_sys_mem_lock_args {
-	char mapping_l_[PADL_(const void *)]; const void * mapping; char mapping_r_[PADR_(const void *)];
-	char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)];
-};
 struct cloudabi_sys_mem_map_args {
 	char addr_l_[PADL_(void *)]; void * addr; char addr_r_[PADR_(void *)];
 	char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)];
@@ -222,10 +218,6 @@ struct cloudabi_sys_mem_sync_args {
 	char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)];
 	char flags_l_[PADL_(cloudabi_msflags_t)]; cloudabi_msflags_t flags; char flags_r_[PADR_(cloudabi_msflags_t)];
 };
-struct cloudabi_sys_mem_unlock_args {
-	char mapping_l_[PADL_(const void *)]; const void * mapping; char mapping_r_[PADR_(const void *)];
-	char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)];
-};
 struct cloudabi_sys_mem_unmap_args {
 	char mapping_l_[PADL_(void *)]; void * mapping; char mapping_r_[PADR_(void *)];
 	char mapping_len_l_[PADL_(size_t)]; size_t mapping_len; char mapping_len_r_[PADR_(size_t)];
@@ -265,7 +257,7 @@ struct cloudabi_sys_random_get_args {
 };
 struct cloudabi_sys_sock_accept_args {
 	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
-	char buf_l_[PADL_(cloudabi_sockstat_t *)]; cloudabi_sockstat_t * buf; char buf_r_[PADR_(cloudabi_sockstat_t *)];
+	char unused_l_[PADL_(void *)]; void * unused; char unused_r_[PADR_(void *)];
 };
 struct cloudabi_sys_sock_bind_args {
 	char sock_l_[PADL_(cloudabi_fd_t)]; cloudabi_fd_t sock; char sock_r_[PADR_(cloudabi_fd_t)];
@@ -345,11 +337,9 @@ int	cloudabi_sys_file_symlink(struct thread *, struct 
 int	cloudabi_sys_file_unlink(struct thread *, struct cloudabi_sys_file_unlink_args *);
 int	cloudabi_sys_lock_unlock(struct thread *, struct cloudabi_sys_lock_unlock_args *);
 int	cloudabi_sys_mem_advise(struct thread *, struct cloudabi_sys_mem_advise_args *);
-int	cloudabi_sys_mem_lock(struct thread *, struct cloudabi_sys_mem_lock_args *);
 int	cloudabi_sys_mem_map(struct thread *, struct cloudabi_sys_mem_map_args *);
 int	cloudabi_sys_mem_protect(struct thread *, struct cloudabi_sys_mem_protect_args *);
 int	cloudabi_sys_mem_sync(struct thread *, struct cloudabi_sys_mem_sync_args *);
-int	cloudabi_sys_mem_unlock(struct thread *, struct cloudabi_sys_mem_unlock_args *);
 int	cloudabi_sys_mem_unmap(struct thread *, struct cloudabi_sys_mem_unmap_args *);
 int	cloudabi32_sys_poll(struct thread *, struct cloudabi32_sys_poll_args *);
 int	cloudabi32_sys_poll_fd(struct thread *, struct cloudabi32_sys_poll_fd_args *);
@@ -399,6 +389,12 @@ int	cloudabi_sys_thread_yield(struct thread *, struct 
 
 #endif /* COMPAT_FREEBSD10 */
 
+
+#ifdef COMPAT_FREEBSD11
+
+
+#endif /* COMPAT_FREEBSD11 */
+
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_clock_res_get	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_clock_time_get	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_condvar_signal	AUE_NULL
@@ -432,11 +428,9 @@ int	cloudabi_sys_thread_yield(struct thread *, struct 
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_file_unlink	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_lock_unlock	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_advise	AUE_NULL
-#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_lock	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_map	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_protect	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_sync	AUE_NULL
-#define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_unlock	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi_sys_mem_unmap	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi32_sys_poll	AUE_NULL
 #define	CLOUDABI32_SYS_AUE_cloudabi32_sys_poll_fd	AUE_NULL

Modified: projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_sock.c
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_sock.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_sock.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -75,7 +75,7 @@ cloudabi32_sys_sock_recv(struct thread *td,
 
 	error = cloudabi_sock_recv(td, uap->sock, iov, ri.ri_data_len,
 	    TO_PTR(ri.ri_fds), ri.ri_fds_len, ri.ri_flags, &rdatalen,
-	    &rfdslen, &ro.ro_peername, &ro.ro_flags);
+	    &rfdslen, &ro.ro_flags);
 	free(iov, M_SOCKET);
 	if (error != 0)
 		return (error);
@@ -118,7 +118,7 @@ cloudabi32_sys_sock_send(struct thread *td,
 	}
 
 	error = cloudabi_sock_send(td, uap->sock, iov, si.si_data_len,
-	    TO_PTR(si.si_fds), si.si_fds_len, si.si_flags, &datalen);
+	    TO_PTR(si.si_fds), si.si_fds_len, &datalen);
 	free(iov, M_SOCKET);
 	if (error != 0)
 		return (error);

Modified: projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscall.h
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscall.h	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscall.h	Wed Jul 26 21:09:10 2017	(r321585)
@@ -38,28 +38,26 @@
 #define	CLOUDABI32_SYS_cloudabi_sys_file_unlink	30
 #define	CLOUDABI32_SYS_cloudabi_sys_lock_unlock	31
 #define	CLOUDABI32_SYS_cloudabi_sys_mem_advise	32
-#define	CLOUDABI32_SYS_cloudabi_sys_mem_lock	33
-#define	CLOUDABI32_SYS_cloudabi_sys_mem_map	34
-#define	CLOUDABI32_SYS_cloudabi_sys_mem_protect	35
-#define	CLOUDABI32_SYS_cloudabi_sys_mem_sync	36
-#define	CLOUDABI32_SYS_cloudabi_sys_mem_unlock	37
-#define	CLOUDABI32_SYS_cloudabi_sys_mem_unmap	38
-#define	CLOUDABI32_SYS_cloudabi32_sys_poll	39
-#define	CLOUDABI32_SYS_cloudabi32_sys_poll_fd	40
-#define	CLOUDABI32_SYS_cloudabi_sys_proc_exec	41
-#define	CLOUDABI32_SYS_cloudabi_sys_proc_exit	42
-#define	CLOUDABI32_SYS_cloudabi_sys_proc_fork	43
-#define	CLOUDABI32_SYS_cloudabi_sys_proc_raise	44
-#define	CLOUDABI32_SYS_cloudabi_sys_random_get	45
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_accept	46
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_bind	47
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_connect	48
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_listen	49
-#define	CLOUDABI32_SYS_cloudabi32_sys_sock_recv	50
-#define	CLOUDABI32_SYS_cloudabi32_sys_sock_send	51
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_shutdown	52
-#define	CLOUDABI32_SYS_cloudabi_sys_sock_stat_get	53
-#define	CLOUDABI32_SYS_cloudabi32_sys_thread_create	54
-#define	CLOUDABI32_SYS_cloudabi_sys_thread_exit	55
-#define	CLOUDABI32_SYS_cloudabi_sys_thread_yield	56
-#define	CLOUDABI32_SYS_MAXSYSCALL	57
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_map	33
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_protect	34
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_sync	35
+#define	CLOUDABI32_SYS_cloudabi_sys_mem_unmap	36
+#define	CLOUDABI32_SYS_cloudabi32_sys_poll	37
+#define	CLOUDABI32_SYS_cloudabi32_sys_poll_fd	38
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_exec	39
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_exit	40
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_fork	41
+#define	CLOUDABI32_SYS_cloudabi_sys_proc_raise	42
+#define	CLOUDABI32_SYS_cloudabi_sys_random_get	43
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_accept	44
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_bind	45
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_connect	46
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_listen	47
+#define	CLOUDABI32_SYS_cloudabi32_sys_sock_recv	48
+#define	CLOUDABI32_SYS_cloudabi32_sys_sock_send	49
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_shutdown	50
+#define	CLOUDABI32_SYS_cloudabi_sys_sock_stat_get	51
+#define	CLOUDABI32_SYS_cloudabi32_sys_thread_create	52
+#define	CLOUDABI32_SYS_cloudabi_sys_thread_exit	53
+#define	CLOUDABI32_SYS_cloudabi_sys_thread_yield	54
+#define	CLOUDABI32_SYS_MAXSYSCALL	55

Modified: projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscalls.c
==============================================================================
--- projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscalls.c	Wed Jul 26 21:06:26 2017	(r321584)
+++ projects/runtime-coverage/sys/compat/cloudabi32/cloudabi32_syscalls.c	Wed Jul 26 21:09:10 2017	(r321585)
@@ -39,28 +39,26 @@ const char *cloudabi32_syscallnames[] = {
 	"cloudabi_sys_file_unlink",			/* 30 = cloudabi_sys_file_unlink */
 	"cloudabi_sys_lock_unlock",			/* 31 = cloudabi_sys_lock_unlock */
 	"cloudabi_sys_mem_advise",			/* 32 = cloudabi_sys_mem_advise */
-	"cloudabi_sys_mem_lock",			/* 33 = cloudabi_sys_mem_lock */
-	"cloudabi_sys_mem_map",			/* 34 = cloudabi_sys_mem_map */
-	"cloudabi_sys_mem_protect",			/* 35 = cloudabi_sys_mem_protect */
-	"cloudabi_sys_mem_sync",			/* 36 = cloudabi_sys_mem_sync */
-	"cloudabi_sys_mem_unlock",			/* 37 = cloudabi_sys_mem_unlock */
-	"cloudabi_sys_mem_unmap",			/* 38 = cloudabi_sys_mem_unmap */
-	"cloudabi32_sys_poll",			/* 39 = cloudabi32_sys_poll */
-	"cloudabi32_sys_poll_fd",			/* 40 = cloudabi32_sys_poll_fd */
-	"cloudabi_sys_proc_exec",			/* 41 = cloudabi_sys_proc_exec */
-	"cloudabi_sys_proc_exit",			/* 42 = cloudabi_sys_proc_exit */
-	"cloudabi_sys_proc_fork",			/* 43 = cloudabi_sys_proc_fork */
-	"cloudabi_sys_proc_raise",			/* 44 = cloudabi_sys_proc_raise */
-	"cloudabi_sys_random_get",			/* 45 = cloudabi_sys_random_get */
-	"cloudabi_sys_sock_accept",			/* 46 = cloudabi_sys_sock_accept */
-	"cloudabi_sys_sock_bind",			/* 47 = cloudabi_sys_sock_bind */
-	"cloudabi_sys_sock_connect",			/* 48 = cloudabi_sys_sock_connect */
-	"cloudabi_sys_sock_listen",			/* 49 = cloudabi_sys_sock_listen */
-	"cloudabi32_sys_sock_recv",			/* 50 = cloudabi32_sys_sock_recv */
-	"cloudabi32_sys_sock_send",			/* 51 = cloudabi32_sys_sock_send */
-	"cloudabi_sys_sock_shutdown",			/* 52 = cloudabi_sys_sock_shutdown */
-	"cloudabi_sys_sock_stat_get",			/* 53 = cloudabi_sys_sock_stat_get */
-	"cloudabi32_sys_thread_create",			/* 54 = cloudabi32_sys_thread_create */
-	"cloudabi_sys_thread_exit",			/* 55 = cloudabi_sys_thread_exit */
-	"cloudabi_sys_thread_yield",			/* 56 = cloudabi_sys_thread_yield */
+	"cloudabi_sys_mem_map",			/* 33 = cloudabi_sys_mem_map */
+	"cloudabi_sys_mem_protect",			/* 34 = cloudabi_sys_mem_protect */
+	"cloudabi_sys_mem_sync",			/* 35 = cloudabi_sys_mem_sync */
+	"cloudabi_sys_mem_unmap",			/* 36 = cloudabi_sys_mem_unmap */
+	"cloudabi32_sys_poll",			/* 37 = cloudabi32_sys_poll */
+	"cloudabi32_sys_poll_fd",			/* 38 = cloudabi32_sys_poll_fd */
+	"cloudabi_sys_proc_exec",			/* 39 = cloudabi_sys_proc_exec */
+	"cloudabi_sys_proc_exit",			/* 40 = cloudabi_sys_proc_exit */
+	"cloudabi_sys_proc_fork",			/* 41 = cloudabi_sys_proc_fork */
+	"cloudabi_sys_proc_raise",			/* 42 = cloudabi_sys_proc_raise */
+	"cloudabi_sys_random_get",			/* 43 = cloudabi_sys_random_get */
+	"cloudabi_sys_sock_accept",			/* 44 = cloudabi_sys_sock_accept */
+	"cloudabi_sys_sock_bind",			/* 45 = cloudabi_sys_sock_bind */
+	"cloudabi_sys_sock_connect",			/* 46 = cloudabi_sys_sock_connect */
+	"cloudabi_sys_sock_listen",			/* 47 = cloudabi_sys_sock_listen */
+	"cloudabi32_sys_sock_recv",			/* 48 = cloudabi32_sys_sock_recv */
+	"cloudabi32_sys_sock_send",			/* 49 = cloudabi32_sys_sock_send */
+	"cloudabi_sys_sock_shutdown",			/* 50 = cloudabi_sys_sock_shutdown */

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list