tst.InvalidModule4.d.ksh revision 256281
165543Scg#!/bin/ksh -p 2137573Sru# 365543Scg# CDDL HEADER START 465543Scg# 565543Scg# The contents of this file are subject to the terms of the 665543Scg# Common Development and Distribution License (the "License"). 765543Scg# You may not use this file except in compliance with the License. 865543Scg# 965543Scg# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 1065543Scg# or http://www.opensolaris.org/os/licensing. 1165543Scg# See the License for the specific language governing permissions 1265543Scg# and limitations under the License. 1365543Scg# 1465543Scg# When distributing Covered Code, include this CDDL HEADER in each 1565543Scg# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1665543Scg# If applicable, add the following below this CDDL HEADER, with the 1765543Scg# fields enclosed by brackets "[]" replaced with your own identifying 1865543Scg# information: Portions Copyright [yyyy] [name of copyright owner] 1965543Scg# 2065543Scg# CDDL HEADER END 2165543Scg# 2265543Scg 2365543Scg# 2465543Scg# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2565543Scg# Use is subject to license terms. 26137500Sjulian# 2765543Scg 2865543Scg#ident "%Z%%M% %I% %E% SMI" 2965543Scg 3065543Scg## 3165543Scg# 3265543Scg# ASSERTION: 3365543Scg# The -lm option can be used to list the probes from their module names. 3465543Scg# Invalid module names result in error. 3565543Scg# 3665543Scg# SECTION: dtrace Utility/-l Option; 3765543Scg# dtrace Utility/-m Option 38119853Scg# 3965543Scg## 4065543Scg 4165543Scgif [ $# != 1 ]; then 4265543Scg echo expected one argument: '<'dtrace-path'>' 4365543Scg exit 2 4465543Scgfi 45137500Sjulian 46137500Sjuliandtrace=$1 47137500Sjulian 4865543Scg$dtrace -lm unix'/probefunc == "preempt"/{printf("FOUND");}' 4965543Scg 5065543Scgstatus=$? 5165543Scg 52119287Simpecho $status 53119287Simp 5465543Scgif [ "$status" -ne 0 ]; then 5565543Scg exit 0 5665543Scgfi 5782180Scg 5882180Scgecho $tst: dtrace failed 5965543Scgexit $status 6065543Scg