tst.provregex3.ksh revision a386cc11a86ecb60f5a48078d22c1500e2ad003e
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# CDDL HEADER START
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# The contents of this file are subject to the terms of the
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Common Development and Distribution License (the "License").
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# You may not use this file except in compliance with the License.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# See the License for the specific language governing permissions
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# and limitations under the License.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# When distributing Covered Code, include this CDDL HEADER in each
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# If applicable, add the following below this CDDL HEADER, with the
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# fields enclosed by brackets "[]" replaced with your own identifying
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# information: Portions Copyright [yyyy] [name of copyright owner]
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# CDDL HEADER END
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# Use is subject to license terms.
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# This test verifies that a regex in the provider name will match
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# USDT probes as well as pid probes (e.g., p*d$target matches both
18c2aff776a775d34a4c9893a4c72e0434d68e36artem# pid$target and pyramid$target.)
18c2aff776a775d34a4c9893a4c72e0434d68e36artemif [ $# != 1 ]; then
18c2aff776a775d34a4c9893a4c72e0434d68e36artemmain: main.o prov.o
18c2aff776a775d34a4c9893a4c72e0434d68e36artem gcc -m32 -o main main.o prov.o
18c2aff776a775d34a4c9893a4c72e0434d68e36artemmain.o: main.c prov.h
18c2aff776a775d34a4c9893a4c72e0434d68e36artem gcc -m32 -c main.c
18c2aff776a775d34a4c9893a4c72e0434d68e36artemprov.h: prov.d
18c2aff776a775d34a4c9893a4c72e0434d68e36artem $dtrace -h -s prov.d
18c2aff776a775d34a4c9893a4c72e0434d68e36artemprov.o: prov.d main.o
18c2aff776a775d34a4c9893a4c72e0434d68e36artem $dtrace -G -32 -s prov.d main.o
18c2aff776a775d34a4c9893a4c72e0434d68e36artemprovider pyramid {
18c2aff776a775d34a4c9893a4c72e0434d68e36artem probe entry();
18c2aff776a775d34a4c9893a4c72e0434d68e36artem#include <sys/sdt.h>
18c2aff776a775d34a4c9893a4c72e0434d68e36artem#include "prov.h"
18c2aff776a775d34a4c9893a4c72e0434d68e36artemmain(int argc, char **argv)
status=$?
cd /tmp
exit $status