tst.InvalidTraceFunc2.d.ksh revision 302408
1160814Ssimon#!/bin/ksh -p 2160814Ssimon# 3160814Ssimon# CDDL HEADER START 4160814Ssimon# 5160814Ssimon# The contents of this file are subject to the terms of the 6160814Ssimon# Common Development and Distribution License (the "License"). 7160814Ssimon# You may not use this file except in compliance with the License. 8160814Ssimon# 9296341Sdelphij# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10160814Ssimon# or http://www.opensolaris.org/os/licensing. 11160814Ssimon# See the License for the specific language governing permissions 12160814Ssimon# and limitations under the License. 13160814Ssimon# 14160814Ssimon# When distributing Covered Code, include this CDDL HEADER in each 15160814Ssimon# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16160814Ssimon# If applicable, add the following below this CDDL HEADER, with the 17160814Ssimon# fields enclosed by brackets "[]" replaced with your own identifying 18160814Ssimon# information: Portions Copyright [yyyy] [name of copyright owner] 19160814Ssimon# 20160814Ssimon# CDDL HEADER END 21160814Ssimon# 22160814Ssimon 23160814Ssimon# 24160814Ssimon# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25160814Ssimon# Use is subject to license terms. 26160814Ssimon# 27160814Ssimon 28160814Ssimon#ident "%Z%%M% %I% %E% SMI" 29160814Ssimon 30160814Ssimon## 31160814Ssimon# 32160814Ssimon# ASSERTION: 33160814Ssimon# Testing -f option with an invalid function name. 34160814Ssimon# 35160814Ssimon# SECTION: dtrace Utility/-f Option 36160814Ssimon# 37160814Ssimon## 38160814Ssimon 39160814Ssimonif [ $# != 1 ]; then 40160814Ssimon echo expected one argument: '<'dtrace-path'>' 41160814Ssimon exit 2 42160814Ssimonfi 43160814Ssimon 44160814Ssimondtrace=$1 45160814Ssimon 46160814Ssimon$dtrace -f genunix 47160814Ssimon 48160814Ssimonif [ $? -ne 1 ]; then 49160814Ssimon echo $tst: dtrace failed 50160814Ssimon exit 1 51160814Ssimonfi 52160814Ssimon 53160814Ssimonexit 0 54160814Ssimon