tst.misc.d revision 178529
1218799Snwhitehorn/* 2218799Snwhitehorn * CDDL HEADER START 3218799Snwhitehorn * 4218799Snwhitehorn * The contents of this file are subject to the terms of the 5218799Snwhitehorn * Common Development and Distribution License (the "License"). 6218799Snwhitehorn * You may not use this file except in compliance with the License. 7218799Snwhitehorn * 8218799Snwhitehorn * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9218799Snwhitehorn * or http://www.opensolaris.org/os/licensing. 10218799Snwhitehorn * See the License for the specific language governing permissions 11218799Snwhitehorn * and limitations under the License. 12218799Snwhitehorn * 13218799Snwhitehorn * When distributing Covered Code, include this CDDL HEADER in each 14218799Snwhitehorn * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15218799Snwhitehorn * If applicable, add the following below this CDDL HEADER, with the 16218799Snwhitehorn * fields enclosed by brackets "[]" replaced with your own identifying 17218799Snwhitehorn * information: Portions Copyright [yyyy] [name of copyright owner] 18218799Snwhitehorn * 19218799Snwhitehorn * CDDL HEADER END 20218799Snwhitehorn */ 21218799Snwhitehorn 22218799Snwhitehorn/* 23218799Snwhitehorn * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24218799Snwhitehorn * Use is subject to license terms. 25218799Snwhitehorn */ 26218799Snwhitehorn 27218799Snwhitehorn#pragma ident "%Z%%M% %I% %E% SMI" 28218799Snwhitehorn 29218799Snwhitehorn/* 30218799Snwhitehorn * ASSERTION: 31218799Snwhitehorn * Test a variety of trace() action invocations. 32218799Snwhitehorn * 33218799Snwhitehorn * SECTION: Actions and Subroutines/trace(); 34218799Snwhitehorn * Output Formatting/trace() 35220753Snwhitehorn * 36218799Snwhitehorn * NOTES: 37218799Snwhitehorn * We test things that exercise different kinds of DIFO return types 38218799Snwhitehorn * to ensure each one can be traced. 39220753Snwhitehorn */ 40218799Snwhitehorn 41218799SnwhitehornBEGIN 42218799Snwhitehorn{ 43218799Snwhitehorn i = 1; 44218799Snwhitehorn} 45218799Snwhitehorn 46220753Snwhitehorn 47218799Snwhitehorntick-1 48220753Snwhitehorn/i != 5/ 49218799Snwhitehorn{ 50220753Snwhitehorn trace("test trace"); /* DT_TYPE_STRING */ 51220753Snwhitehorn trace(12345); /* DT_TYPE_INT (constant) */ 52220834Snwhitehorn trace(x++); /* DT_TYPE_INT (derived) */ 53220753Snwhitehorn trace(timestamp); /* DT_TYPE_INT (variable) */ 54220753Snwhitehorn trace(`kmem_flags); /* CTF type (by value) */ 55220753Snwhitehorn trace(*`rootvp); /* CTF type (by ref) */ 56220753Snwhitehorn i++; 57220753Snwhitehorn} 58220753Snwhitehorn 59220753Snwhitehorntick-1 60220753Snwhitehorn/i == 5/ 61220753Snwhitehorn{ 62220753Snwhitehorn exit(0); 63220753Snwhitehorn} 64220753Snwhitehorn