xref: /onnv-gate/usr/src/cmd/dtrace/test/tst/common/sdt/tst.sdtargs.d (revision 6998:58787ea78303)
16878Sbrendan /*
26878Sbrendan  * CDDL HEADER START
36878Sbrendan  *
46878Sbrendan  * The contents of this file are subject to the terms of the
56878Sbrendan  * Common Development and Distribution License (the "License").
66878Sbrendan  * You may not use this file except in compliance with the License.
76878Sbrendan  *
86878Sbrendan  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96878Sbrendan  * or http://www.opensolaris.org/os/licensing.
106878Sbrendan  * See the License for the specific language governing permissions
116878Sbrendan  * and limitations under the License.
126878Sbrendan  *
136878Sbrendan  * When distributing Covered Code, include this CDDL HEADER in each
146878Sbrendan  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156878Sbrendan  * If applicable, add the following below this CDDL HEADER, with the
166878Sbrendan  * fields enclosed by brackets "[]" replaced with your own identifying
176878Sbrendan  * information: Portions Copyright [yyyy] [name of copyright owner]
186878Sbrendan  *
196878Sbrendan  * CDDL HEADER END
206878Sbrendan  */
216878Sbrendan 
226878Sbrendan /*
236878Sbrendan  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
246878Sbrendan  * Use is subject to license terms.
256878Sbrendan  */
266878Sbrendan 
276878Sbrendan #pragma ident	"%Z%%M%	%I%	%E% SMI"
286878Sbrendan 
296878Sbrendan /*
306878Sbrendan  * ASSERTION: Verify that argN (1..7) variables are properly remapped.
316878Sbrendan  */
326878Sbrendan 
336878Sbrendan BEGIN
346878Sbrendan {
356878Sbrendan 	/* Timeout after 5 seconds */
366878Sbrendan 	timeout = timestamp + 5000000000;
376878Sbrendan 	ignore = $1;
386878Sbrendan }
396878Sbrendan 
40*6998Sbrendan ERROR
41*6998Sbrendan {
42*6998Sbrendan 	printf("sdt:::test failed.\n");
43*6998Sbrendan 	exit(1);
44*6998Sbrendan }
45*6998Sbrendan 
466878Sbrendan sdt:::test
476878Sbrendan /arg0 != 1 || arg1 != 2 || arg2 != 3 || arg3 != 4 || arg4 != 5 || arg5 != 6 ||
486878Sbrendan     arg6 != 7/
496878Sbrendan {
506878Sbrendan 	printf("sdt arg mismatch\n\n");
516878Sbrendan 	printf("args are  : %d, %d, %d, %d, %d, %d, %d\n", arg0, arg1, arg2,
526878Sbrendan 	    arg3, arg4, arg5, arg6);
536878Sbrendan 	printf("should be : 1, 2, 3, 4, 5, 6, 7\n");
546878Sbrendan 	exit(1);
556878Sbrendan }
566878Sbrendan 
576878Sbrendan sdt:::test
586878Sbrendan {
596878Sbrendan 	exit(0);
606878Sbrendan }
616878Sbrendan 
626878Sbrendan profile:::tick-1
636878Sbrendan /timestamp > timeout/
646878Sbrendan {
656878Sbrendan 	trace("test timed out");
666878Sbrendan 	exit(1);
676878Sbrendan }
68