1239385Smm#
2239385Smm# CDDL HEADER START
3239385Smm#
4239385Smm# The contents of this file are subject to the terms of the
5239385Smm# Common Development and Distribution License (the "License").
6239385Smm# You may not use this file except in compliance with the License.
7239385Smm#
8239385Smm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9239385Smm# or http://www.opensolaris.org/os/licensing.
10239385Smm# See the License for the specific language governing permissions
11239385Smm# and limitations under the License.
12239385Smm#
13239385Smm# When distributing Covered Code, include this CDDL HEADER in each
14239385Smm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15239385Smm# If applicable, add the following below this CDDL HEADER, with the
16239385Smm# fields enclosed by brackets "[]" replaced with your own identifying
17239385Smm# information: Portions Copyright [yyyy] [name of copyright owner]
18239385Smm#
19239385Smm# CDDL HEADER END
20239385Smm#
21239385Smm
22239385Smm#
23239385Smm# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
24239385Smm# Use is subject to license terms.
25239385Smm#
26239385Smm
27239385Smm#
28239385Smm# Copyright (c) 2012 by Delphix. All rights reserved.
29239385Smm#
30239385Smm
31239385Smm#
32239385Smm# Test the output for stable translations.
33239385Smm#
34239385Smm
35239385Smmif [ $# != 1 ]; then
36239385Smm	echo expected one argument: '<'dtrace-path'>'
37239385Smm	exit 2
38239385Smmfi
39239385Smm
40239385Smmdtrace=$1
41239385Smm
42239385Smm$dtrace -v -s /dev/stdin <<EOF
43239385Smm
44239385Smm#pragma D option quiet
45239385Smm
46239385Smminline lwpsinfo_t *myinfo = xlate < lwpsinfo_t *> (curthread);
47239385Smm
48239385Smm#pragma D attributes Stable/Stable/Common myinfo
49239385Smm
50239385SmmBEGIN
51239385Smm{
52239385Smm	this->a = myinfo->pr_flag;
53239385Smm	exit(0);
54239385Smm}
55239385Smm
56239385SmmBEGIN
57239385Smm{
58239385Smm	exit(1);
59239385Smm}
60239385SmmEOF
61239385Smm
62239385Smmexit $?
63