01: //
02: // Copyright (C) 2005 United States Government as represented by the
03: // Administrator of the National Aeronautics and Space Administration
04: // (NASA). All Rights Reserved.
05: //
06: // This software is distributed under the NASA Open Source Agreement
07: // (NOSA), version 1.3. The NOSA has been approved by the Open Source
08: // Initiative. See the file NOSA-1.3-JPF at the top of the distribution
09: // directory tree for the complete NOSA document.
10: //
11: // THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY
12: // KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
13: // LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO
14: // SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR
15: // A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT
16: // THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT
17: // DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE.
18: //
19:
20: package gov.nasa.jpf.mc;
21:
22: import gov.nasa.jpf.jvm.TestJPF;
23:
24: import junit.framework.TestSuite;
25:
26: import junit.textui.TestRunner;
27:
28: /**
29: * JPF driver for deadlock detection test
30: */
31: public class TestVMDeadlockJPF extends TestJPF {
32: static String testClass = "gov.nasa.jpf.mc.TestVMDeadlock";
33:
34: public TestVMDeadlockJPF(String name) {
35: super (name);
36: }
37:
38: public static void main(String[] args) {
39: TestRunner.run(suite());
40: }
41:
42: public static TestSuite suite() {
43: TestSuite suite = new TestSuite();
44:
45: suite.addTest(new TestVMDeadlockJPF("testSyncMthDeadlock"));
46: suite.addTest(new TestVMDeadlockJPF("testSyncBlockDeadlock"));
47: suite.addTest(new TestVMDeadlockJPF("testMixedDeadlock"));
48: suite
49: .addTest(new TestVMDeadlockJPF(
50: "testMissedSignalDeadlock"));
51:
52: //return new TestSuite( TestVMDeadlockJPF.class);
53: return suite;
54: }
55:
56: public void testMissedSignalDeadlock() {
57: String[] args = { testClass, "testMissedSignalDeadlock" };
58: runJPFDeadlock(args);
59: }
60:
61: public void testMixedDeadlock() {
62: String[] args = { testClass, "testMixedDeadlock" };
63: runJPFDeadlock(args);
64: }
65:
66: public void testSyncBlockDeadlock() {
67: String[] args = { testClass, "testSyncBlockDeadlock" };
68: runJPFDeadlock(args);
69: }
70:
71: /**************************** tests **********************************/
72: public void testSyncMthDeadlock() {
73: String[] args = { testClass, "testSyncMthDeadlock" };
74: runJPFDeadlock(args);
75: }
76: }
|