summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/cmd/dtrace
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2008-04-26 00:54:52 +0000
committerjb <jb@FreeBSD.org>2008-04-26 00:54:52 +0000
commit52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50 (patch)
treec98db398653c7c531756a3578af91819cb574281 /cddl/contrib/opensolaris/cmd/dtrace
parentcb8ce777270daa16660da8e87ef6a11d5bc5408f (diff)
downloadFreeBSD-src-52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50.zip
FreeBSD-src-52c14c7a3f5fbfa9c707a6206668a1eaa6c77a50.tar.gz
Vendor import of the full userland contrib part of DTrace support from
OpenSolaris. This commit resets files to match the versions in the OpenSolaris tree as of 2008/04/10. The changes in this import from the previous import are the ones that will subsequently re-applied to take files off the vendor branch. This is unfortunately necessary because the Solaris developers won't allow FreeBSD support #ifdefs in their source code because that creates 'dead code' (stuff that they never compile).
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/dtrace.c72
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl8
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.hton.d4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d16
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d58
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d109
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d74
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out92
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.create.ksh4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exec.ksh6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ENOENT.ksh4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ksh4
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh25
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitexit.ksh2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c9
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.d6
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c1
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c1
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d2
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.rw.d12
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.misc.d5
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.rootvp.d5
33 files changed, 194 insertions, 367 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
index f909e22..81a6953 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
@@ -34,20 +34,15 @@
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
-#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <limits.h>
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
-#if defined(sun)
#include <alloca.h>
-#endif
#include <libgen.h>
-#if defined(sun)
#include <libproc.h>
-#endif
typedef struct dtrace_cmd {
void (*dc_func)(struct dtrace_cmd *); /* function to compile arg */
@@ -97,9 +92,8 @@ static int g_mode = DMODE_EXEC;
static int g_status = E_SUCCESS;
static int g_grabanon = 0;
static const char *g_ofile = NULL;
-static FILE *g_ofp;
+static FILE *g_ofp = stdout;
static dtrace_hdl_t *g_dtp;
-#if defined(sun)
static char *g_etcfile = "/etc/system";
static const char *g_etcbegin = "* vvvv Added by DTrace";
static const char *g_etcend = "* ^^^^ Added by DTrace";
@@ -114,7 +108,6 @@ static const char *g_etc[] = {
"* chapter of the Solaris Dynamic Tracing Guide for details.",
"*",
NULL };
-#endif
static int
usage(FILE *fp)
@@ -202,10 +195,6 @@ fatal(const char *fmt, ...)
static void
dfatal(const char *fmt, ...)
{
-#if !defined(sun) && defined(NEED_ERRLOC)
- char *p_errfile = NULL;
- int errline = 0;
-#endif
va_list ap;
va_start(ap, fmt);
@@ -223,11 +212,6 @@ dfatal(const char *fmt, ...)
(void) fprintf(stderr, "%s\n",
dtrace_errmsg(g_dtp, dtrace_errno(g_dtp)));
}
-#if !defined(sun) && defined(NEED_ERRLOC)
- dt_get_errloc(g_dtp, &p_errfile, &errline);
- if (p_errfile != NULL)
- printf("File '%s', line %d\n", p_errfile, errline);
-#endif
/*
* Close the DTrace handle to ensure that any controlled processes are
@@ -388,7 +372,6 @@ dof_prune(const char *fname)
free(buf);
}
-#if defined(sun)
static void
etcsystem_prune(void)
{
@@ -499,7 +482,6 @@ etcsystem_add(void)
error("added forceload directives to %s\n", g_ofile);
}
-#endif
static void
print_probe_info(const dtrace_probeinfo_t *p)
@@ -629,26 +611,12 @@ anon_prog(const dtrace_cmd_t *dcp, dof_hdr_t *dof, int n)
p = (uchar_t *)dof;
q = p + dof->dofh_loadsz;
-#if defined(sun)
oprintf("dof-data-%d=0x%x", n, *p++);
while (p < q)
oprintf(",0x%x", *p++);
oprintf(";\n");
-#else
- /*
- * On FreeBSD, the DOF data is handled as a kernel environment (kenv)
- * string. We use two hex characters per DOF byte.
- */
- oprintf("dof-data-%d=%02x", n, *p++);
-
- while (p < q)
- oprintf("%02x", *p++);
-
- oprintf("\n");
-#endif
-
dtrace_dof_destroy(g_dtp, dof);
}
@@ -773,8 +741,6 @@ compile_str(dtrace_cmd_t *dcp)
static void
prochandler(struct ps_prochandle *P, const char *msg, void *arg)
{
-fatal("DOODAD in function %s, file %s, line %d\n",__FUNCTION__,__FILE__,__LINE__);
-#ifdef DOODAD
const psinfo_t *prp = Ppsinfo(P);
int pid = Pstatus(P)->pr_pid;
char name[SIG2STR_MAX];
@@ -812,7 +778,6 @@ fatal("DOODAD in function %s, file %s, line %d\n",__FUNCTION__,__FILE__,__LINE__
g_pslive--;
break;
}
-#endif
}
/*ARGSUSED*/
@@ -1194,10 +1159,9 @@ main(int argc, char *argv[])
dtrace_optval_t opt;
dtrace_cmd_t *dcp;
- g_ofp = stdout;
int done = 0, mode = 0;
- int err, i, c;
- char *p, **v;
+ int err, i;
+ char c, *p, **v;
struct ps_prochandle *P;
pid_t pid;
@@ -1224,7 +1188,7 @@ main(int argc, char *argv[])
* options into g_argv[], and abort if any invalid options are found.
*/
for (optind = 1; optind < argc; optind++) {
- while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != -1) {
+ while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) {
switch (c) {
case '3':
if (strcmp(optarg, "2") != 0) {
@@ -1373,14 +1337,8 @@ main(int argc, char *argv[])
dtrace_errmsg(NULL, err));
}
-#if defined(__i386__)
- /* XXX The 32-bit seems to need more buffer space by default -sson */
- (void) dtrace_setopt(g_dtp, "bufsize", "12m");
- (void) dtrace_setopt(g_dtp, "aggsize", "12m");
-#else
(void) dtrace_setopt(g_dtp, "bufsize", "4m");
(void) dtrace_setopt(g_dtp, "aggsize", "4m");
-#endif
/*
* If -G is specified, enable -xlink=dynamic and -xunodefs to permit
@@ -1413,7 +1371,7 @@ main(int argc, char *argv[])
* this time; these will compiled as part of the fourth processing pass.
*/
for (optind = 1; optind < argc; optind++) {
- while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != -1) {
+ while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) {
switch (c) {
case 'a':
if (dtrace_setopt(g_dtp, "grabanon", 0) != 0)
@@ -1570,7 +1528,7 @@ main(int argc, char *argv[])
* may been affected by any library options set by the second pass.
*/
for (optind = 1; optind < argc; optind++) {
- while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != -1) {
+ while ((c = getopt(argc, argv, DTRACE_OPTSTR)) != EOF) {
switch (c) {
case 'c':
if ((v = make_argv(optarg)) == NULL)
@@ -1658,21 +1616,10 @@ main(int argc, char *argv[])
case DMODE_ANON:
if (g_ofile == NULL)
-#if defined(sun)
g_ofile = "/kernel/drv/dtrace.conf";
-#else
- /*
- * On FreeBSD, anonymous DOF data is written to
- * the DTrace DOF file that the boot loader will
- * read if booting with the DTrace option.
- */
- g_ofile = "/boot/dtrace.dof";
-#endif
dof_prune(g_ofile); /* strip out any old DOF directives */
-#if defined(sun)
etcsystem_prune(); /* string out any forceload directives */
-#endif
if (g_cmdc == 0) {
dtrace_close(g_dtp);
@@ -1703,10 +1650,8 @@ main(int argc, char *argv[])
* that itself contains a #pragma D option quiet.
*/
error("saved anonymous enabling in %s\n", g_ofile);
-#if defined(sun)
etcsystem_add();
error("run update_drv(1M) or reboot to enable changes\n");
-#endif
dtrace_close(g_dtp);
return (g_status);
@@ -1835,11 +1780,6 @@ main(int argc, char *argv[])
if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
(void) sigaction(SIGTERM, &act, NULL);
-#if !defined(sun)
- if (sigaction(SIGUSR1, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN)
- (void) sigaction(SIGUSR1, &act, NULL);
-#endif
-
/*
* Now that tracing is active and we are ready to consume trace data,
* continue any grabbed or created processes, setting them running
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
index cb47c7c..1cbc34a 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dstyle.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/perl5/bin/perl
#
# CDDL HEADER START
#
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
index e8d9032..9624410 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl
@@ -1,4 +1,4 @@
-#!/usr/local/bin/perl
+#!/usr/perl5/bin/perl
#
# CDDL HEADER START
#
@@ -43,7 +43,7 @@ $USAGE = "Usage: $PNAME [-abfghjlnqs] [-d dir] [-i isa] "
@dtrace_argv = ();
-$ksh_path = '/bin/sh';
+$ksh_path = '/usr/bin/ksh';
@files = ();
%exceptions = ();
@@ -273,7 +273,7 @@ sub run_tests {
}
$fullname = "$dir/$name";
- $exe = "./$base.exe";
+ $exe = "$dir/$base.exe";
$exe_pid = -1;
if ($opt_a && ($status != 0 || $tag != 0 || $droptag != 0 ||
@@ -592,7 +592,7 @@ if ($opt_g) {
# Ensure that $PATH contains a cc(1) so that we can execute the
# test programs that require compilation of C code.
#
-#$ENV{'PATH'} = $ENV{'PATH'} . ':/ws/onnv-tools/SUNWspro/SS11/bin';
+$ENV{'PATH'} = $ENV{'PATH'} . ':/ws/onnv-tools/SUNWspro/SS11/bin';
if ($opt_b) {
logmsg("badioctl'ing ... ");
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d
index 267d121..6c4d025 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupgtype.d
@@ -40,8 +40,3 @@ BEGIN
x[123] = `kmem_flags;
x[456] = *`rootvp;
}
-
-ERROR
-{
- exit(1);
-}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d
index ce360cd..e1f17cb 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/assocs/err.D_OP_INCOMPAT.dupttype.d
@@ -40,8 +40,3 @@ BEGIN
self->x[123] = `kmem_flags;
self->x[456] = *`rootvp;
}
-
-ERROR
-{
- exit(1);
-}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d
index 6961a0d..c90f6e9 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo.d
@@ -53,8 +53,3 @@ tick-10ms
printf("address of process = %u\n", curpsinfo->pr_addr);
exit (0);
}
-
-ERROR
-{
- exit(1);
-}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d
index b805e27..098f38b 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/builtinvar/tst.psinfo1.d
@@ -49,8 +49,3 @@ BEGIN
printf("address of process = %u\n", curpsinfo->pr_addr);
exit (0);
}
-
-ERROR
-{
- exit(1);
-}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh
index c34a4aa..9d48f99 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/dtraceUtil/tst.ZeroModuleProbes.d.ksh
@@ -46,7 +46,7 @@ fi
dtrace=$1
$dtrace -qZm wassup'{printf("Iamkool");}' \
--qm BEGIN'{printf("I am done"); exit(0);}'
+-qm unix'{printf("I am done"); exit(0);}'
status=$?
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.hton.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.hton.d
index 4908251..f011883 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.hton.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.hton.d
@@ -30,9 +30,7 @@
* ASSERTION: Test network byte-ordering routines.
*/
-#if defined(__amd64__) || defined(__i386__)
-#define _LITTLE_ENDIAN
-#endif
+#include <sys/isa_defs.h>
BEGIN
{
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d
index fbc5620..cf7459d 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa.d
@@ -28,17 +28,17 @@
#pragma D option quiet
-in_addr_t *ip4a;
-in_addr_t *ip4b;
-in_addr_t *ip4c;
-in_addr_t *ip4d;
+ipaddr_t *ip4a;
+ipaddr_t *ip4b;
+ipaddr_t *ip4c;
+ipaddr_t *ip4d;
BEGIN
{
- this->buf4a = alloca(sizeof (in_addr_t));
- this->buf4b = alloca(sizeof (in_addr_t));
- this->buf4c = alloca(sizeof (in_addr_t));
- this->buf4d = alloca(sizeof (in_addr_t));
+ this->buf4a = alloca(sizeof (ipaddr_t));
+ this->buf4b = alloca(sizeof (ipaddr_t));
+ this->buf4c = alloca(sizeof (ipaddr_t));
+ this->buf4d = alloca(sizeof (ipaddr_t));
ip4a = this->buf4a;
ip4b = this->buf4b;
ip4c = this->buf4c;
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d
index 40b3849..9a00eb7 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntoa6.d
@@ -53,35 +53,35 @@ BEGIN
ip6f = this->buf6f;
ip6g = this->buf6g;
- ip6a->__u6_addr.__u6_addr8[0] = 0xfe;
- ip6a->__u6_addr.__u6_addr8[1] = 0x80;
- ip6a->__u6_addr.__u6_addr8[8] = 0x02;
- ip6a->__u6_addr.__u6_addr8[9] = 0x14;
- ip6a->__u6_addr.__u6_addr8[10] = 0x4f;
- ip6a->__u6_addr.__u6_addr8[11] = 0xff;
- ip6a->__u6_addr.__u6_addr8[12] = 0xfe;
- ip6a->__u6_addr.__u6_addr8[13] = 0x0b;
- ip6a->__u6_addr.__u6_addr8[14] = 0x76;
- ip6a->__u6_addr.__u6_addr8[15] = 0xc8;
- ip6b->__u6_addr.__u6_addr8[0] = 0x10;
- ip6b->__u6_addr.__u6_addr8[1] = 0x80;
- ip6b->__u6_addr.__u6_addr8[10] = 0x08;
- ip6b->__u6_addr.__u6_addr8[11] = 0x08;
- ip6b->__u6_addr.__u6_addr8[13] = 0x20;
- ip6b->__u6_addr.__u6_addr8[13] = 0x0c;
- ip6b->__u6_addr.__u6_addr8[14] = 0x41;
- ip6b->__u6_addr.__u6_addr8[15] = 0x7a;
- ip6c->__u6_addr.__u6_addr8[15] = 0x01;
- ip6e->__u6_addr.__u6_addr8[12] = 0x7f;
- ip6e->__u6_addr.__u6_addr8[15] = 0x01;
- ip6f->__u6_addr.__u6_addr8[10] = 0xff;
- ip6f->__u6_addr.__u6_addr8[11] = 0xff;
- ip6f->__u6_addr.__u6_addr8[12] = 0x7f;
- ip6f->__u6_addr.__u6_addr8[15] = 0x01;
- ip6g->__u6_addr.__u6_addr8[10] = 0xff;
- ip6g->__u6_addr.__u6_addr8[11] = 0xfe;
- ip6g->__u6_addr.__u6_addr8[12] = 0x7f;
- ip6g->__u6_addr.__u6_addr8[15] = 0x01;
+ ip6a->_S6_un._S6_u8[0] = 0xfe;
+ ip6a->_S6_un._S6_u8[1] = 0x80;
+ ip6a->_S6_un._S6_u8[8] = 0x02;
+ ip6a->_S6_un._S6_u8[9] = 0x14;
+ ip6a->_S6_un._S6_u8[10] = 0x4f;
+ ip6a->_S6_un._S6_u8[11] = 0xff;
+ ip6a->_S6_un._S6_u8[12] = 0xfe;
+ ip6a->_S6_un._S6_u8[13] = 0x0b;
+ ip6a->_S6_un._S6_u8[14] = 0x76;
+ ip6a->_S6_un._S6_u8[15] = 0xc8;
+ ip6b->_S6_un._S6_u8[0] = 0x10;
+ ip6b->_S6_un._S6_u8[1] = 0x80;
+ ip6b->_S6_un._S6_u8[10] = 0x08;
+ ip6b->_S6_un._S6_u8[11] = 0x08;
+ ip6b->_S6_un._S6_u8[13] = 0x20;
+ ip6b->_S6_un._S6_u8[13] = 0x0c;
+ ip6b->_S6_un._S6_u8[14] = 0x41;
+ ip6b->_S6_un._S6_u8[15] = 0x7a;
+ ip6c->_S6_un._S6_u8[15] = 0x01;
+ ip6e->_S6_un._S6_u8[12] = 0x7f;
+ ip6e->_S6_un._S6_u8[15] = 0x01;
+ ip6f->_S6_un._S6_u8[10] = 0xff;
+ ip6f->_S6_un._S6_u8[11] = 0xff;
+ ip6f->_S6_un._S6_u8[12] = 0x7f;
+ ip6f->_S6_un._S6_u8[15] = 0x01;
+ ip6g->_S6_un._S6_u8[10] = 0xff;
+ ip6g->_S6_un._S6_u8[11] = 0xfe;
+ ip6g->_S6_un._S6_u8[12] = 0x7f;
+ ip6g->_S6_un._S6_u8[15] = 0x01;
printf("%s\n", inet_ntoa6(ip6a));
printf("%s\n", inet_ntoa6(ip6b));
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d
index 21452d6..c1e4b1b 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.inet_ntop.d
@@ -28,13 +28,10 @@
#pragma D option quiet
-inline int AF_INET = 2;
-inline int AF_INET6 = 28;
-
-in_addr_t *ip4a;
-in_addr_t *ip4b;
-in_addr_t *ip4c;
-in_addr_t *ip4d;
+ipaddr_t *ip4a;
+ipaddr_t *ip4b;
+ipaddr_t *ip4c;
+ipaddr_t *ip4d;
struct in6_addr *ip6a;
struct in6_addr *ip6b;
struct in6_addr *ip6c;
@@ -46,10 +43,10 @@ struct in6_addr *ip6h;
BEGIN
{
- this->buf4a = alloca(sizeof (in_addr_t));
- this->buf4b = alloca(sizeof (in_addr_t));
- this->buf4c = alloca(sizeof (in_addr_t));
- this->buf4d = alloca(sizeof (in_addr_t));
+ this->buf4a = alloca(sizeof (ipaddr_t));
+ this->buf4b = alloca(sizeof (ipaddr_t));
+ this->buf4c = alloca(sizeof (ipaddr_t));
+ this->buf4d = alloca(sizeof (ipaddr_t));
this->buf6a = alloca(sizeof (struct in6_addr));
this->buf6b = alloca(sizeof (struct in6_addr));
this->buf6c = alloca(sizeof (struct in6_addr));
@@ -75,51 +72,51 @@ BEGIN
*ip4b = htonl(0x7f000001);
*ip4c = htonl(0xffffffff);
*ip4d = htonl(0x00000000);
- ip6a->__u6_addr.__u6_addr8[0] = 0xfe;
- ip6a->__u6_addr.__u6_addr8[1] = 0x80;
- ip6a->__u6_addr.__u6_addr8[8] = 0x02;
- ip6a->__u6_addr.__u6_addr8[9] = 0x14;
- ip6a->__u6_addr.__u6_addr8[10] = 0x4f;
- ip6a->__u6_addr.__u6_addr8[11] = 0xff;
- ip6a->__u6_addr.__u6_addr8[12] = 0xfe;
- ip6a->__u6_addr.__u6_addr8[13] = 0x0b;
- ip6a->__u6_addr.__u6_addr8[14] = 0x76;
- ip6a->__u6_addr.__u6_addr8[15] = 0xc8;
- ip6b->__u6_addr.__u6_addr8[0] = 0x10;
- ip6b->__u6_addr.__u6_addr8[1] = 0x80;
- ip6b->__u6_addr.__u6_addr8[10] = 0x08;
- ip6b->__u6_addr.__u6_addr8[11] = 0x08;
- ip6b->__u6_addr.__u6_addr8[13] = 0x20;
- ip6b->__u6_addr.__u6_addr8[13] = 0x0c;
- ip6b->__u6_addr.__u6_addr8[14] = 0x41;
- ip6b->__u6_addr.__u6_addr8[15] = 0x7a;
- ip6c->__u6_addr.__u6_addr8[15] = 0x01;
- ip6e->__u6_addr.__u6_addr8[12] = 0x7f;
- ip6e->__u6_addr.__u6_addr8[15] = 0x01;
- ip6f->__u6_addr.__u6_addr8[10] = 0xff;
- ip6f->__u6_addr.__u6_addr8[11] = 0xff;
- ip6f->__u6_addr.__u6_addr8[12] = 0x7f;
- ip6f->__u6_addr.__u6_addr8[15] = 0x01;
- ip6g->__u6_addr.__u6_addr8[10] = 0xff;
- ip6g->__u6_addr.__u6_addr8[11] = 0xfe;
- ip6g->__u6_addr.__u6_addr8[12] = 0x7f;
- ip6g->__u6_addr.__u6_addr8[15] = 0x01;
- ip6h->__u6_addr.__u6_addr8[0] = 0xff;
- ip6h->__u6_addr.__u6_addr8[1] = 0xff;
- ip6h->__u6_addr.__u6_addr8[2] = 0xff;
- ip6h->__u6_addr.__u6_addr8[3] = 0xff;
- ip6h->__u6_addr.__u6_addr8[4] = 0xff;
- ip6h->__u6_addr.__u6_addr8[5] = 0xff;
- ip6h->__u6_addr.__u6_addr8[6] = 0xff;
- ip6h->__u6_addr.__u6_addr8[7] = 0xff;
- ip6h->__u6_addr.__u6_addr8[8] = 0xff;
- ip6h->__u6_addr.__u6_addr8[9] = 0xff;
- ip6h->__u6_addr.__u6_addr8[10] = 0xff;
- ip6h->__u6_addr.__u6_addr8[11] = 0xff;
- ip6h->__u6_addr.__u6_addr8[12] = 0xff;
- ip6h->__u6_addr.__u6_addr8[13] = 0xff;
- ip6h->__u6_addr.__u6_addr8[14] = 0xff;
- ip6h->__u6_addr.__u6_addr8[15] = 0xff;
+ ip6a->_S6_un._S6_u8[0] = 0xfe;
+ ip6a->_S6_un._S6_u8[1] = 0x80;
+ ip6a->_S6_un._S6_u8[8] = 0x02;
+ ip6a->_S6_un._S6_u8[9] = 0x14;
+ ip6a->_S6_un._S6_u8[10] = 0x4f;
+ ip6a->_S6_un._S6_u8[11] = 0xff;
+ ip6a->_S6_un._S6_u8[12] = 0xfe;
+ ip6a->_S6_un._S6_u8[13] = 0x0b;
+ ip6a->_S6_un._S6_u8[14] = 0x76;
+ ip6a->_S6_un._S6_u8[15] = 0xc8;
+ ip6b->_S6_un._S6_u8[0] = 0x10;
+ ip6b->_S6_un._S6_u8[1] = 0x80;
+ ip6b->_S6_un._S6_u8[10] = 0x08;
+ ip6b->_S6_un._S6_u8[11] = 0x08;
+ ip6b->_S6_un._S6_u8[13] = 0x20;
+ ip6b->_S6_un._S6_u8[13] = 0x0c;
+ ip6b->_S6_un._S6_u8[14] = 0x41;
+ ip6b->_S6_un._S6_u8[15] = 0x7a;
+ ip6c->_S6_un._S6_u8[15] = 0x01;
+ ip6e->_S6_un._S6_u8[12] = 0x7f;
+ ip6e->_S6_un._S6_u8[15] = 0x01;
+ ip6f->_S6_un._S6_u8[10] = 0xff;
+ ip6f->_S6_un._S6_u8[11] = 0xff;
+ ip6f->_S6_un._S6_u8[12] = 0x7f;
+ ip6f->_S6_un._S6_u8[15] = 0x01;
+ ip6g->_S6_un._S6_u8[10] = 0xff;
+ ip6g->_S6_un._S6_u8[11] = 0xfe;
+ ip6g->_S6_un._S6_u8[12] = 0x7f;
+ ip6g->_S6_un._S6_u8[15] = 0x01;
+ ip6h->_S6_un._S6_u8[0] = 0xff;
+ ip6h->_S6_un._S6_u8[1] = 0xff;
+ ip6h->_S6_un._S6_u8[2] = 0xff;
+ ip6h->_S6_un._S6_u8[3] = 0xff;
+ ip6h->_S6_un._S6_u8[4] = 0xff;
+ ip6h->_S6_un._S6_u8[5] = 0xff;
+ ip6h->_S6_un._S6_u8[6] = 0xff;
+ ip6h->_S6_un._S6_u8[7] = 0xff;
+ ip6h->_S6_un._S6_u8[8] = 0xff;
+ ip6h->_S6_un._S6_u8[9] = 0xff;
+ ip6h->_S6_un._S6_u8[10] = 0xff;
+ ip6h->_S6_un._S6_u8[11] = 0xff;
+ ip6h->_S6_un._S6_u8[12] = 0xff;
+ ip6h->_S6_un._S6_u8[13] = 0xff;
+ ip6h->_S6_un._S6_u8[14] = 0xff;
+ ip6h->_S6_un._S6_u8[15] = 0xff;
printf("%s\n", inet_ntop(AF_INET, ip4a));
printf("%s\n", inet_ntop(AF_INET, ip4b));
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d
index 0f97aa1..b4aa84f 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owned.d
@@ -38,8 +38,8 @@
lockstat:::adaptive-acquire
{
- this->owned = mutex_owned((struct mtx *)arg0);
- this->owner = mutex_owner((struct mtx *)arg0);
+ this->owned = mutex_owned((kmutex_t *)arg0);
+ this->owner = mutex_owner((kmutex_t *)arg0);
}
lockstat:::adaptive-acquire
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d
index dbb10c3..a021d50 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_owner.d
@@ -41,17 +41,17 @@
#pragma D option quiet
-struct thread *ptr;
+kthread_t *ptr;
BEGIN
{
i = 0;
}
-lockstat::mtx_lock:adaptive-acquire
+lockstat:genunix:mutex_enter:adaptive-acquire
{
- ptr = mutex_owner((struct mtx *)arg0);
+ ptr = mutex_owner((kmutex_t *)arg0);
i++;
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d
index ac43e79..c13abab 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.mutex_type_adaptive.d
@@ -44,9 +44,9 @@ BEGIN
ret = -99;
}
-mtx_lock:adaptive-acquire
+mutex_enter:adaptive-acquire
{
- ret = mutex_type_adaptive((struct mtx *)arg0);
+ ret = mutex_type_adaptive((kmutex_t *)arg0);
i++;
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d
index edee644..6001d6b 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d
@@ -20,20 +20,18 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#pragma D option quiet
-#pragma D option strsize=32
struct {
int index;
int length;
int nolen;
- int alt;
} command[int];
int i;
@@ -41,9 +39,6 @@ int i;
BEGIN
{
str = "foobarbazbop";
- str2 = "";
- altstr = "CRAIG: Positioned them, I don't ";
- altstr2 = "know... I'm fairly wide guy.";
command[i].index = 3;
command[i].nolen = 1;
@@ -113,18 +108,6 @@ BEGIN
command[i].length = -1;
i++;
- command[i].index = 3;
- command[i].length = -4;
- i++;
-
- command[i].index = 3;
- command[i].length = -20;
- i++;
-
- command[i].index = -10;
- command[i].length = -5;
- i++;
-
command[i].index = 0;
command[i].length = 400;
i++;
@@ -161,16 +144,6 @@ BEGIN
command[i].length = strlen(str) - 1;
i++;
- command[i].index = 100;
- command[i].length = 10;
- command[i].alt = 1;
- i++;
-
- command[i].index = 100;
- command[i].nolen = 1;
- command[i].alt = 1;
- i++;
-
end = i;
i = 0;
printf("#!/usr/perl5/bin/perl\n\nBEGIN {\n");
@@ -180,21 +153,17 @@ BEGIN
tick-1ms
/i < end && command[i].nolen/
{
- this->str = command[i].alt ? altstr : str;
- this->str2 = command[i].alt ? altstr2 : str2;
- this->result = substr(command[i].alt ?
- "CRAIG: Positioned them, I don't know... I'm fairly wide guy." :
- str, command[i].index);
+ this->result = substr(str, command[i].index);
- printf("\tif (substr(\"%s%s\", %d) ne \"%s\") {\n",
- this->str, this->str2, command[i].index, this->result);
+ printf("\tif (substr(\"%s\", %d) != \"%s\") {\n",
+ str, command[i].index, this->result);
- printf("\t\tprintf(\"perl => substr(\\\"%s%s\\\", %d) = ",
- this->str, this->str2, command[i].index);
- printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s%s\", %d));\n",
- this->str, this->str2, command[i].index);
- printf("\t\tprintf(\" D => substr(\\\"%s%s\\\", %d) = ",
- this->str, this->str2, command[i].index);
+ printf("\t\tprintf(\"perl => substr(\\\"%s\\\", %d) = ",
+ str, command[i].index);
+ printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s\", %d));\n",
+ str, command[i].index);
+ printf("\t\tprintf(\" D => substr(\\\"%s\\\", %d) = ",
+ str, command[i].index);
printf("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result);
printf("\t\t$failed++;\n");
printf("\t}\n\n");
@@ -203,21 +172,16 @@ tick-1ms
tick-1ms
/i < end && !command[i].nolen/
{
- this->str = command[i].alt ? altstr : str;
- this->str2 = command[i].alt ? altstr2 : str2;
- this->result = substr(command[i].alt ?
- "CRAIG: Positioned them, I don't know... I'm fairly wide guy." :
- str, command[i].index, command[i].length);
+ this->result = substr(str, command[i].index, command[i].length);
- printf("\tif (substr(\"%s%s\", %d, %d) ne \"%s\") {\n",
- this->str, this->str2, command[i].index, command[i].length,
- this->result);
- printf("\t\tprintf(\"perl => substr(\\\"%s%s\\\", %d, %d) = ",
- this->str, this->str2, command[i].index, command[i].length);
- printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s%s\", %d, %d));\n",
- this->str, this->str2, command[i].index, command[i].length);
- printf("\t\tprintf(\" D => substr(\\\"%s%s\\\", %d, %d) = ",
- this->str, this->str2, command[i].index, command[i].length);
+ printf("\tif (substr(\"%s\", %d, %d) != \"%s\") {\n",
+ str, command[i].index, command[i].length, this->result);
+ printf("\t\tprintf(\"perl => substr(\\\"%s\\\", %d, %d) = ",
+ str, command[i].index, command[i].length);
+ printf("\\\"%%s\\\"\\n\",\n\t\t substr(\"%s\", %d, %d));\n",
+ str, command[i].index, command[i].length);
+ printf("\t\tprintf(\" D => substr(\\\"%s\\\", %d, %d) = ",
+ str, command[i].index, command[i].length);
printf("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result);
printf("\t\t$failed++;\n");
printf("\t}\n\n");
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out
index 5b498ef..d4087a2 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.substr.d.out
@@ -1,7 +1,7 @@
#!/usr/perl5/bin/perl
BEGIN {
- if (substr("foobarbazbop", 3) ne "barbazbop") {
+ if (substr("foobarbazbop", 3) != "barbazbop") {
printf("perl => substr(\"foobarbazbop\", 3) = \"%s\"\n",
substr("foobarbazbop", 3));
printf(" D => substr(\"foobarbazbop\", 3) = \"%s\"\n",
@@ -9,7 +9,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 300) ne "") {
+ if (substr("foobarbazbop", 300) != "") {
printf("perl => substr(\"foobarbazbop\", 300) = \"%s\"\n",
substr("foobarbazbop", 300));
printf(" D => substr(\"foobarbazbop\", 300) = \"%s\"\n",
@@ -17,7 +17,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -10) ne "obarbazbop") {
+ if (substr("foobarbazbop", -10) != "obarbazbop") {
printf("perl => substr(\"foobarbazbop\", -10) = \"%s\"\n",
substr("foobarbazbop", -10));
printf(" D => substr(\"foobarbazbop\", -10) = \"%s\"\n",
@@ -25,7 +25,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 0) ne "foobarbazbop") {
+ if (substr("foobarbazbop", 0) != "foobarbazbop") {
printf("perl => substr(\"foobarbazbop\", 0) = \"%s\"\n",
substr("foobarbazbop", 0));
printf(" D => substr(\"foobarbazbop\", 0) = \"%s\"\n",
@@ -33,7 +33,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 1) ne "oobarbazbop") {
+ if (substr("foobarbazbop", 1) != "oobarbazbop") {
printf("perl => substr(\"foobarbazbop\", 1) = \"%s\"\n",
substr("foobarbazbop", 1));
printf(" D => substr(\"foobarbazbop\", 1) = \"%s\"\n",
@@ -41,7 +41,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 11) ne "p") {
+ if (substr("foobarbazbop", 11) != "p") {
printf("perl => substr(\"foobarbazbop\", 11) = \"%s\"\n",
substr("foobarbazbop", 11));
printf(" D => substr(\"foobarbazbop\", 11) = \"%s\"\n",
@@ -49,7 +49,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 12) ne "") {
+ if (substr("foobarbazbop", 12) != "") {
printf("perl => substr(\"foobarbazbop\", 12) = \"%s\"\n",
substr("foobarbazbop", 12));
printf(" D => substr(\"foobarbazbop\", 12) = \"%s\"\n",
@@ -57,7 +57,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 13) ne "") {
+ if (substr("foobarbazbop", 13) != "") {
printf("perl => substr(\"foobarbazbop\", 13) = \"%s\"\n",
substr("foobarbazbop", 13));
printf(" D => substr(\"foobarbazbop\", 13) = \"%s\"\n",
@@ -65,7 +65,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 8, 20) ne "zbop") {
+ if (substr("foobarbazbop", 8, 20) != "zbop") {
printf("perl => substr(\"foobarbazbop\", 8, 20) = \"%s\"\n",
substr("foobarbazbop", 8, 20));
printf(" D => substr(\"foobarbazbop\", 8, 20) = \"%s\"\n",
@@ -73,7 +73,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 4, 4) ne "arba") {
+ if (substr("foobarbazbop", 4, 4) != "arba") {
printf("perl => substr(\"foobarbazbop\", 4, 4) = \"%s\"\n",
substr("foobarbazbop", 4, 4));
printf(" D => substr(\"foobarbazbop\", 4, 4) = \"%s\"\n",
@@ -81,7 +81,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 5, 8) ne "rbazbop") {
+ if (substr("foobarbazbop", 5, 8) != "rbazbop") {
printf("perl => substr(\"foobarbazbop\", 5, 8) = \"%s\"\n",
substr("foobarbazbop", 5, 8));
printf(" D => substr(\"foobarbazbop\", 5, 8) = \"%s\"\n",
@@ -89,7 +89,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 5, 9) ne "rbazbop") {
+ if (substr("foobarbazbop", 5, 9) != "rbazbop") {
printf("perl => substr(\"foobarbazbop\", 5, 9) = \"%s\"\n",
substr("foobarbazbop", 5, 9));
printf(" D => substr(\"foobarbazbop\", 5, 9) = \"%s\"\n",
@@ -97,7 +97,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 400, 20) ne "") {
+ if (substr("foobarbazbop", 400, 20) != "") {
printf("perl => substr(\"foobarbazbop\", 400, 20) = \"%s\"\n",
substr("foobarbazbop", 400, 20));
printf(" D => substr(\"foobarbazbop\", 400, 20) = \"%s\"\n",
@@ -105,7 +105,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 400, 0) ne "") {
+ if (substr("foobarbazbop", 400, 0) != "") {
printf("perl => substr(\"foobarbazbop\", 400, 0) = \"%s\"\n",
substr("foobarbazbop", 400, 0));
printf(" D => substr(\"foobarbazbop\", 400, 0) = \"%s\"\n",
@@ -113,7 +113,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 400, -1) ne "") {
+ if (substr("foobarbazbop", 400, -1) != "") {
printf("perl => substr(\"foobarbazbop\", 400, -1) = \"%s\"\n",
substr("foobarbazbop", 400, -1));
printf(" D => substr(\"foobarbazbop\", 400, -1) = \"%s\"\n",
@@ -121,7 +121,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 3, 0) ne "") {
+ if (substr("foobarbazbop", 3, 0) != "") {
printf("perl => substr(\"foobarbazbop\", 3, 0) = \"%s\"\n",
substr("foobarbazbop", 3, 0));
printf(" D => substr(\"foobarbazbop\", 3, 0) = \"%s\"\n",
@@ -129,39 +129,15 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", 3, -1) ne "barbazbo") {
+ if (substr("foobarbazbop", 3, -1) != "") {
printf("perl => substr(\"foobarbazbop\", 3, -1) = \"%s\"\n",
substr("foobarbazbop", 3, -1));
printf(" D => substr(\"foobarbazbop\", 3, -1) = \"%s\"\n",
- "barbazbo");
- $failed++;
- }
-
- if (substr("foobarbazbop", 3, -4) ne "barba") {
- printf("perl => substr(\"foobarbazbop\", 3, -4) = \"%s\"\n",
- substr("foobarbazbop", 3, -4));
- printf(" D => substr(\"foobarbazbop\", 3, -4) = \"%s\"\n",
- "barba");
- $failed++;
- }
-
- if (substr("foobarbazbop", 3, -20) ne "") {
- printf("perl => substr(\"foobarbazbop\", 3, -20) = \"%s\"\n",
- substr("foobarbazbop", 3, -20));
- printf(" D => substr(\"foobarbazbop\", 3, -20) = \"%s\"\n",
"");
$failed++;
}
- if (substr("foobarbazbop", -10, -5) ne "obarb") {
- printf("perl => substr(\"foobarbazbop\", -10, -5) = \"%s\"\n",
- substr("foobarbazbop", -10, -5));
- printf(" D => substr(\"foobarbazbop\", -10, -5) = \"%s\"\n",
- "obarb");
- $failed++;
- }
-
- if (substr("foobarbazbop", 0, 400) ne "foobarbazbop") {
+ if (substr("foobarbazbop", 0, 400) != "foobarbazbop") {
printf("perl => substr(\"foobarbazbop\", 0, 400) = \"%s\"\n",
substr("foobarbazbop", 0, 400));
printf(" D => substr(\"foobarbazbop\", 0, 400) = \"%s\"\n",
@@ -169,7 +145,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -1, 400) ne "p") {
+ if (substr("foobarbazbop", -1, 400) != "p") {
printf("perl => substr(\"foobarbazbop\", -1, 400) = \"%s\"\n",
substr("foobarbazbop", -1, 400));
printf(" D => substr(\"foobarbazbop\", -1, 400) = \"%s\"\n",
@@ -177,7 +153,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -1, 0) ne "") {
+ if (substr("foobarbazbop", -1, 0) != "") {
printf("perl => substr(\"foobarbazbop\", -1, 0) = \"%s\"\n",
substr("foobarbazbop", -1, 0));
printf(" D => substr(\"foobarbazbop\", -1, 0) = \"%s\"\n",
@@ -185,7 +161,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -1, -1) ne "") {
+ if (substr("foobarbazbop", -1, -1) != "") {
printf("perl => substr(\"foobarbazbop\", -1, -1) = \"%s\"\n",
substr("foobarbazbop", -1, -1));
printf(" D => substr(\"foobarbazbop\", -1, -1) = \"%s\"\n",
@@ -193,7 +169,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -24, 24) ne "foobarbazbop") {
+ if (substr("foobarbazbop", -24, 24) != "foobarbazbop") {
printf("perl => substr(\"foobarbazbop\", -24, 24) = \"%s\"\n",
substr("foobarbazbop", -24, 24));
printf(" D => substr(\"foobarbazbop\", -24, 24) = \"%s\"\n",
@@ -201,7 +177,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -24, 12) ne "") {
+ if (substr("foobarbazbop", -24, 12) != "") {
printf("perl => substr(\"foobarbazbop\", -24, 12) = \"%s\"\n",
substr("foobarbazbop", -24, 12));
printf(" D => substr(\"foobarbazbop\", -24, 12) = \"%s\"\n",
@@ -209,7 +185,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -24, 13) ne "f") {
+ if (substr("foobarbazbop", -24, 13) != "f") {
printf("perl => substr(\"foobarbazbop\", -24, 13) = \"%s\"\n",
substr("foobarbazbop", -24, 13));
printf(" D => substr(\"foobarbazbop\", -24, 13) = \"%s\"\n",
@@ -217,7 +193,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -12, 12) ne "foobarbazbop") {
+ if (substr("foobarbazbop", -12, 12) != "foobarbazbop") {
printf("perl => substr(\"foobarbazbop\", -12, 12) = \"%s\"\n",
substr("foobarbazbop", -12, 12));
printf(" D => substr(\"foobarbazbop\", -12, 12) = \"%s\"\n",
@@ -225,7 +201,7 @@ BEGIN {
$failed++;
}
- if (substr("foobarbazbop", -12, 11) ne "foobarbazbo") {
+ if (substr("foobarbazbop", -12, 11) != "foobarbazbo") {
printf("perl => substr(\"foobarbazbop\", -12, 11) = \"%s\"\n",
substr("foobarbazbop", -12, 11));
printf(" D => substr(\"foobarbazbop\", -12, 11) = \"%s\"\n",
@@ -233,22 +209,6 @@ BEGIN {
$failed++;
}
- if (substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100, 10) ne "") {
- printf("perl => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100, 10) = \"%s\"\n",
- substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100, 10));
- printf(" D => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100, 10) = \"%s\"\n",
- "");
- $failed++;
- }
-
- if (substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100) ne "") {
- printf("perl => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100) = \"%s\"\n",
- substr("CRAIG: Positioned them, I don't know... I'm fairly wide guy.", 100));
- printf(" D => substr(\"CRAIG: Positioned them, I don't know... I'm fairly wide guy.\", 100) = \"%s\"\n",
- "");
- $failed++;
- }
-
exit($failed);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.create.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.create.ksh
index 6b21eb8..5b484cf 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.create.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.create.ksh
@@ -36,7 +36,7 @@ script()
{
$dtrace -s /dev/stdin <<EOF
proc:::create
- /args[0]->p_pptr->p_pid == $child && pid == $child/
+ /args[0]->pr_ppid == $child && pid == $child/
{
exit(0);
}
@@ -46,7 +46,7 @@ EOF
sleeper()
{
while true; do
- /bin/sleep 1
+ /usr/bin/sleep 1
done
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exec.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exec.ksh
index 92330fb..0318ae6 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exec.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exec.ksh
@@ -36,12 +36,12 @@ script()
{
$dtrace -s /dev/stdin <<EOF
proc:::exec
- /curpsinfo->pr_ppid == $child && args[0] == "/bin/sleep"/
+ /curpsinfo->pr_ppid == $child && args[0] == "/usr/bin/sleep"/
{
self->exec = 1;
}
- proc:::exec_success
+ proc:::exec-success
/self->exec/
{
exit(0);
@@ -52,7 +52,7 @@ EOF
sleeper()
{
while true; do
- /bin/sleep 1
+ /usr/bin/sleep 1
done
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ENOENT.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ENOENT.ksh
index 5dbce13..fb1efc5 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ENOENT.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ENOENT.ksh
@@ -42,7 +42,7 @@ script()
self->exec = 1;
}
- proc:::exec_failure
+ proc:::exec-failure
/self->exec && args[0] == ENOENT/
{
exit(0);
@@ -53,7 +53,7 @@ EOF
sleeper()
{
while true; do
- /bin/sleep 1
+ /usr/bin/sleep 1
$badexec
done
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ksh
index 3b2dbb3..d2241e1 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.execfail.ksh
@@ -45,7 +45,7 @@ script()
self->exec = 1;
}
- proc:::exec_failure
+ proc:::exec-failure
/self->exec/
{
exit(0);
@@ -56,7 +56,7 @@ EOF
sleeper()
{
while true; do
- /bin/sleep 1
+ /usr/bin/sleep 1
$badexec
done
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
index 867e4ff..df3fdb3 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitcore.ksh
@@ -43,16 +43,18 @@ script()
$dtrace -s /dev/stdin <<EOF
proc:::exit
/curpsinfo->pr_ppid == $child &&
- execargs == "$longsleep" && args[0] == CLD_DUMPED/
+ curpsinfo->pr_psargs == "$longsleep" && args[0] == CLD_DUMPED/
{
exit(0);
}
proc:::exit
/curpsinfo->pr_ppid == $child &&
- execargs == "$longsleep" && args[0] != CLD_DUMPED/
+ curpsinfo->pr_psargs == "$longsleep" && args[0] != CLD_DUMPED/
{
- printf("Child process could did dump core.");
+ printf("Child process could not dump core. Check coreadm(1M)");
+ printf(" settings; either per-process or global core dumps ");
+ printf("must be enabled for this test to work properly.");
exit(1);
}
EOF
@@ -60,12 +62,13 @@ EOF
sleeper()
{
+ /usr/bin/coreadm -p $corefile
while true; do
$longsleep &
- /bin/sleep 1
+ /usr/bin/sleep 1
kill -SEGV $!
done
- /bin/rm -f $corefile
+ /usr/bin/rm -f $corefile
}
if [ $# != 1 ]; then
@@ -74,8 +77,8 @@ if [ $# != 1 ]; then
fi
dtrace=$1
-longsleep="/bin/sleep 10000"
-corefile=/tmp/sleep.core
+longsleep="/usr/bin/sleep 10000"
+corefile=/tmp/core.$$
sleeper &
child=$!
@@ -83,10 +86,10 @@ child=$!
script
status=$?
-#pstop $child
-#pkill -P $child
+pstop $child
+pkill -P $child
kill $child
-#prun $child
+prun $child
-/bin/rm -f $corefile
+/usr/bin/rm -f $corefile
exit $status
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitexit.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitexit.ksh
index 0d71b15..13af911 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitexit.ksh
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.exitexit.ksh
@@ -46,7 +46,7 @@ EOF
sleeper()
{
while true; do
- /bin/sleep 1
+ /usr/bin/sleep 1
done
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c
index c9cc434..8f6231b 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.c
@@ -33,8 +33,6 @@
#include <errno.h>
#include <string.h>
-#define NANOSEC 1000000000
-
int
main(int argc, char **argv)
{
@@ -43,7 +41,6 @@ main(int argc, char **argv)
sigset_t set;
timer_t tid;
char *cmd = argv[0];
- int sig;
ev.sigev_notify = SIGEV_SIGNAL;
ev.sigev_signo = SIGUSR1;
@@ -69,9 +66,9 @@ main(int argc, char **argv)
exit(EXIT_FAILURE);
}
- do {
- (void) sigwait(&set, &sig);
- } while(sig != SIGUSR1);
+ for (;;) {
+ (void) sigwait(&set);
+ }
/*NOTREACHED*/
return (0);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.d
index fd6baff..851fa26 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/proc/tst.sigwait.d
@@ -28,13 +28,13 @@
#pragma D option destructive
-proc:::signal_send
-/args[1]->p_pid == $1 && args[2] == SIGUSR1/
+proc:::signal-send
+/pid == 0 && args[1]->pr_pid == $1 && args[2] == SIGUSR1/
{
sent = 1;
}
-proc:::signal_clear
+proc:::signal-clear
/pid == $1 && args[0] == SIGUSR1 && sent/
{
exit(0);
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d
index cdc7154..b3b70f2 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise1.d
@@ -54,7 +54,7 @@ syscall::getpid:entry
timeout = timestamp + 500000000;
}
-syscall::exit:entry
+syscall::rexit:entry
{
exit(0);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
index 9089283..be0d982 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.c
@@ -28,7 +28,6 @@
#include <unistd.h>
#include <signal.h>
-#include <stdlib.h>
static void
handle(int sig)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d
index 4f68a0b..1f967a3 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise2.d
@@ -54,7 +54,7 @@ syscall::getpid:return
timeout = timestamp + 500000000;
}
-syscall::exit:entry
+syscall::rexit:entry
{
exit(0);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
index 9089283..be0d982 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.c
@@ -28,7 +28,6 @@
#include <unistd.h>
#include <signal.h>
-#include <stdlib.h>
static void
handle(int sig)
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d
index cdc7154..b3b70f2 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/raise/tst.raise3.d
@@ -54,7 +54,7 @@ syscall::getpid:entry
timeout = timestamp + 500000000;
}
-syscall::exit:entry
+syscall::rexit:entry
{
exit(0);
}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.rw.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.rw.d
index c1fcd85..0df9787 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.rw.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.rw.d
@@ -38,22 +38,22 @@ fbt:::
fbt:::
/on/
{
- @[rw_read_held((struct rwlock *)&`unp_global_rwlock)] = count();
- @[rw_read_held((struct rwlock *)rand())] = count();
+ @[rw_read_held((krwlock_t *)&`clock)] = count();
+ @[rw_read_held((krwlock_t *)rand())] = count();
}
fbt:::
/on/
{
- @[rw_write_held((struct rwlock *)&`unp_global_rwlock)] = count();
- @[rw_write_held((struct rwlock *)rand())] = count();
+ @[rw_write_held((krwlock_t *)&`clock)] = count();
+ @[rw_write_held((krwlock_t *)rand())] = count();
}
fbt:::
/on/
{
- @[rw_iswriter((struct rwlock *)&`unp_global_rwlock)] = count();
- @[rw_iswriter((struct rwlock *)rand())] = count();
+ @[rw_iswriter((krwlock_t *)&`clock)] = count();
+ @[rw_iswriter((krwlock_t *)rand())] = count();
}
tick-1sec
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.misc.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.misc.d
index 70ad5fc..179d760 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.misc.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.misc.d
@@ -61,8 +61,3 @@ tick-1
{
exit(0);
}
-
-ERROR
-{
- exit(1);
-}
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.rootvp.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.rootvp.d
index 537b722..afa1570 100644
--- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.rootvp.d
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/tracemem/tst.rootvp.d
@@ -52,8 +52,3 @@ tick-1
{
exit(0);
}
-
-ERROR
-{
- exit(1);
-}
OpenPOWER on IntegriCloud