tst.ZeroModuleProbes.d.ksh revision 178534
1221115Sobrien#!/bin/ksh -p
2221115Sobrien#
3221115Sobrien# CDDL HEADER START
4221115Sobrien#
5221115Sobrien# The contents of this file are subject to the terms of the
6221115Sobrien# Common Development and Distribution License (the "License").
7221115Sobrien# You may not use this file except in compliance with the License.
8221115Sobrien#
960786Sps# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10237613Sdelphij# or http://www.opensolaris.org/os/licensing.
1160786Sps# See the License for the specific language governing permissions
12237613Sdelphij# and limitations under the License.
1360786Sps#
1460786Sps# When distributing Covered Code, include this CDDL HEADER in each
1560786Sps# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1660786Sps# If applicable, add the following below this CDDL HEADER, with the
1760786Sps# fields enclosed by brackets "[]" replaced with your own identifying
1860786Sps# information: Portions Copyright [yyyy] [name of copyright owner]
19191930Sdelphij#
2060786Sps# CDDL HEADER END
2160786Sps#
2260786Sps
2360786Sps#
24237613Sdelphij# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2589019Sps# Use is subject to license terms.
2660786Sps#
2760786Sps
2860786Sps#ident	"%Z%%M%	%I%	%E% SMI"
2960786Sps
3060786Sps##
3160786Sps#
3260786Sps# ASSERTION:
3360786Sps# The -Z option can be used to permit descriptions that match
3460786Sps# zero probes.
3560786Sps#
3660786Sps# SECTION: dtrace Utility/-Z Option;
3760786Sps# 	dtrace Utility/-m Option
3860786Sps#
3960786Sps##
4060786Sps
4160786Spsif [ $# != 1 ]; then
4260786Sps	echo expected one argument: '<'dtrace-path'>'
4360786Sps	exit 2
4460786Spsfi
4560786Sps
4660786Spsdtrace=$1
4760786Sps
4860786Sps$dtrace -qZm wassup'{printf("Iamkool");}' \
4960786Sps-qm BEGIN'{printf("I am done"); exit(0);}'
5060786Sps
51170256Sdelphijstatus=$?
5260786Sps
5360786Spsif [ "$status" -ne 0 ]; then
5460786Sps	echo $tst: dtrace failed
5560786Spsfi
5660786Sps
5760786Spsexit $status
5860786Sps