1dcafa303Sahl#!/usr/bin/ksh 2dcafa303Sahl# 3dcafa303Sahl# CDDL HEADER START 4dcafa303Sahl# 5dcafa303Sahl# The contents of this file are subject to the terms of the 6dcafa303Sahl# Common Development and Distribution License (the "License"). 7dcafa303Sahl# You may not use this file except in compliance with the License. 8dcafa303Sahl# 9dcafa303Sahl# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10dcafa303Sahl# or http://www.opensolaris.org/os/licensing. 11dcafa303Sahl# See the License for the specific language governing permissions 12dcafa303Sahl# and limitations under the License. 13dcafa303Sahl# 14dcafa303Sahl# When distributing Covered Code, include this CDDL HEADER in each 15dcafa303Sahl# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16dcafa303Sahl# If applicable, add the following below this CDDL HEADER, with the 17dcafa303Sahl# fields enclosed by brackets "[]" replaced with your own identifying 18dcafa303Sahl# information: Portions Copyright [yyyy] [name of copyright owner] 19dcafa303Sahl# 20dcafa303Sahl# CDDL HEADER END 21dcafa303Sahl# 22dcafa303Sahl 23dcafa303Sahl# 24dcafa303Sahl# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 25dcafa303Sahl# Use is subject to license terms. 26dcafa303Sahl# 27dcafa303Sahl# ident "%Z%%M% %I% %E% SMI" 28dcafa303Sahl# 29dcafa303Sahl 30dcafa303Sahlif [ $# != 1 ]; then 31dcafa303Sahl echo expected one argument: '<'dtrace-path'>' 32dcafa303Sahl exit 2 33dcafa303Sahlfi 34dcafa303Sahl 35dcafa303Sahldtrace=$1 36dcafa303Sahl 37dcafa303Sahl# 38dcafa303Sahl# Test that we don't deadlock between forking and enabling/disabling USDT 39dcafa303Sahl# probes. This test has succeeded if it completes at all. 40dcafa303Sahl# 41dcafa303Sahl 42dcafa303Sahl./tst.forker.exe & 43dcafa303Sahlid=$! 44dcafa303Sahl 45dcafa303Sahlwhile kill -0 $id >/dev/null 2>&1; do 46*038dc6b3Sahl $dtrace -p $id -s /dev/stdin <<-EOF 47dcafa303Sahl forker*:::fire 48dcafa303Sahl /i++ == 4/ 49dcafa303Sahl { 50dcafa303Sahl exit(0); 51dcafa303Sahl } 52dcafa303Sahl EOF 53dcafa303Sahldone 54dcafa303Sahl 55dcafa303Sahlexit 0 56