author | gtriantafill |
Thu, 19 Jan 2017 10:56:32 -0500 | |
changeset 43467 | f91da24c6bca |
parent 40631 | ed82623d7831 |
permissions | -rw-r--r-- |
26587 | 1 |
/* |
43467 | 2 |
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. |
26587 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test CompilerQueueTest |
|
26 |
* @bug 8054889 |
|
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
40077
diff
changeset
|
27 |
* @library /test/lib / |
36851 | 28 |
* @modules java.base/jdk.internal.misc |
29678
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28821
diff
changeset
|
29 |
* java.compiler |
dd2f3932c21e
8075586: Add @modules as needed to the open hotspot tests
ykantser
parents:
28821
diff
changeset
|
30 |
* java.management |
43467 | 31 |
* jdk.internal.jvmstat/sun.jvmstat.monitor |
39978
d79e47b2d2d9
8161173: quarantine compiler/arraycopy/TestEliminatedArrayCopyDeopt.java
dcubed
parents:
36851
diff
changeset
|
32 |
* @summary Test of diagnostic command Compiler.queue |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
40077
diff
changeset
|
33 |
* @build sun.hotspot.WhiteBox |
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
34 |
* @run driver ClassFileInstaller sun.hotspot.WhiteBox |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
35 |
* sun.hotspot.WhiteBox$WhiteBoxPermission |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
36 |
* @run testng/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -Xmixed -XX:+WhiteBoxAPI CompilerQueueTest |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
37 |
* @run testng/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -Xmixed -XX:-TieredCompilation -XX:+WhiteBoxAPI CompilerQueueTest |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
38 |
* @run testng/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -Xint -XX:+WhiteBoxAPI CompilerQueueTest |
26587 | 39 |
*/ |
40 |
||
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
41 |
import compiler.testlibrary.CompilerUtils; |
40631
ed82623d7831
8157957: ClassNotFoundException: jdk.test.lib.JDKToolFinder
ctornqvi
parents:
40077
diff
changeset
|
42 |
import jdk.test.lib.process.OutputAnalyzer; |
30604
b8d532cb6420
8067013: Rename the com.oracle.java.testlibary package
ykantser
parents:
29678
diff
changeset
|
43 |
import jdk.test.lib.dcmd.CommandExecutor; |
b8d532cb6420
8067013: Rename the com.oracle.java.testlibary package
ykantser
parents:
29678
diff
changeset
|
44 |
import jdk.test.lib.dcmd.JMXExecutor; |
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
45 |
import org.testng.annotations.Test; |
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
46 |
import org.testng.Assert; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
47 |
import sun.hotspot.WhiteBox; |
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
48 |
|
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
49 |
import java.lang.reflect.Executable; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
50 |
import java.lang.reflect.Method; |
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
51 |
import java.util.Iterator; |
26587 | 52 |
|
53 |
public class CompilerQueueTest { |
|
54 |
||
55 |
/** |
|
56 |
* This test calls Jcmd (diagnostic command tool) Compiler.queue and |
|
57 |
* then parses the output, making sure that the output look ok. |
|
58 |
* |
|
59 |
* |
|
60 |
* Output example: |
|
61 |
* |
|
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
62 |
* Current compiles: |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
63 |
* C1 CompilerThread14 267 3 java.net.URLStreamHandler::parseURL (1166 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
64 |
* C1 CompilerThread13 760 3 javax.management.StandardMBean::getDescription (11 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
65 |
* C1 CompilerThread12 757 s 3 com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory::getMapping (27 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
66 |
* C1 CompilerThread11 756 s! 3 com.sun.jmx.mbeanserver.DefaultMXBeanMappingFactory::mappingForType (110 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
67 |
* C1 CompilerThread10 761 3 java.lang.StringLatin1::indexOf (121 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
68 |
* C2 CompilerThread7 769 4 CompilerQueueTest::testcaseMethod4 (1 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
69 |
* |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
70 |
* C1 compile queue: |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
71 |
* 762 3 java.lang.invoke.MethodType::basicType (8 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
72 |
* 763 3 java.util.ArrayList::rangeCheck (22 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
73 |
* 764 3 java.util.ArrayList::elementData (7 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
74 |
* 765 3 jdk.internal.org.objectweb.asm.MethodVisitor::<init> (35 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
75 |
* 766 1 CompilerQueueTest::testcaseMethod1 (1 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
76 |
* 767 2 CompilerQueueTest::testcaseMethod2 (1 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
77 |
* 768 3 CompilerQueueTest::testcaseMethod3 (1 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
78 |
* 770 3 java.util.Properties::getProperty (46 bytes) |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
79 |
* |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
80 |
* C2 compile queue: |
26587 | 81 |
* Empty |
82 |
* |
|
83 |
**/ |
|
84 |
||
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
85 |
protected static final WhiteBox WB = WhiteBox.getWhiteBox(); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
86 |
|
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
87 |
public void run(CommandExecutor executor) { |
26587 | 88 |
|
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
89 |
TestCase[] testcases = { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
90 |
new TestCase(1, "testcaseMethod1"), |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
91 |
new TestCase(2, "testcaseMethod2"), |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
92 |
new TestCase(3, "testcaseMethod3"), |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
93 |
new TestCase(4, "testcaseMethod4"), |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
94 |
}; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
95 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
96 |
// Lock compilation makes all compiles stay in queue or compile thread before completion |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
97 |
WB.lockCompilation(); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
98 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
99 |
// Enqueue one test method for each available level |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
100 |
int[] complevels = CompilerUtils.getAvailableCompilationLevels(); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
101 |
for (int level : complevels) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
102 |
TestCase testcase = testcases[level - 1]; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
103 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
104 |
boolean added = WB.enqueueMethodForCompilation(testcase.method, testcase.level); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
105 |
// Set results to false for those methods we must to find |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
106 |
// We will also assert if we find any test method we don't expect |
40077
49e1e5dacc25
8158756: [Testbug] serviceability/dcmd/compiler/CompilerQueueTest.java fails with TieredStopAtLevel=1
dpochepk
parents:
39978
diff
changeset
|
107 |
Assert.assertEquals(added, WB.isMethodQueuedForCompilation(testcase.method)); |
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
108 |
testcase.check = false; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
109 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
110 |
|
26587 | 111 |
// Get output from dcmd (diagnostic command) |
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
112 |
OutputAnalyzer output = executor.execute("Compiler.queue"); |
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
113 |
Iterator<String> lines = output.asLines().iterator(); |
26587 | 114 |
|
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
115 |
// Loop over output set result for all found methods |
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
116 |
while (lines.hasNext()) { |
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
117 |
String str = lines.next(); |
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
118 |
// Fast check for common part of method name |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
119 |
if (str.contains("testcaseMethod")) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
120 |
for (TestCase testcase : testcases) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
121 |
if (str.contains(testcase.methodName)) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
122 |
Assert.assertFalse(testcase.check, "Must not be found or already found."); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
123 |
testcase.check = true; |
26941
96aa76b27b9c
8058891: serviceability/dcmd/CodelistTest.java - fails on all platforms
neliasso
parents:
26587
diff
changeset
|
124 |
} |
96aa76b27b9c
8058891: serviceability/dcmd/CodelistTest.java - fails on all platforms
neliasso
parents:
26587
diff
changeset
|
125 |
} |
26587 | 126 |
} |
127 |
} |
|
128 |
||
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
129 |
for (TestCase testcase : testcases) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
130 |
if (!testcase.check) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
131 |
// If this method wasn't found it must have been removed by policy, |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
132 |
// verify that it is now removed from the queue |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
133 |
Assert.assertFalse(WB.isMethodQueuedForCompilation(testcase.method), "Must be found or not in queue"); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
134 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
135 |
// Otherwise all good. |
26941
96aa76b27b9c
8058891: serviceability/dcmd/CodelistTest.java - fails on all platforms
neliasso
parents:
26587
diff
changeset
|
136 |
} |
26587 | 137 |
|
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
138 |
// Enable compilations again |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
139 |
WB.unlockCompilation(); |
26587 | 140 |
} |
28821
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
141 |
|
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
142 |
@Test |
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
143 |
public void jmx() { |
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
144 |
run(new JMXExecutor()); |
f7820f311663
8071908: Port internal Diagnostic Command tests and test framework to jtreg
miauno
parents:
28649
diff
changeset
|
145 |
} |
36323
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
146 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
147 |
public void testcaseMethod1() { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
148 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
149 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
150 |
public void testcaseMethod2() { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
151 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
152 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
153 |
public void testcaseMethod3() { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
154 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
155 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
156 |
public void testcaseMethod4() { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
157 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
158 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
159 |
public static Method getMethod(Class klass, String name, Class<?>... parameterTypes) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
160 |
try { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
161 |
return klass.getDeclaredMethod(name, parameterTypes); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
162 |
} catch (NoSuchMethodException | SecurityException e) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
163 |
throw new RuntimeException("exception on getting method Helper." + name, e); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
164 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
165 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
166 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
167 |
class TestCase { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
168 |
Method method; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
169 |
int level; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
170 |
String methodName; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
171 |
Boolean check; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
172 |
|
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
173 |
public TestCase(int level, String methodName) { |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
174 |
this.method = getMethod(CompilerQueueTest.class, methodName); |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
175 |
this.level = level; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
176 |
this.methodName = methodName; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
177 |
this.check = true; |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
178 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
179 |
} |
f7d5ddfbb5ce
8069160: serviceability/dcmd/compiler/CompilerQueueTest.java fails due to class not found
neliasso
parents:
30604
diff
changeset
|
180 |
|
26587 | 181 |
} |