tst.ZeroFunctionProbes.d.ksh revision 178477
1254794Sdumbbell#!/bin/ksh -p
2254794Sdumbbell#
3254794Sdumbbell# CDDL HEADER START
4254794Sdumbbell#
5254794Sdumbbell# The contents of this file are subject to the terms of the
6254794Sdumbbell# Common Development and Distribution License (the "License").
7254794Sdumbbell# You may not use this file except in compliance with the License.
8254794Sdumbbell#
9254794Sdumbbell# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10254794Sdumbbell# or http://www.opensolaris.org/os/licensing.
11254794Sdumbbell# See the License for the specific language governing permissions
12254794Sdumbbell# and limitations under the License.
13254794Sdumbbell#
14254794Sdumbbell# When distributing Covered Code, include this CDDL HEADER in each
15254794Sdumbbell# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16254794Sdumbbell# If applicable, add the following below this CDDL HEADER, with the
17254794Sdumbbell# fields enclosed by brackets "[]" replaced with your own identifying
18254794Sdumbbell# information: Portions Copyright [yyyy] [name of copyright owner]
19254794Sdumbbell#
20254794Sdumbbell# CDDL HEADER END
21254794Sdumbbell#
22254794Sdumbbell
23254794Sdumbbell#
24254794Sdumbbell# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25254794Sdumbbell# Use is subject to license terms.
26254794Sdumbbell#
27254794Sdumbbell
28254794Sdumbbell#ident	"%Z%%M%	%I%	%E% SMI"
29254794Sdumbbell
30254794Sdumbbell##
31254794Sdumbbell#
32254794Sdumbbell# ASSERTION:
33254794Sdumbbell# The -Z option can be used to permit descriptions that match
34254794Sdumbbell# zero probes.
35254794Sdumbbell#
36254794Sdumbbell# SECTION: dtrace Utility/-Z Option;
37254794Sdumbbell# 	dtrace Utility/-f Option
38254794Sdumbbell#
39254794Sdumbbell##
40254794Sdumbbell
41254794Sdumbbell
42254794Sdumbbellif [ $# != 1 ]; then
43254794Sdumbbell	echo expected one argument: '<'dtrace-path'>'
44254794Sdumbbell	exit 2
45254794Sdumbbellfi
46254794Sdumbbell
47254794Sdumbbelldtrace=$1
48254794Sdumbbell
49254794Sdumbbell$dtrace -qZf wassup'{printf("Iamkool");}' \
50254794Sdumbbell-qf read'{printf("I am done"); exit(0);}'
51254794Sdumbbell
52254794Sdumbbellstatus=$?
53254794Sdumbbell
54254794Sdumbbellif [ "$status" -ne 0 ]; then
55254794Sdumbbell	echo $tst: dtrace failed
56254794Sdumbbellfi
57254794Sdumbbell
58254794Sdumbbellexit $status
59254794Sdumbbell