1c7158aetariq#
2c7158aetariq# CDDL HEADER START
3c7158aetariq#
4c7158aetariq# The contents of this file are subject to the terms of the
5c7158aetariq# Common Development and Distribution License (the "License").
6c7158aetariq# You may not use this file except in compliance with the License.
7c7158aetariq#
8c7158aetariq# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c7158aetariq# or http://www.opensolaris.org/os/licensing.
10c7158aetariq# See the License for the specific language governing permissions
11c7158aetariq# and limitations under the License.
12c7158aetariq#
13c7158aetariq# When distributing Covered Code, include this CDDL HEADER in each
14c7158aetariq# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c7158aetariq# If applicable, add the following below this CDDL HEADER, with the
16c7158aetariq# fields enclosed by brackets "[]" replaced with your own identifying
17c7158aetariq# information: Portions Copyright [yyyy] [name of copyright owner]
18c7158aetariq#
19c7158aetariq# CDDL HEADER END
20c7158aetariq#
21c7158aetariq
22c7158aetariq#
23c7158aetariq# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24c7158aetariq# Use is subject to license terms.
25c7158aetariq#
26c7158aetariq# ident	"%Z%%M%	%I%	%E% SMI"
27c7158aetariq#
28c7158aetariq
29c7158aetariq#
30c7158aetariq# ASSERTION: HVM probes should enable successfully.
31c7158aetariq#
32c7158aetariq
33c7158aetariqif [ $# != 1 ]; then
34c7158aetariq	echo expected one argument: '<'dtrace-path'>'
35c7158aetariq	exit 2
36c7158aetariqfi
37c7158aetariq
38c7158aetariq#
39c7158aetariq# Do not fail the test in a domU
40c7158aetariq#
41c7158aetariqif [ ! -c /dev/xen/privcmd ]; then
42c7158aetariq	exit 0
43c7158aetariqfi
44c7158aetariq
45c7158aetariqdtrace=$1
46c7158aetariq
47c7158aetariqscript()
48c7158aetariq{
49c7158aetariq	$dtrace -qs /dev/stdin <<EOF
50c7158aetariq	dtrace:::BEGIN
51c7158aetariq	{
52c7158aetariq		exit(0);
53c7158aetariq	}
54c7158aetariq
55c7158aetariq	xdt:hvm::vmentry,
56c7158aetariq	xdt:hvm::vmexit
57c7158aetariq	{}
58c7158aetariqEOF
59c7158aetariq}
60c7158aetariq
61c7158aetariqscript
62c7158aetariqstatus=$?
63c7158aetariq
64c7158aetariqexit $status
65