diff options
author | jb <jb@FreeBSD.org> | 2008-04-26 03:32:20 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 2008-04-26 03:32:20 +0000 |
commit | 1b79cc086162d82698d80bec910a50e9eaaebda6 (patch) | |
tree | 247a4232c1774043db2bc2ec3fd835923f475215 | |
parent | 23f167db941decefa8596945c707f2102bf6d1ec (diff) | |
download | FreeBSD-src-1b79cc086162d82698d80bec910a50e9eaaebda6.zip FreeBSD-src-1b79cc086162d82698d80bec910a50e9eaaebda6.tar.gz |
Port these test files to work under FreeBSD.
30 files changed, 296 insertions, 183 deletions
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 6c4d025..267d121 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,3 +40,8 @@ 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 e1f17cb..ce360cd 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,3 +40,8 @@ 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 c90f6e9..6961a0d 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,3 +53,8 @@ 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 098f38b..b805e27 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,3 +49,8 @@ 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 9d48f99..c34a4aa 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 unix'{printf("I am done"); exit(0);}' +-qm BEGIN'{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 f011883..4908251 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,7 +30,9 @@ * ASSERTION: Test network byte-ordering routines. */ -#include <sys/isa_defs.h> +#if defined(__amd64__) || defined(__i386__) +#define _LITTLE_ENDIAN +#endif 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 cf7459d..fbc5620 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 -ipaddr_t *ip4a; -ipaddr_t *ip4b; -ipaddr_t *ip4c; -ipaddr_t *ip4d; +in_addr_t *ip4a; +in_addr_t *ip4b; +in_addr_t *ip4c; +in_addr_t *ip4d; BEGIN { - 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->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)); 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 9a00eb7..40b3849 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->_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; + 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; 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 c1e4b1b..21452d6 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,10 +28,13 @@ #pragma D option quiet -ipaddr_t *ip4a; -ipaddr_t *ip4b; -ipaddr_t *ip4c; -ipaddr_t *ip4d; +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; struct in6_addr *ip6a; struct in6_addr *ip6b; struct in6_addr *ip6c; @@ -43,10 +46,10 @@ struct in6_addr *ip6h; BEGIN { - 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->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->buf6a = alloca(sizeof (struct in6_addr)); this->buf6b = alloca(sizeof (struct in6_addr)); this->buf6c = alloca(sizeof (struct in6_addr)); @@ -72,51 +75,51 @@ BEGIN *ip4b = htonl(0x7f000001); *ip4c = htonl(0xffffffff); *ip4d = htonl(0x00000000); - 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; + 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; 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 b4aa84f..0f97aa1 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((kmutex_t *)arg0); - this->owner = mutex_owner((kmutex_t *)arg0); + this->owned = mutex_owned((struct mtx *)arg0); + this->owner = mutex_owner((struct mtx *)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 a021d50..dbb10c3 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 -kthread_t *ptr; +struct thread *ptr; BEGIN { i = 0; } -lockstat:genunix:mutex_enter:adaptive-acquire +lockstat::mtx_lock:adaptive-acquire { - ptr = mutex_owner((kmutex_t *)arg0); + ptr = mutex_owner((struct mtx *)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 c13abab..ac43e79 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; } -mutex_enter:adaptive-acquire +mtx_lock:adaptive-acquire { - ret = mutex_type_adaptive((kmutex_t *)arg0); + ret = mutex_type_adaptive((struct mtx *)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 6001d6b..edee644 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,18 +20,20 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 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; @@ -39,6 +41,9 @@ 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; @@ -108,6 +113,18 @@ 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++; @@ -144,6 +161,16 @@ 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"); @@ -153,17 +180,21 @@ BEGIN tick-1ms /i < end && command[i].nolen/ { - this->result = substr(str, command[i].index); + 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); - printf("\tif (substr(\"%s\", %d) != \"%s\") {\n", - str, command[i].index, this->result); + printf("\tif (substr(\"%s%s\", %d) ne \"%s\") {\n", + this->str, this->str2, command[i].index, this->result); - 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("\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("\\\"%%s\\\"\\n\",\n\t\t \"%s\");\n", this->result); printf("\t\t$failed++;\n"); printf("\t}\n\n"); @@ -172,16 +203,21 @@ tick-1ms tick-1ms /i < end && !command[i].nolen/ { - this->result = substr(str, 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) = ", + 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); + + 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("\\\"%%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 d4087a2..5b498ef 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) != "barbazbop") { + if (substr("foobarbazbop", 3) ne "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) != "") { + if (substr("foobarbazbop", 300) ne "") { 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) != "obarbazbop") { + if (substr("foobarbazbop", -10) ne "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) != "foobarbazbop") { + if (substr("foobarbazbop", 0) ne "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) != "oobarbazbop") { + if (substr("foobarbazbop", 1) ne "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) != "p") { + if (substr("foobarbazbop", 11) ne "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) != "") { + if (substr("foobarbazbop", 12) ne "") { 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) != "") { + if (substr("foobarbazbop", 13) ne "") { 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) != "zbop") { + if (substr("foobarbazbop", 8, 20) ne "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) != "arba") { + if (substr("foobarbazbop", 4, 4) ne "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) != "rbazbop") { + if (substr("foobarbazbop", 5, 8) ne "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) != "rbazbop") { + if (substr("foobarbazbop", 5, 9) ne "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) != "") { + if (substr("foobarbazbop", 400, 20) ne "") { 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) != "") { + if (substr("foobarbazbop", 400, 0) ne "") { 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) != "") { + if (substr("foobarbazbop", 400, -1) ne "") { 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) != "") { + if (substr("foobarbazbop", 3, 0) ne "") { printf("perl => substr(\"foobarbazbop\", 3, 0) = \"%s\"\n", substr("foobarbazbop", 3, 0)); printf(" D => substr(\"foobarbazbop\", 3, 0) = \"%s\"\n", @@ -129,15 +129,39 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", 3, -1) != "") { + if (substr("foobarbazbop", 3, -1) ne "barbazbo") { 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", 0, 400) != "foobarbazbop") { + 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") { printf("perl => substr(\"foobarbazbop\", 0, 400) = \"%s\"\n", substr("foobarbazbop", 0, 400)); printf(" D => substr(\"foobarbazbop\", 0, 400) = \"%s\"\n", @@ -145,7 +169,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -1, 400) != "p") { + if (substr("foobarbazbop", -1, 400) ne "p") { printf("perl => substr(\"foobarbazbop\", -1, 400) = \"%s\"\n", substr("foobarbazbop", -1, 400)); printf(" D => substr(\"foobarbazbop\", -1, 400) = \"%s\"\n", @@ -153,7 +177,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -1, 0) != "") { + if (substr("foobarbazbop", -1, 0) ne "") { printf("perl => substr(\"foobarbazbop\", -1, 0) = \"%s\"\n", substr("foobarbazbop", -1, 0)); printf(" D => substr(\"foobarbazbop\", -1, 0) = \"%s\"\n", @@ -161,7 +185,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -1, -1) != "") { + if (substr("foobarbazbop", -1, -1) ne "") { printf("perl => substr(\"foobarbazbop\", -1, -1) = \"%s\"\n", substr("foobarbazbop", -1, -1)); printf(" D => substr(\"foobarbazbop\", -1, -1) = \"%s\"\n", @@ -169,7 +193,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -24, 24) != "foobarbazbop") { + if (substr("foobarbazbop", -24, 24) ne "foobarbazbop") { printf("perl => substr(\"foobarbazbop\", -24, 24) = \"%s\"\n", substr("foobarbazbop", -24, 24)); printf(" D => substr(\"foobarbazbop\", -24, 24) = \"%s\"\n", @@ -177,7 +201,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -24, 12) != "") { + if (substr("foobarbazbop", -24, 12) ne "") { printf("perl => substr(\"foobarbazbop\", -24, 12) = \"%s\"\n", substr("foobarbazbop", -24, 12)); printf(" D => substr(\"foobarbazbop\", -24, 12) = \"%s\"\n", @@ -185,7 +209,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -24, 13) != "f") { + if (substr("foobarbazbop", -24, 13) ne "f") { printf("perl => substr(\"foobarbazbop\", -24, 13) = \"%s\"\n", substr("foobarbazbop", -24, 13)); printf(" D => substr(\"foobarbazbop\", -24, 13) = \"%s\"\n", @@ -193,7 +217,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -12, 12) != "foobarbazbop") { + if (substr("foobarbazbop", -12, 12) ne "foobarbazbop") { printf("perl => substr(\"foobarbazbop\", -12, 12) = \"%s\"\n", substr("foobarbazbop", -12, 12)); printf(" D => substr(\"foobarbazbop\", -12, 12) = \"%s\"\n", @@ -201,7 +225,7 @@ BEGIN { $failed++; } - if (substr("foobarbazbop", -12, 11) != "foobarbazbo") { + if (substr("foobarbazbop", -12, 11) ne "foobarbazbo") { printf("perl => substr(\"foobarbazbop\", -12, 11) = \"%s\"\n", substr("foobarbazbop", -12, 11)); printf(" D => substr(\"foobarbazbop\", -12, 11) = \"%s\"\n", @@ -209,6 +233,22 @@ 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 5b484cf..6b21eb8 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]->pr_ppid == $child && pid == $child/ + /args[0]->p_pptr->p_pid == $child && pid == $child/ { exit(0); } @@ -46,7 +46,7 @@ EOF sleeper() { while true; do - /usr/bin/sleep 1 + /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 0318ae6..92330fb 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] == "/usr/bin/sleep"/ + /curpsinfo->pr_ppid == $child && args[0] == "/bin/sleep"/ { self->exec = 1; } - proc:::exec-success + proc:::exec_success /self->exec/ { exit(0); @@ -52,7 +52,7 @@ EOF sleeper() { while true; do - /usr/bin/sleep 1 + /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 fb1efc5..5dbce13 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 - /usr/bin/sleep 1 + /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 d2241e1..3b2dbb3 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 - /usr/bin/sleep 1 + /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 df3fdb3..867e4ff 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,18 +43,16 @@ script() $dtrace -s /dev/stdin <<EOF proc:::exit /curpsinfo->pr_ppid == $child && - curpsinfo->pr_psargs == "$longsleep" && args[0] == CLD_DUMPED/ + execargs == "$longsleep" && args[0] == CLD_DUMPED/ { exit(0); } proc:::exit /curpsinfo->pr_ppid == $child && - curpsinfo->pr_psargs == "$longsleep" && args[0] != CLD_DUMPED/ + execargs == "$longsleep" && args[0] != CLD_DUMPED/ { - 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."); + printf("Child process could did dump core."); exit(1); } EOF @@ -62,13 +60,12 @@ EOF sleeper() { - /usr/bin/coreadm -p $corefile while true; do $longsleep & - /usr/bin/sleep 1 + /bin/sleep 1 kill -SEGV $! done - /usr/bin/rm -f $corefile + /bin/rm -f $corefile } if [ $# != 1 ]; then @@ -77,8 +74,8 @@ if [ $# != 1 ]; then fi dtrace=$1 -longsleep="/usr/bin/sleep 10000" -corefile=/tmp/core.$$ +longsleep="/bin/sleep 10000" +corefile=/tmp/sleep.core sleeper & child=$! @@ -86,10 +83,10 @@ child=$! script status=$? -pstop $child -pkill -P $child +#pstop $child +#pkill -P $child kill $child -prun $child +#prun $child -/usr/bin/rm -f $corefile +/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 13af911..0d71b15 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 - /usr/bin/sleep 1 + /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 8f6231b..c9cc434 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,6 +33,8 @@ #include <errno.h> #include <string.h> +#define NANOSEC 1000000000 + int main(int argc, char **argv) { @@ -41,6 +43,7 @@ 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; @@ -66,9 +69,9 @@ main(int argc, char **argv) exit(EXIT_FAILURE); } - for (;;) { - (void) sigwait(&set); - } + do { + (void) sigwait(&set, &sig); + } while(sig != SIGUSR1); /*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 851fa26..fd6baff 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 -/pid == 0 && args[1]->pr_pid == $1 && args[2] == SIGUSR1/ +proc:::signal_send +/args[1]->p_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 b3b70f2..cdc7154 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::rexit:entry +syscall::exit: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 be0d982..9089283 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,6 +28,7 @@ #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 1f967a3..4f68a0b 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::rexit:entry +syscall::exit: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 be0d982..9089283 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,6 +28,7 @@ #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 b3b70f2..cdc7154 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::rexit:entry +syscall::exit: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 0df9787..c1fcd85 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((krwlock_t *)&`clock)] = count(); - @[rw_read_held((krwlock_t *)rand())] = count(); + @[rw_read_held((struct rwlock *)&`unp_global_rwlock)] = count(); + @[rw_read_held((struct rwlock *)rand())] = count(); } fbt::: /on/ { - @[rw_write_held((krwlock_t *)&`clock)] = count(); - @[rw_write_held((krwlock_t *)rand())] = count(); + @[rw_write_held((struct rwlock *)&`unp_global_rwlock)] = count(); + @[rw_write_held((struct rwlock *)rand())] = count(); } fbt::: /on/ { - @[rw_iswriter((krwlock_t *)&`clock)] = count(); - @[rw_iswriter((krwlock_t *)rand())] = count(); + @[rw_iswriter((struct rwlock *)&`unp_global_rwlock)] = count(); + @[rw_iswriter((struct rwlock *)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 179d760..70ad5fc 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,3 +61,8 @@ 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 afa1570..537b722 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,3 +52,8 @@ tick-1 { exit(0); } + +ERROR +{ + exit(1); +} |