summaryrefslogtreecommitdiffstats
path: root/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa')
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/Makefile.kup0
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badagg.d40
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badfmt.d40
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badval.d41
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_PROTO.bad.d40
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.jstack.d36
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.stack.d36
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.ustack.d36
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d58
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d.out19
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d44
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d.out3
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d43
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d.out5
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d43
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d.out1
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh83
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.many.d76
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d44
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d.out2
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.stack.d40
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d55
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d.out8
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh62
-rw-r--r--src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh.out2
25 files changed, 857 insertions, 0 deletions
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/Makefile.kup b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/Makefile.kup
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badagg.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badagg.d
new file mode 100644
index 00000000..817d9ac0
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badagg.d
@@ -0,0 +1,40 @@
+/*
+ * 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:
+ * Invokes printa() with a bad aggregation argument.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+BEGIN
+{
+ printa("%d", 123);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badfmt.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badfmt.d
new file mode 100644
index 00000000..5a419822
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badfmt.d
@@ -0,0 +1,40 @@
+/*
+ * 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:
+ * Invokes printa() with a bad format string.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+BEGIN
+{
+ printa(123);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badval.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badval.d
new file mode 100644
index 00000000..e8663ab7
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_AGGARG.badval.d
@@ -0,0 +1,41 @@
+/*
+ * 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:
+ * Invokes printa() with an argument that does not match the aggregation
+ * convertion.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+BEGIN
+{
+ printa("%@d\n", 123);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_PROTO.bad.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_PROTO.bad.d
new file mode 100644
index 00000000..8e202f6d
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTA_PROTO.bad.d
@@ -0,0 +1,40 @@
+/*
+ * 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:
+ * Invokes printa() with a bad aggregation argument.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+BEGIN
+{
+ printa("%d");
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.jstack.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.jstack.d
new file mode 100644
index 00000000..09b4b27f
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.jstack.d
@@ -0,0 +1,36 @@
+/*
+ * 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
+{
+ @[jstack()] = count();
+
+ printa("%p\n", @);
+
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.stack.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.stack.d
new file mode 100644
index 00000000..8815ad68
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.stack.d
@@ -0,0 +1,36 @@
+/*
+ * 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
+{
+ @[stack()] = count();
+
+ printa("%p\n", @);
+
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.ustack.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.ustack.d
new file mode 100644
index 00000000..bce1b673
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/err.D_PRINTF_ARG_TYPE.ustack.d
@@ -0,0 +1,36 @@
+/*
+ * 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
+{
+ @[ustack()] = count();
+
+ printa("%p\n", @);
+
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d
new file mode 100644
index 00000000..f5353870
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.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 2009 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * ASSERTION:
+ * Test the basic formatting of all the supported kinds of aggregations.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ @a = avg(1);
+ @b = count();
+ @c = lquantize(1, 1, 10);
+ @d = max(1);
+ @e = min(1);
+ @f = sum(1);
+ @g = quantize(1);
+ @h = stddev(1);
+
+ printa("@a = %@u\n", @a);
+ printa("@b = %@u\n", @b);
+ printa("@c = %@d\n", @c);
+ printa("@d = %@u\n", @d);
+ printa("@e = %@u\n", @e);
+ printa("@f = %@u\n", @f);
+ printa("@g = %@d\n", @g);
+ printa("@h = %@d\n", @h);
+
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d.out
new file mode 100644
index 00000000..ddad2134
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.basics.d.out
@@ -0,0 +1,19 @@
+@a = 1
+@b = 1
+@c =
+ value ------------- Distribution ------------- count
+ < 1 | 0
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 2 | 0
+
+@d = 1
+@e = 1
+@f = 1
+@g =
+ value ------------- Distribution ------------- count
+ 0 | 0
+ 1 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1
+ 2 | 0
+
+@h = 0
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d
new file mode 100644
index 00000000..50011e3f
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.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:
+ * Test the printa() default output format.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ @a = count();
+ printa(@a);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d.out
new file mode 100644
index 00000000..7cf67012
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.def.d.out
@@ -0,0 +1,3 @@
+
+ 1
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d
new file mode 100644
index 00000000..f3379c98
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.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"
+
+#pragma D option quiet
+
+BEGIN
+{
+ /*
+ * Yes, this works. But is it useful? And is it useful to someone
+ * other than jwadams and/or dep?
+ */
+ @[10, 100] = sum(1);
+ @[-10, 200] = sum(2);
+
+ printa("-->%-*d<--\n", @);
+ printa("-->%*d<--\n", @);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d.out
new file mode 100644
index 00000000..f6c53eb9
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.dynwidth.d.out
@@ -0,0 +1,5 @@
+-->100 <--
+-->200 <--
+--> 100<--
+-->200 <--
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d
new file mode 100644
index 00000000..8f8cd41b
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.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:
+ * Test the printa() format string in its simplest form.
+ *
+ * SECTION: Output Formatting/printa()
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ @a = count();
+ printa("%@u", @a);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d.out
new file mode 100644
index 00000000..d00491fd
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.fmt.d.out
@@ -0,0 +1 @@
+1
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
new file mode 100644
index 00000000..ed375fdb
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.largeusersym.ksh
@@ -0,0 +1,83 @@
+#
+# 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 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+
+if [ $# != 1 ]; then
+ echo expected one argument: '<'dtrace-path'>'
+ exit 2
+fi
+
+dtrace=$1
+DIR=/var/tmp/dtest.$$
+
+mkdir $DIR
+cd $DIR
+
+cat > test.c <<EOF
+void
+thequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydog(void)
+{
+ while (1)
+ ;
+}
+
+int
+main(int argc, char *argv[])
+{
+ thequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydogthequickbrownfoxjumpsoverthelazydog();
+}
+EOF
+
+cc -o test test.c
+if [ $? -ne 0 ]; then
+ print -u2 "failed to compile test.c"
+ exit 1
+fi
+
+script()
+{
+ $dtrace -c ./test -qs /dev/stdin <<EOF
+ profile:::profile-1001hz
+ /pid == \$target/
+ {
+ @[arg1] = count();
+ }
+
+ tick-1s
+ /n++ > 10/
+ {
+ printa("%A %@d\n", @);
+ exit(0);
+ }
+EOF
+}
+
+script
+status=$?
+
+cd /
+/usr/bin/rm -rf $DIR
+
+exit $status
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.many.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.many.d
new file mode 100644
index 00000000..5bd3eae7
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.many.d
@@ -0,0 +1,76 @@
+/*
+ * 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"
+
+#pragma D option bufsize=32m
+#pragma D option bufpolicy=fill
+#pragma D option destructive
+#pragma D option quiet
+
+BEGIN
+/0 == 1/
+{
+ @ = count();
+}
+
+BEGIN
+{
+ freopen("/dev/null");
+}
+
+profile-4000hz
+{
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+ printa(@);
+}
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d
new file mode 100644
index 00000000..c9fae843
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.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:
+ * Test the use of many aggregation results in the same format string.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ @a = count();
+ printa("%@u %@u %@u %@u %@u %@u %@u\n", @a);
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d.out
new file mode 100644
index 00000000..f08b797e
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.manyval.d.out
@@ -0,0 +1,2 @@
+1 1 1 1 1 1 1
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.stack.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.stack.d
new file mode 100644
index 00000000..88dbb1a7
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.stack.d
@@ -0,0 +1,40 @@
+/*
+ * 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
+{
+ @[stack()] = count();
+ @[ustack()] = count();
+ @[jstack()] = count();
+
+ printa("%k\n", @);
+ printa("%-20k\n", @);
+ printa("%60k\n", @);
+
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d
new file mode 100644
index 00000000..0eea887b
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.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:
+ * Test the use of tuple arguments in the printa() format.
+ *
+ * SECTION: Output Formatting/printa()
+ *
+ * NOTES:
+ * We confirm that we can consume fewer arguments than in the tuple, all
+ * the way up to the exact number.
+ */
+
+#pragma D option quiet
+
+BEGIN
+{
+ @a[1, 2, 3, 4, 5] = count();
+ printf("\n");
+
+ printa("%@u: -\n", @a);
+ printa("%@u: %d\n", @a);
+ printa("%@u: %d %d\n", @a);
+ printa("%@u: %d %d %d\n", @a);
+ printa("%@u: %d %d %d %d\n", @a);
+ printa("%@u: %d %d %d %d %d\n", @a);
+
+ exit(0);
+}
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d.out
new file mode 100644
index 00000000..928119c9
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.tuple.d.out
@@ -0,0 +1,8 @@
+
+1: -
+1: 1
+1: 1 2
+1: 1 2 3
+1: 1 2 3 4
+1: 1 2 3 4 5
+
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh
new file mode 100644
index 00000000..bb0d5a0f
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh
@@ -0,0 +1,62 @@
+#
+# 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"
+
+if [ $# != 1 ]; then
+ echo expected one argument: '<'dtrace-path'>'
+ exit 2
+fi
+
+dtrace=$1
+
+# The output files assumes the timezone is US/Pacific
+TZ=US/Pacific
+
+$dtrace -s /dev/stdin <<EOF
+#pragma D option quiet
+#pragma D option destructive
+
+BEGIN
+{
+ @foo = min(1075064400 * (hrtime_t)1000000000);
+ @bar = max(walltimestamp);
+ printa("%@T\n", @foo);
+ printa("%@Y\n", @foo);
+
+ freopen("/dev/null");
+ printa("%@T\n", @bar);
+ printa("%@Y\n", @bar);
+
+ exit(0);
+}
+EOF
+
+if [ $? -ne 0 ]; then
+ print -u2 "dtrace failed"
+ exit 1
+fi
+
+exit 0
diff --git a/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh.out b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh.out
new file mode 100644
index 00000000..7462cf8e
--- /dev/null
+++ b/src/VBox/ExtPacks/VBoxDTrace/onnv/cmd/dtrace/test/tst/common/printa/tst.walltimestamp.ksh.out
@@ -0,0 +1,2 @@
+Sun, 25 Jan 2004 13:00:00 PST
+2004 Jan 25 13:00:00