summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2014-07-12 22:56:41 +0000
committerrpaulo <rpaulo@FreeBSD.org>2014-07-12 22:56:41 +0000
commit0cff4b03ddab4866935fdab21800c42ee8c1c6b2 (patch)
tree2f675ec37e93f585d83885a3063b6f30cdb74531 /cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
parent196ba30fc44615a6eee4374b37450a4841abe010 (diff)
downloadFreeBSD-src-0cff4b03ddab4866935fdab21800c42ee8c1c6b2.zip
FreeBSD-src-0cff4b03ddab4866935fdab21800c42ee8c1c6b2.tar.gz
MFC 267929, 267937, 267939, 267940, 267941, 267942, 267987, 268006:
2915 DTrace in a zone should see "cpu", "curpsinfo", et al 2916 DTrace in a zone should be able to access fds[] 2917 DTrace in a zone should have limited provider access 4477 DTrace should speak JSON Add stubs for CTF functions which are not yet implemented. 4474 DTrace Userland CTF Support 4475 DTrace userland Keyword 4476 DTrace tests should be better citizens 4479 pid provider types 4480 dof emulation is missing checks 4471 DTrace count() with histogram 4472 DTrace full width distribution histograms 4473 DTrace frequency trails
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c')
-rw-r--r--cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
new file mode 100644
index 0000000..a4d25f8
--- /dev/null
+++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/uctf/tst.aouttype.c
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ */
+
+/*
+ * Copyright 2013 (c) Joyent, Inc. All rights reserved.
+ */
+
+/*
+ * This test tries to make sure that we have CTF data for a type that only this
+ * binary would reasonably have. In this case, the
+ * season_7_lisa_the_vegetarian_t.
+ */
+#include <unistd.h>
+
+typedef struct season_7_lisa_the_vegetarian {
+ int fr_salad;
+} season_7_lisa_the_vegetarian_t;
+
+int
+sleeper(season_7_lisa_the_vegetarian_t *lp)
+{
+ for (;;) {
+ sleep(lp->fr_salad);
+ }
+ /*NOTREACHED*/
+ return (0);
+}
+
+int
+main(void)
+{
+ season_7_lisa_the_vegetarian_t l;
+ l.fr_salad = 100;
+
+ sleeper(&l);
+
+ return (0);
+}
OpenPOWER on IntegriCloud