diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2013-04-17 02:20:17 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2013-04-17 02:20:17 +0000 |
commit | 03836978bec158bdc0ecee7a4198962f91ce8298 (patch) | |
tree | daa5db7d59bdba8c6f4ebf57f4923612b4fd09b6 /cddl/contrib/opensolaris/cmd | |
parent | 9f08548d207f1139fb2c3d15f9d6ca1aa3f6303a (diff) | |
download | src-03836978bec158bdc0ecee7a4198962f91ce8298.tar.gz src-03836978bec158bdc0ecee7a4198962f91ce8298.zip |
DTrace: Revert r249367
The following change from illumos brought caused DTrace to
pause in an interactive environment:
3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider
This was not detected during testing because it doesn't
affect scripts.
We shouldn't be changing the environment, especially since the
LD_NOLAZYLOAD option doesn't apply to our (GNU) ld.
Unfortunately the change from upstream was made in such a way
that it is very difficult to separate this change from the
others so, at least for now, it's better to just revert
everything.
Reference:
https://www.illumos.org/issues/3026
Reported by: Navdeep Parhar and Mark Johnston
Notes
Notes:
svn path=/head/; revision=249573
Diffstat (limited to 'cddl/contrib/opensolaris/cmd')
38 files changed, 382 insertions, 951 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c index a745ceb71732..cc7959f99cd1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c @@ -23,9 +23,8 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ + +#pragma ident "%Z%%M% %I% %E% SMI" #include <sys/types.h> #include <sys/stat.h> @@ -1410,7 +1409,6 @@ main(int argc, char *argv[]) (void) dtrace_setopt(g_dtp, "bufsize", "4m"); (void) dtrace_setopt(g_dtp, "aggsize", "4m"); #endif - (void) dtrace_setopt(g_dtp, "temporal", "yes"); /* * If -G is specified, enable -xlink=dynamic and -xunodefs to permit 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 db157415b62b..7b47580ddf62 100755 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl @@ -583,8 +583,6 @@ if ($opt_x) { die "$PNAME: failed to open $PNAME.$$.log: $!\n" unless (!$opt_l || open(LOG, ">$PNAME.$$.log")); -$ENV{'DTRACE_DEBUG_REGSET'} = 'true'; - if ($opt_g) { $ENV{'UMEM_DEBUG'} = 'default,verbose'; $ENV{'UMEM_LOGGING'} = 'fail,contents'; diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d deleted file mode 100644 index bb3ed4789bf5..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -#pragma D option quiet - -/* - * Make sure the sizes of compatible keys doesn't affect the sort order. - */ - -BEGIN -{ - @[(int)1, 0] = sum(10); - @[(uint64_t)2, 0] = sum(20); - @[(int)3, 0] = sum(30); - @[(uint64_t)4, 0] = sum(40); - printa(@); - - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out deleted file mode 100644 index 83252ade53ae..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out +++ /dev/null @@ -1,6 +0,0 @@ - - 1 0 10 - 2 0 20 - 3 0 30 - 4 0 40 - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out deleted file mode 100644 index d3b6af813101..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out +++ /dev/null @@ -1,8 +0,0 @@ -The value of i is 6 -The value of i is 18 -The value of i is 72 -The value of i is 25920 -The value of i is 935761216 -The value of i is -91738734 -The value of i is -91738729 - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d deleted file mode 100644 index 714fbe373b2c..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d +++ /dev/null @@ -1,50 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * Test compile-time casting between integer types of different size. - */ - -#pragma D option quiet - -int64_t x; - -BEGIN -{ - x = (int32_t)(int16_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - x = (int32_t)(uint16_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - x = (uint32_t)(int16_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - x = (uint32_t)(uint16_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - printf("\n"); - - x = (int16_t)(int32_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - x = (int16_t)(uint32_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - x = (uint16_t)(int32_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - x = (uint16_t)(uint32_t)0xfff0; - printf("%16x %20d %20u\n", x, x, x); - - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out deleted file mode 100644 index d43df27d5d5c..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out +++ /dev/null @@ -1,10 +0,0 @@ -fffffffffffffff0 -16 18446744073709551600 - fff0 65520 65520 - fffffff0 4294967280 4294967280 - fff0 65520 65520 - -fffffffffffffff0 -16 18446744073709551600 -fffffffffffffff0 -16 18446744073709551600 - fff0 65520 65520 - fff0 65520 65520 - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d new file mode 100644 index 000000000000..2db1b6350b94 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d @@ -0,0 +1,57 @@ +/* + * 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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Complex expressions. + * Call complex expressions and make sure test succeeds. + * Match expected output in tst.complex.d.out + * + * SECTION: Types, Operators, and Expressions/Arithmetic Operators + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; + i = i++ + ++i; + printf("The value of i is %d\n", i); + i = i-- - --i; + printf("The value of i is %d\n", i); + i = i-- + ++i; + printf("The value of i is %d\n", i); + i += i++ + -- i + ++i - ++i * i ; + printf("The value of i is %d\n", i); + i -= i++ * 3; + printf("The value of i is %d\n", i); + i = i++/i--+i++-++i-++i; + printf("The value of i is %d\n", i); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d deleted file mode 100644 index 0589b721b421..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d +++ /dev/null @@ -1,36 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * Test narrowing at assignment. - */ - -#pragma D option quiet - -uint16_t x; -uint32_t y; - -BEGIN -{ - x = 0xbeefcafe; - y = x; - printf("%x", y); /* where's the beef? */ - - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out deleted file mode 100644 index ea17b160d298..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out +++ /dev/null @@ -1 +0,0 @@ -cafe diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d deleted file mode 100644 index a7017bfee5e7..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d +++ /dev/null @@ -1,52 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * Test execution-time casting between integer types of different size. - */ - -#pragma D option quiet - -int64_t x; - -BEGIN -{ - z = 0xfff0; - - x = (int32_t)(int16_t)z; - printf("%16x %20d %20u\n", x, x, x); - x = (int32_t)(uint16_t)z; - printf("%16x %20d %20u\n", x, x, x); - x = (uint32_t)(int16_t)z; - printf("%16x %20d %20u\n", x, x, x); - x = (uint32_t)(uint16_t)z; - printf("%16x %20d %20u\n", x, x, x); - printf("\n"); - - x = (int16_t)(int32_t)z; - printf("%16x %20d %20u\n", x, x, x); - x = (int16_t)(uint32_t)z; - printf("%16x %20d %20u\n", x, x, x); - x = (uint16_t)(int32_t)z; - printf("%16x %20d %20u\n", x, x, x); - x = (uint16_t)(uint32_t)z; - printf("%16x %20d %20u\n", x, x, x); - - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out deleted file mode 100644 index d43df27d5d5c..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out +++ /dev/null @@ -1,10 +0,0 @@ -fffffffffffffff0 -16 18446744073709551600 - fff0 65520 65520 - fffffff0 4294967280 4294967280 - fff0 65520 65520 - -fffffffffffffff0 -16 18446744073709551600 -fffffffffffffff0 -16 18446744073709551600 - fff0 65520 65520 - fff0 65520 65520 - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d index fffc7e3d550c..143ed641f9e7 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.fill1.d @@ -23,29 +23,26 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ + +#pragma ident "%Z%%M% %I% %E% SMI" /* * ASSERTION: * Positive test for fill buffer policy. * * SECTION: Buffers and Buffering/fill Policy; - * Buffers and Buffering/Buffer Sizes; + * Buffers and Buffering/Buffer Sizes; * Options and Tunables/bufsize; * Options and Tunables/bufpolicy; * Options and Tunables/statusrate */ /* - * This is a brute-force way of testing fill buffers. We assume that - * each printf() stores 16 bytes (4x 32-bit words for EPID, timestamp - * lo, timestamp hi, and the variable i). Because each fill buffer is - * per-CPU, we must fill up our buffer in one series of enablings on a - * single CPU. + * This is a brute-force way of testing fill buffers. We assume that each + * printf() stores 8 bytes. Because each fill buffer is per-CPU, we must + * fill up our buffer in one series of enablings on a single CPU. */ #pragma D option bufpolicy=fill -#pragma D option bufsize=128 +#pragma D option bufsize=64 #pragma D option statusrate=10ms #pragma D option quiet diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d index ea746948e5ef..68e35889eca0 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/buffering/tst.ring3.d @@ -23,9 +23,8 @@ * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ + +#pragma ident "%Z%%M% %I% %E% SMI" /* * ASSERTION: @@ -38,20 +37,19 @@ */ /* - * We make some regrettable assumptions about the implementation in this - * test. First, we assume that each entry for the printf() of an int - * takes _exactly_ 16 bytes (4 bytes for the EPID, 8 bytes for the - * timestamp, 4 bytes for the payload). Second, we assume that by - * allocating storage for n + 1 records, we will get exactly n. Here is - * why: the final predicate that evaluates to false will reserve space - * that it won't use. This act of reservation will advance the wrapped - * offset. That record won't be subsequently used, but the wrapped - * offset has advanced. (And in this case, that old record is clobbered - * by the exit() anyway.) Thirdly: we rely on t_cpu/cpu_id. Finally: - * we rely on being able to run on the CPU that we first ran on. + * We make some regrettable assumptions about the implementation in this test. + * First, we assume that each entry for the printf() of an int takes _exactly_ + * eight bytes (four bytes for the EPID, four bytes for the payload). Second, + * we assume that by allocating storage for n + 1 records, we will get exactly + * n. Here is why: the final predicate that evaluates to false will reserve + * space that it won't use. This act of reservation will advance the wrapped + * offset. That record won't be subsequently used, but the wrapped offset has + * advanced. (And in this case, that old record is clobbered by the exit() + * anyway.) Thirdly: we rely on t_cpu/cpu_id. Finally: we rely on being + * able to run on the CPU that we first ran on. */ #pragma D option bufpolicy=ring -#pragma D option bufsize=80 +#pragma D option bufsize=40 #pragma D option quiet int n; diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/err.D_NOREG.noreg.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/err.D_NOREG.noreg.d deleted file mode 100644 index 636e5686433d..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/err.D_NOREG.noreg.d +++ /dev/null @@ -1,41 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * Compile some code that requires exactly 9 registers. This should run out - * of registers. - * - * Changes to the code generator might cause this test to succeeed in which - * case the code should be changed to another sequence that exhausts the - * available internal registers. - * - * Note that this and err.baddif.d should be kept in sync. - */ - -BEGIN -{ - a = 4; - trace((a + a) * ((a + a) * ((a + a) * ((a + a) * ((a + a) * - ((a + a) * (a + a))))))); -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/err.baddif.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/err.baddif.d deleted file mode 100644 index d84934823354..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/cg/err.baddif.d +++ /dev/null @@ -1,44 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * Compile some code that requires exactly 9 registers. This should generate - * invalid DIF because the kernel will flag the fact that we're using more - * registers than are available internally. - * - * Changes to the code generator might cause this test to succeeed in which - * case the code should be changed to another sequence that exhausts the - * available internal registers. - * - * Note that this and err.D_NOREG.noreg.d should be kept in sync. - */ - -#pragma D option iregs=9 - -BEGIN -{ - a = 4; - trace((a + a) * ((a + a) * ((a + a) * ((a + a) * ((a + a) * - ((a + a) * (a + a))))))); -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh index 25ae061ec074..35f0391ba87d 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.newprobes.ksh @@ -24,9 +24,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # - -# -# Copyright (c) 2012 by Delphix. All rights reserved. +# ident "%Z%%M% %I% %E% SMI" # if [ $# != 1 ]; then @@ -51,13 +49,13 @@ tick-1s tick-1s /(i % 2) == 0/ { - system("dtrace -c date -n 'pid\$target::main:entry' >/dev/null"); + system("dtrace -c date -ln 'pid\$target::main:entry' >/dev/null"); } tick-1s /(i % 2) == 1/ { - system("dtrace -c date -n 'pid\$target::main:return' >/dev/null"); + system("dtrace -c date -ln 'pid\$target::main:return' >/dev/null"); } EOF diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d deleted file mode 100644 index 0567123f3a8b..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast1.d +++ /dev/null @@ -1,28 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -BEGIN -{ - *((int *)alloca(4)) = 1; -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d deleted file mode 100644 index 6282e7ae15a3..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/tst.assigncast2.d +++ /dev/null @@ -1,29 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -BEGIN -{ - this->a = alloca(4); - *((int *)this->a) = 1; -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh deleted file mode 100644 index 9a0aed0678cf..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal.ksh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/ksh -p -# -# CDDL HEADER START -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# -# CDDL HEADER END -# - -# -# Copyright (c) 2012 by Delphix. All rights reserved. -# - -############################################################################ -# ASSERTION: -# temporal option causes output to be sorted -# -# SECTION: Pragma -# -# NOTES: The temporal option has no effect on a single-CPU system, so -# this needs to be run on a multi-CPU system to effectively test the -# temporal option. -# -############################################################################ - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 -file=/tmp/out.$$ - -rm -f $file - -$dtrace -o $file -c 'sleep 3' -s /dev/stdin <<EOF - #pragma D option quiet - #pragma D option temporal - - BEGIN - { - @lines = count(); - printf("0 begin\n"); - } - - END - { - /* Bump @lines every time we print a line. */ - @lines = count(); - printf("%u end\n", timestamp); - @lines = count(); - printa("99999999999999999 lines %@u\n", @lines); - } - - profile-97hz - { - @lines = count(); - printf("%u\n", timestamp); - } -EOF - -status=$? -if [ "$status" -ne 0 ]; then - echo $tst: dtrace failed - exit $status -fi - -# dtrace outputs a blank line at the end, which will sort to the beginning, -# so use head to remove the blank line. -head -n -1 $file > $file.2 - -sort -n $file.2 | diff $file.2 - -status=$? -if [ "$status" -ne 0 ]; then - echo $tst: output is not sorted - exit $status -fi - -head -n 1 $file.2 | grep begin >/dev/null -status=$? -if [ "$status" -ne 0 ]; then - echo $tst: begin probe did not fire - exit $status -fi - -tail -n 2 $file.2 | grep end >/dev/null -status=$? -if [ "$status" -ne 0 ]; then - echo $tst: end probe did not fire - exit $status -fi - -if [ $(tail -n 1 $file.2 | cut -f3 -d ' ') -ne \ - $(wc -l $file.2) ]; then - echo $tst: incorrect number of lines output - exit 1 -fi - -exit $status diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh deleted file mode 100644 index 4e8d592d81d6..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal2.ksh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/ksh -p -# -# CDDL HEADER START -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# -# CDDL HEADER END -# - -# -# Copyright (c) 2012 by Delphix. All rights reserved. -# - -############################################################################ -# ASSERTION: -# temporal option causes output to be sorted, even when some -# buffers are empty -# -# SECTION: Pragma -# -# NOTES: The temporal option has no effect on a single-CPU system, so -# this needs to be run on a multi-CPU system to effectively test the -# temporal option. -# -############################################################################ - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 -file=/tmp/out.$$ - -rm -f $file - -$dtrace -o $file -s /dev/stdin <<EOF - #pragma D option quiet - #pragma D option destructive - #pragma D option temporal - #pragma D option switchrate=1000hz - - /* - * Use two enablings of the same probe, so that cpu 0 will always - * record its data just a little bit before the other cpus. - * We don't want to use the chill() action in the same enabling - * that we record the timestamp, because chill() causes the - * timestamp to be re-read, and thus not match the timestamp - * which libdtrace uses to sort the records. - */ - - profile-401 - /cpu == 0/ - { - printf("%d\n", timestamp); - } - - profile-401 - /cpu != 0/ - { - chill(1000); /* one microsecond */ - } - - profile-401 - /cpu != 0/ - { - printf("%d\n", timestamp); - } - - tick-1s - /k++ == 10/ - { - printf("%d\n", timestamp); - exit(0); - } -EOF - -status=$? -if [ "$status" -ne 0 ]; then - echo $tst: dtrace failed - exit $status -fi - -# dtrace outputs a blank line at the end, which will sort to the beginning, -# so use grep to remove the blank line. -head -n -1 $file > $file.2 - -sort -n $file.2 | diff $file.2 - -status=$? -if [ "$status" -ne 0 ]; then - echo $tst: output is not sorted - exit $status -fi - -exit $status diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d deleted file mode 100644 index b4c0e557bea1..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pragma/tst.temporal3.d +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * This test excercises the "remnant" handling of the temporal option. - * At the end of one pass of retrieving and printing data from all CPUs, - * some unprocessed data will remain, because its timestamp is after the - * time covered by all CPUs' buffers. This unprocessed data is - * rearranged in a more space-efficient manner. If this is done - * incorrectly, an alignment error may occur. To test this, we use a - * high-frequency probe so that data will be recorded in subsequent - * CPU's buffers after the first CPU's buffer is obtained. The - * combination of data traced here (a 8-byte value and a 4-byte value) - * is effective to cause alignment problems with an incorrect - * implementation. - * - * This test needs to be run on a multi-CPU system to be effective. - */ - -#pragma D option quiet -#pragma D option temporal - -profile-4997 -{ - printf("%u %u", 1ULL, 2); -} - -tick-1 -/i++ == 10/ -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/predicates/tst.predcache.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/predicates/tst.predcache.ksh new file mode 100644 index 000000000000..f06edcb5a4ec --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/predicates/tst.predcache.ksh @@ -0,0 +1,197 @@ +# +# 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 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# +# ident "%Z%%M% %I% %E% SMI" + +unload() +{ + # + # Get the list of services whose processes have USDT probes. Ideally + # it would be possible to unload the fasttrap provider while USDT + # probes exist -- once that fix is integrated, this hack can go away + # We create two lists -- one of regular SMF services and one of legacy + # services -- since each must be enabled and disabled using a specific + # mechanism. + # + pids=$(dtrace -l | \ + perl -ne 'print "$1\n" if (/^\s*\S+\s+\S*\D(\d+)\s+/);' | \ + sort | uniq | tr '\n' ',') + + ctids=$(ps -p $pids -o ctid | tail +2 | sort | uniq) + svcs= + lrcs= + + for ct in $ctids + do + line=$(svcs -o fmri,ctid | grep " $ct\$") + svc=$(echo $line | cut -d' ' -f1) + + if [[ $(svcs -Ho STA $svc) == "LRC" ]]; then + lrc=$(svcs -Ho SVC $svc | tr _ '?') + lrcs="$lrcs $lrc" + else + svcs="$svcs $svc" + fi + done + + for svc in $svcs + do + svcadm disable -ts $svc + done + + for lrc in $lrcs + do + # + # Does it seem a little paternalistic that lsvcrun requires + # this environment variable to be set? I'd say so... + # + SMF_RESTARTER=svc:/system/svc/restarter:default \ + /lib/svc/bin/lsvcrun $lrc stop + done + + modunload -i 0 + modunload -i 0 + modunload -i 0 + modinfo | grep dtrace + success=$? + + for svc in $svcs + do + svcadm enable -ts $svc + done + + for lrc in $lrcs + do + SMF_RESTARTER=svc:/system/svc/restarter:default \ + /lib/svc/bin/lsvcrun $lrc start + done + + if [ ! $success ]; then + echo $tst: could not unload dtrace + exit 1 + fi +} + +script1() +{ + $dtrace -s /dev/stdin <<EOF + syscall:::entry + /pid != $ppid/ + { + @a[probefunc] = count(); + } + + tick-1sec + /i++ == 5/ + { + exit(0); + } +EOF +} + +script2() +{ + $dtrace -s /dev/stdin <<EOF + + #pragma D option statusrate=1ms + + syscall:::entry + /pid == $ppid/ + { + ttl++; + } + + tick-1sec + /i++ == 5/ + { + exit(2); + } + + END + /ttl/ + { + printf("success; ttl is %d", ttl); + exit(0); + } + + END + /ttl == 0/ + { + printf("error -- total should be non-zero"); + exit(1); + } +EOF +} + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +ppid=$$ +dtrace=$1 + +unload +script1 & +child=$! + +let waited=0 + +while [ "$waited" -lt 5 ]; do + seconds=`date +%S` + + if [ "$seconds" -ne "$last" ]; then + last=$seconds + let waited=waited+1 + fi +done + +wait $child +status=$? + +if [ "$status" -ne 0 ]; then + echo $tst: first dtrace failed + exit $status +fi + +unload +script2 & +child=$! + +let waited=0 + +while [ "$waited" -lt 10 ]; do + seconds=`date +%S` + + if [ "$seconds" -ne "$last" ]; then + last=$seconds + let waited=waited+1 + fi +done + +wait $child +status=$? + +exit $status diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d new file mode 100644 index 000000000000..892b44561376 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d @@ -0,0 +1,29 @@ +/* + * 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 (c) 2011 by Delphix. All rights reserved. + */ + +BEGIN +{ + print(*curpsinfo); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d deleted file mode 100644 index f17551facb4e..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d +++ /dev/null @@ -1,28 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -BEGIN -{ - print(*curpsinfo); -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d deleted file mode 100644 index e8125d4f5cba..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d +++ /dev/null @@ -1,42 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -#pragma D option quiet - -typedef struct pancakes { - int i; - string s; - timespec_t t; -} pancakes_t; - -translator pancakes_t < void *V > { - i = 2 * 10; - s = strjoin("I like ", "pancakes"); - t = *(timespec_t *)`dtrace_zero; -}; - -BEGIN -{ - print(*(xlate < pancakes_t * > ((void *)NULL))); -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out deleted file mode 100644 index 9b01402af34b..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out +++ /dev/null @@ -1,8 +0,0 @@ -pancakes_t { - int i = 0x14 - string s = [ "I like pancakes" ] - timespec_t t = { - time_t tv_sec = 0 - long tv_nsec = 0 - } -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out index bc7eaed0ec9a..4d2bb11207e1 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out @@ -1,6 +1,6 @@ --17 --12817 +239 +52719 -1867788817 1311768467294899695 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d deleted file mode 100644 index 64e565e267b0..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d +++ /dev/null @@ -1,38 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -/* - * Check %d v. %i v. %u. - */ - -#pragma D option quiet - -uint16_t x; -int16_t y; - -BEGIN -{ - x = 0xffffffff; - y = 0xffffffff; - - printf("%d %i %u\n", x, x, x); - printf("%d %i %u\n", y, y, y); - - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out deleted file mode 100644 index 169ac59b9554..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out +++ /dev/null @@ -1,3 +0,0 @@ -65535 -1 65535 --1 -1 65535 - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d index c59ea3bee57d..e97506e1108f 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations1.d @@ -24,10 +24,7 @@ * Use is subject to license terms. */ -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" /* * ASSERTION: @@ -38,10 +35,17 @@ * * NOTES: This test behaves differently depending on the values * assigned to bufsize. + * 1. 0 > bufsize. + * 2. 0 == bufsize. + * 3. 0 < bufsize <= 7 + * 4. 8 <= bufsize <= 31 + * 5. 32 <= bufsize <= 47 + * 6. 48 <= bufsize <= 71 + * 7. 72 <= bufsize */ #pragma D option quiet -#pragma D option bufsize=49 +#pragma D option bufsize=41 BEGIN { diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d index 99539f903eb6..6b91efd9114b 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/tst.SpecSizeVariations3.d @@ -24,10 +24,7 @@ * Use is subject to license terms. */ -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - +#pragma ident "%Z%%M% %I% %E% SMI" /* * ASSERTION: * Verify the behavior of speculations with changes in specsize. @@ -38,7 +35,7 @@ */ #pragma D option quiet -#pragma D option specsize=48 +#pragma D option specsize=40 BEGIN { diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d deleted file mode 100644 index 24ad80fb469c..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d +++ /dev/null @@ -1,28 +0,0 @@ -/* - * CDDL HEADER START - * - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2012 by Delphix. All rights reserved. - */ - -BEGIN -{ - trace(*curpsinfo); -} - -BEGIN -{ - exit(0); -} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d new file mode 100644 index 000000000000..c664188f13a3 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d @@ -0,0 +1,61 @@ +/* + * 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 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * The D inline translation mechanism can be used to facilitate stable + * translations. + * + * SECTION: Translators/ Translator Declarations + * SECTION: Translators/ Translate Operator + * SECTION: Translators/Stable Translations + * + * NOTES: Uncomment the pragma that explicitly resets the attributes of + * myinfo identifier to Stable/Stable/Common from Private/Private/Unknown. + * Run the program with and without the comments as: + * /usr/sbin/dtrace -vs man.TestTransStability.d + */ + +#pragma D option quiet + +inline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread); + +/* +#pragma D attributes Stable/Stable/Common myinfo +*/ + +BEGIN +{ + trace(myinfo->pr_flag); + exit(0); +} + +ERROR +{ + exit(1); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh deleted file mode 100644 index 16eeda32916b..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh +++ /dev/null @@ -1,62 +0,0 @@ -# -# 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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2012 by Delphix. All rights reserved. -# - -# -# Test the output for stable translations. -# - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 - -$dtrace -v -s /dev/stdin <<EOF - -#pragma D option quiet - -inline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread); - -#pragma D attributes Stable/Stable/Common myinfo - -BEGIN -{ - this->a = myinfo->pr_flag; - exit(0); -} - -BEGIN -{ - exit(1); -} -EOF - -exit $? diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out deleted file mode 100644 index 43c1adb1a54f..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out +++ /dev/null @@ -1,14 +0,0 @@ - -Stability attributes for script /dev/stdin: - - Minimum Probe Description Attributes - Identifier Names: Unstable - Data Semantics: Unstable - Dependency Class: Common - - Minimum Statement Attributes - Identifier Names: Stable - Data Semantics: Stable - Dependency Class: Common - - diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh deleted file mode 100644 index 82070cde9237..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh +++ /dev/null @@ -1,60 +0,0 @@ -# -# 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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -# -# Copyright (c) 2012 by Delphix. All rights reserved. -# - -# -# Test the output of unstable translations. -# - -if [ $# != 1 ]; then - echo expected one argument: '<'dtrace-path'>' - exit 2 -fi - -dtrace=$1 - -$dtrace -v -s /dev/stdin <<EOF - -#pragma D option quiet - -inline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread); - -BEGIN -{ - this->a = myinfo->pr_flag; - exit(0); -} - -BEGIN -{ - exit(1); -} -EOF - -exit $? diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out deleted file mode 100644 index f4b70f9573db..000000000000 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out +++ /dev/null @@ -1,14 +0,0 @@ - -Stability attributes for script /dev/stdin: - - Minimum Probe Description Attributes - Identifier Names: Unstable - Data Semantics: Unstable - Dependency Class: Common - - Minimum Statement Attributes - Identifier Names: Private - Data Semantics: Private - Dependency Class: Unknown - - |