154359Sroberto/*
254359Sroberto * CDDL HEADER START
354359Sroberto *
454359Sroberto * The contents of this file are subject to the terms of the
554359Sroberto * Common Development and Distribution License (the "License").
654359Sroberto * You may not use this file except in compliance with the License.
7290001Sglebius *
8290001Sglebius * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
954359Sroberto * or http://www.opensolaris.org/os/licensing.
1054359Sroberto * See the License for the specific language governing permissions
11290001Sglebius * and limitations under the License.
1254359Sroberto *
13290001Sglebius * When distributing Covered Code, include this CDDL HEADER in each
14290001Sglebius * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15290001Sglebius * If applicable, add the following below this CDDL HEADER, with the
16290001Sglebius * fields enclosed by brackets "[]" replaced with your own identifying
17290001Sglebius * information: Portions Copyright [yyyy] [name of copyright owner]
18290001Sglebius *
19290001Sglebius * CDDL HEADER END
20290001Sglebius */
2154359Sroberto
2254359Sroberto/*
23290001Sglebius * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24290001Sglebius * Use is subject to license terms.
25290001Sglebius */
26290001Sglebius
27290001Sglebius#pragma ident	"%Z%%M%	%I%	%E% SMI"
28290001Sglebius
29290001Sglebius/*
30290001Sglebius * ASSERTION:
31290001Sglebius *  Test a variety of trace() action invocations.
32290001Sglebius *
33290001Sglebius * SECTION: Actions and Subroutines/trace();
34290001Sglebius *	Output Formatting/trace()
35290001Sglebius *
36290001Sglebius * NOTES:
37290001Sglebius *   We test things that exercise different kinds of DIFO return types
38290001Sglebius *   to ensure each one can be traced.
39290001Sglebius */
40290001Sglebius
4154359SrobertoBEGIN
42290001Sglebius{
43290001Sglebius	i = 1;
44290001Sglebius}
45290001Sglebius
4654359Sroberto
47290001Sglebiustick-1
48290001Sglebius/i != 5/
49290001Sglebius{
50290001Sglebius	trace("test trace");	/* DT_TYPE_STRING */
51290001Sglebius	trace(12345);		/* DT_TYPE_INT (constant) */
52290001Sglebius	trace(x++);		/* DT_TYPE_INT (derived) */
53290001Sglebius	trace(timestamp);	/* DT_TYPE_INT (variable) */
54290001Sglebius	trace(`kmem_flags);	/* CTF type (by value) */
55290001Sglebius	trace(*`rootvp);	/* CTF type (by ref) */
56290001Sglebius	i++;
57290001Sglebius}
58290001Sglebius
59290001Sglebiustick-1
60290001Sglebius/i == 5/
61290001Sglebius{
62290001Sglebius	exit(0);
63290001Sglebius}
6454359Sroberto
6554359SrobertoERROR
6654359Sroberto{
6754359Sroberto	exit(1);
6854359Sroberto}
6954359Sroberto