summaryrefslogtreecommitdiffstats
path: root/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider')
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup0
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d56
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d49
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d48
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d43
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d50
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d53
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d50
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d52
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d44
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d55
11 files changed, 500 insertions, 0 deletions
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/Makefile.kup
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.d
new file mode 100644
index 00000000..5e3d5fa7
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/err.D_PDESC_ZERO.notreturn.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: Call fbt provider over non existent function and make
+ * sure it results in compilation error.
+ *
+ * SECTION: FBT Provider/Probes
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ self->traceme = 1;
+}
+
+void bar();
+
+fbt::bar:entry
+{
+ printf("Entering the function\n");
+}
+
+fbt::bar:return
+{
+ printf("Returning the function\n");
+ exit(0);
+}
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.d
new file mode 100644
index 00000000..ff6da26f
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.basic.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 fbt arguments test.
+ *
+ * SECTION: FBT Provider/Probes
+ */
+
+#pragma D option quiet
+
+tick-1
+{
+ self->traceme = 1;
+}
+
+fbt:::
+/self->traceme/
+{
+ printf("The arguments are %u %u %u %u %u %u %u %u\n", arg0, arg1,
+ arg3, arg4, arg5, arg6, arg7, arg8);
+ exit (0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d
new file mode 100644
index 00000000..78e107ee
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionentry.d
@@ -0,0 +1,48 @@
+/*
+ * 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: FBT provider function entry and exit test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+fbt::ioctl:entry
+{
+ printf("Entering the ioctl function\n");
+}
+
+fbt::ioctl:return
+{
+ printf("Returning from ioctl function\n");
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.d
new file mode 100644
index 00000000..6d1b8a8f
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.functionreturnvalue.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"
+
+
+/*
+ * ASSERTION: Fbt provider return value verify test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+fbt::ioctl:return
+{
+ printf("The function return value is stored in %u\n", arg1);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.d
new file mode 100644
index 00000000..c2c7bf04
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.ioctlargs.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: FBT provider arguments scan test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+fbt::ioctl:entry
+{
+ printf("Entering the ioctl function\n");
+ printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3);
+}
+
+fbt::ioctl:return
+{
+ printf("Returning from ioctl function\n");
+ printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d
new file mode 100644
index 00000000..be2c0d6a
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offset.d
@@ -0,0 +1,53 @@
+/*
+ * 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: FBT provider return value offset verification test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+BEGIN
+{
+ self->traceme = 1;
+}
+
+fbt::ioctl:entry
+{
+ printf("Entering the function\n");
+}
+
+fbt::ioctl:return
+{
+ printf("The offset = %u\n", arg0);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.d
new file mode 100644
index 00000000..240744bf
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.offsetzero.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: FBT provider argument 0 test
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+fbt::ioctl:entry
+{
+ printf("Entering the ioctl function\n");
+ printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3);
+ exit(0);
+}
+
+fbt::ioctl:return
+{
+ printf("Returning from ioctl function\n");
+ printf("The few arguments are %u %u %u %u\n", arg0, arg1, arg2, arg3);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.d
new file mode 100644
index 00000000..b269710e
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return.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 fbt provider return test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ self->traceme = 1;
+}
+
+fbt:::entry
+{
+ printf("Entering the function\n");
+}
+
+fbt:::return
+{
+ printf("Returning the function\n");
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d
new file mode 100644
index 00000000..cadbaa00
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.return0.d
@@ -0,0 +1,44 @@
+/*
+ * 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 fbt provider arg0 and probfunc print test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+fbt::ioctl:return
+/arg1 == 0/
+{
+ printf("%s %x returned 0", probefunc, arg0);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d
new file mode 100644
index 00000000..67ef106f
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/fbtprovider/tst.tailcall.d
@@ -0,0 +1,55 @@
+/*
+ * 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 fbt provider tailcall test.
+ *
+ * SECTION: FBT Provider/Probe arguments
+ */
+
+#pragma D option quiet
+#pragma D option statusrate=10ms
+
+fbt::ioctl:entry
+{
+ self->traceme = 1;
+}
+
+fbt:::entry
+/self->traceme/
+{
+ printf("called %s\n", probefunc);
+}
+
+fbt::ioctl:return
+/self->traceme/
+{
+ self->traceme = 0;
+ exit (0);
+}