TestStateMachine.java revision 4d0eb50e691de4c20b1dd9976ad6839fede8a42d
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/**
* Regression test for the LocalConsumer state machine. Calls Consumer
* methods before and after open(), compile(), enable(), go(), stop(),
* and close() to verify that the calls succeed as expected or fail with
* the expected Java exception.
*/
public class TestStateMachine {
static void
{
}
static void
{
}
}
static void
{
}
static void
{
// compile
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// enable
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getOption, setOption, unsetOption
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// createProcess, grabProcess
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// listProbes
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getAggregate
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getVersion
try {
} catch (Exception e) {
e.printStackTrace();
}
}
static void
{
// open
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// enable
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
static void
{
// go
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
static void
{
// getAggregate
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// lookupKernelFunction, lookupUserFunction
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// stop
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
static void
{
// go
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// createProcess, grabProcess
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// listProbes
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// compile
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// enable
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getAggregate
try {
} catch (Exception e) {
e.printStackTrace();
}
// getProgramInfo
try {
} catch (Exception e) {
e.printStackTrace();
}
// getOption, setOption, unsetOption
try {
} catch (Exception e) {
e.printStackTrace();
}
}
static void
{
// stop
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getAggregate
try {
} catch (Exception e) {
e.printStackTrace();
}
// getProgramInfo
try {
} catch (Exception e) {
e.printStackTrace();
}
// getOption, setOption, unsetOption
try {
} catch (Exception e) {
e.printStackTrace();
}
}
static void
{
// open
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// compile
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// enable
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getOption, setOption, unsetOption
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// createProcess, grabProcess
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// listProbes
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getAggregate
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getVersion
try {
} catch (Exception e) {
e.printStackTrace();
}
// go
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// lookupKernelFunction, lookupUserFunction
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// stop
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
// getProgramInfo
try {
} catch (IllegalStateException e) {
} catch (Exception e) {
e.printStackTrace();
}
}
public static void
{
public void consumerStarted(ConsumerEvent e) {
}
public void consumerStopped(ConsumerEvent e) {
}
});
try {
"syscall:::entry { @[execname] = count(); } " +
"tick-101ms { printa(@); }");
// Avoid race, call afterGo() in ConsumerListener
try {
} catch (InterruptedException e) {
e.printStackTrace();
exit(1);
}
} catch (DTraceException e) {
e.printStackTrace();
exit(1);
}
}
}