tst.InvalidTraceModule7.d.ksh revision 14ea49401f3c8c61422aefbda43809e275f60c6c
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#!/bin/ksh -p
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# CDDL HEADER START
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# The contents of this file are subject to the terms of the
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# Common Development and Distribution License (the "License").
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# You may not use this file except in compliance with the License.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# or http://www.opensolaris.org/os/licensing.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# See the License for the specific language governing permissions
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# and limitations under the License.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# When distributing Covered Code, include this CDDL HEADER in each
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# If applicable, add the following below this CDDL HEADER, with the
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# CDDL HEADER END
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# Use is subject to license terms.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#ident "%Z%%M% %I% %E% SMI"
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync##
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# ASSERTION:
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# The -m option can be used to enable the probes from their module names.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# Invalid module names result in error.
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync# SECTION: dtrace Utility/-m Option
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync#
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync##
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsyncif [ $# != 1 ]; then
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync echo expected one argument: '<'dtrace-path'>'
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync exit 2
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsyncfi
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsyncdtrace=$1
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync$dtrace -m genunix::'{printf("FOUND");}'
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsync
fc659761c3e27dad0ce26752ed131bd4b7763b3bvboxsyncstatus=$?
echo $status
if [ "$status" -ne 0 ]; then
exit 0
fi
echo $tst: dtrace failed
exit $status