diff options
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers')
28 files changed, 889 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_INVAL.wrongdec4.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_INVAL.wrongdec4.d new file mode 100644 index 000000000000..0a7aa14a8e2a --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_INVAL.wrongdec4.d @@ -0,0 +1,50 @@ +/* + * 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: + * Simple profile provider test. + * call profile<provider name>; called with no "::::". + * should fail with compilation error. + * + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile::::tick-1sec +{ + trace(i); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.nonprofile.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.nonprofile.d new file mode 100644 index 000000000000..1356a8960e77 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.nonprofile.d @@ -0,0 +1,50 @@ +/* + * 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: + * Simple profile provider test; + * Call user created provider. Make sure it gives compilation error. + * + * SECTION: profile Provider/profile-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::test +/i < 3/ +{ + i++; + trace(i); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec1.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec1.d new file mode 100644 index 000000000000..e06edee58b28 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec1.d @@ -0,0 +1,49 @@ +/* + * 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: + * Simple profile provider test. + * call profile::<provider name>; called with two "::". + * should fail with compilation error. + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile::tick-1sec +{ + trace(i); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec2.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec2.d new file mode 100644 index 000000000000..ea8909caa24a --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec2.d @@ -0,0 +1,49 @@ +/* + * 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: + * Simple profile provider test. + * call profile:<provider name>; called with one ":". + * should fail with compilation error. + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:tick-1sec +{ + trace(i); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec3.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec3.d new file mode 100644 index 000000000000..edea0b92987a --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/err.D_PDESC_ZERO.wrongdec3.d @@ -0,0 +1,49 @@ +/* + * 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: + * Simple profile provider test. + * call profile<provider name>; called with no ":". + * should fail with compilation error. + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profiletick-1sec +{ + trace(i); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.basics.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.basics.d new file mode 100644 index 000000000000..6b6e5269b457 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.basics.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: + * Simple profile provider test; + * Call same profile provider two times + * Match expected output in tst.basics.d.out + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +/i < 3/ +{ + i++; + trace(i); +} + +profile:::tick-1sec +/i == 3/ +{ + exit(0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.basics.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.basics.d.out new file mode 100644 index 000000000000..190a18037c64 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.basics.d.out @@ -0,0 +1 @@ +123 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginexit.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginexit.d new file mode 100644 index 000000000000..202abe67010e --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginexit.d @@ -0,0 +1,43 @@ +/* + * 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" + +BEGIN +{ + exit(0); +} + +BEGIN +{ + printf("shouldn't be here..."); + here++; +} + +END +{ + exit(here); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginprof.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginprof.d new file mode 100644 index 000000000000..99989d949ab7 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginprof.d @@ -0,0 +1,47 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * Simple profile provider test. + * print the 'probeprov, probemod, probefunc, probename' from + * BEGIN + * Match the output from tst.beginprof.d.out + * + * SECTION: profile Provider/profile-n probes; + * Variables/Built-in Variables + * + */ + +#pragma D option quiet + +BEGIN +{ + printf("%s %s %s %s", probeprov, probemod, probefunc, probename); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginprof.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginprof.d.out new file mode 100644 index 000000000000..d28a05725eb8 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.beginprof.d.out @@ -0,0 +1 @@ +dtrace BEGIN diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probattrs.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probattrs.d new file mode 100644 index 000000000000..bd24ca01b36e --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probattrs.d @@ -0,0 +1,52 @@ +/* + * 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: + * Simple profile provider test. + * print the 'probeprov, probemod, probefunc, probename' at once. + * Match expected output in tst.probattrs.d.out + * + * + * SECTION: profile Provider/tick-n probes; + * Variables/Built-in Variables + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + printf("%s %s %s %s", probeprov, probemod, probefunc, probename); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probattrs.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probattrs.d.out new file mode 100644 index 000000000000..2a13979cf662 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probattrs.d.out @@ -0,0 +1 @@ +profile tick-1sec diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probefunc.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probefunc.d new file mode 100644 index 000000000000..fa7c47c5a2fe --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probefunc.d @@ -0,0 +1,52 @@ +/* + * 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: + * Simple profile provider test. + * print the 'probefunc' field i.e. Current probe description's function + * field. + * Match expected output in tst.probefunc.d.out + * + * SECTION: profile Provider/tick-n probes; + * Variables/Built-in Variables + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + printf("probe funct = %s", probefunc); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probefunc.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probefunc.d.out new file mode 100644 index 000000000000..de191dd60d8d --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probefunc.d.out @@ -0,0 +1 @@ +probe funct = diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probemod.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probemod.d new file mode 100644 index 000000000000..89fd8b2a25b2 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probemod.d @@ -0,0 +1,52 @@ +/* + * 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: + * Simple profile provider test. + * print the 'probemod' field i.e. Current probe description's module + * field. + * Match expected output in tst.probemod.d.out + * + * SECTION: profile Provider/tick-n probes; + * Variables/Built-in Variables + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + printf("probe description module field = %s", probemod); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probemod.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probemod.d.out new file mode 100644 index 000000000000..1c95a770f2aa --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probemod.d.out @@ -0,0 +1 @@ +probe description module field = diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probename.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probename.d new file mode 100644 index 000000000000..c58097f9f59b --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probename.d @@ -0,0 +1,52 @@ +/* + * 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: + * Simple profile provider test. + * print the 'probename' field i.e. Current probe description's name + * field. + * Match expected output in tst.probename.d.out + * + * SECTION: profile Provider/tick-n probes; + * Variables/Built-in Variables + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + printf("probe name = %s", probename); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probename.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probename.d.out new file mode 100644 index 000000000000..e5ff3e040aa3 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probename.d.out @@ -0,0 +1 @@ +probe name = tick-1sec diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probprov.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probprov.d new file mode 100644 index 000000000000..3c3ccef833a1 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probprov.d @@ -0,0 +1,52 @@ +/* + * 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: + * Simple profile provider test. + * print the 'probeprov' field i.e. Current probe description's provider + * field. + * Match expected output in tst.probeprov.d.out + * + * SECTION: profile Provider/tick-n probes; + * Variables/Built-in Variables + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + printf("probe description provider = %s", probeprov); + exit (0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probprov.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probprov.d.out new file mode 100644 index 000000000000..d8ca594f6acc --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.probprov.d.out @@ -0,0 +1 @@ +probe description provider = profile diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profend.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profend.d new file mode 100644 index 000000000000..9ab438a4a6f8 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profend.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: + * Simple profile provider test. + * Call simple profile with END profile. + * Match expected output in tst.profend.d.out + * + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + i++; + trace(i); + exit(0); +} + +dtrace:::END +{ + printf("\nI'm at END"); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profend.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profend.d.out new file mode 100644 index 000000000000..42e30052f5d3 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profend.d.out @@ -0,0 +1,2 @@ +1 +I'm at END diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profexit.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profexit.d new file mode 100644 index 000000000000..884053f1bd5f --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profexit.d @@ -0,0 +1,52 @@ +/* + * 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: + * Simple profile provider test; + * Call simple profile + * Match expected output in tst.profexit.d.out + * + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + i++; + trace(i); + exit(0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profexit.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profexit.d.out new file mode 100644 index 000000000000..d00491fd7e5b --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.profexit.d.out @@ -0,0 +1 @@ +1 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.trace.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.trace.d new file mode 100644 index 000000000000..ec7053d3ec4f --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.trace.d @@ -0,0 +1,56 @@ +/* + * 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: + * Simple profile provider test. + * Call simple profile with trace() in END profile + * Match expected output in tst.trace.d.out + * + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +{ + i++; + exit(0); +} + +dtrace:::END +{ + trace(i); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.trace.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.trace.d.out new file mode 100644 index 000000000000..d00491fd7e5b --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.trace.d.out @@ -0,0 +1 @@ +1 diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.twoprof.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.twoprof.d new file mode 100644 index 000000000000..352ed0b8cbaf --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.twoprof.d @@ -0,0 +1,58 @@ +/* + * 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: + * Simple profile provider test. + * Call two different profile provider + * Match expected output in tst.twoprof.d.out + * + * + * SECTION: profile Provider/tick-n probes + * + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +profile:::tick-1sec +/i < 3/ +{ + i++; + trace(i); +} + +profile:::tick-100msec +/i == 3/ +{ + exit(0); +} diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.twoprof.d.out b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.twoprof.d.out new file mode 100644 index 000000000000..190a18037c64 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/providers/tst.twoprof.d.out @@ -0,0 +1 @@ +123 |