tst.InvalidTraceFunc9.d.ksh revision 178476
1259701Sdim#!/bin/ksh -p 2259701Sdim# 3259701Sdim# CDDL HEADER START 4259701Sdim# 5259701Sdim# The contents of this file are subject to the terms of the 6259701Sdim# Common Development and Distribution License (the "License"). 7259701Sdim# You may not use this file except in compliance with the License. 8259701Sdim# 9259701Sdim# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10259701Sdim# or http://www.opensolaris.org/os/licensing. 11259701Sdim# See the License for the specific language governing permissions 12259701Sdim# and limitations under the License. 13259701Sdim# 14259701Sdim# When distributing Covered Code, include this CDDL HEADER in each 15259701Sdim# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16259701Sdim# If applicable, add the following below this CDDL HEADER, with the 17259701Sdim# fields enclosed by brackets "[]" replaced with your own identifying 18259701Sdim# information: Portions Copyright [yyyy] [name of copyright owner] 19259701Sdim# 20259701Sdim# CDDL HEADER END 21259701Sdim# 22259701Sdim 23259701Sdim# 24259701Sdim# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25259701Sdim# Use is subject to license terms. 26259701Sdim# 27259701Sdim 28259701Sdim#ident "%Z%%M% %I% %E% SMI" 29259701Sdim 30259701Sdim## 31259701Sdim# 32259701Sdim# ASSERTION: 33259701Sdim# Testing -f option with an invalid function name. 34259701Sdim# 35259701Sdim# SECTION: dtrace Utility/-f Option 36259701Sdim# 37259701Sdim## 38259701Sdim 39259701Sdimif [ $# != 1 ]; then 40259701Sdim echo expected one argument: '<'dtrace-path'>' 41259701Sdim exit 2 42259701Sdimfi 43259701Sdim 44259701Sdimdtrace=$1 45259701Sdim 46259701Sdim$dtrace -f read '{printf("FOUND");}' 47259701Sdim 48259701Sdimif [ $? -ne 1 ]; then 49259701Sdim echo $tst: dtrace failed 50259701Sdim exit 1 51259701Sdimfi 52259701Sdim 53259701Sdimexit 0 54259701Sdim