Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/shareClassTests/SCCMLTests/testSCCMLAotMethodOperation.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
3
<!--
4
Copyright (c) 2012, 2021 IBM Corp. and others
5
6
This program and the accompanying materials are made available under
7
the terms of the Eclipse Public License 2.0 which accompanies this
8
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
9
or the Apache License, Version 2.0 which accompanies this distribution and
10
is available at https://www.apache.org/licenses/LICENSE-2.0.
11
12
This Source Code may also be made available under the following
13
Secondary Licenses when the conditions for such availability set
14
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
15
General Public License, version 2 with the GNU Classpath
16
Exception [1] and GNU General Public License, version 2 with the
17
OpenJDK Assembly Exception [2].
18
19
[1] https://www.gnu.org/software/classpath/license.html
20
[2] http://openjdk.java.net/legal/assembly-exception.html
21
22
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
23
-->
24
25
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
26
27
<!-- Test 1 to Test 11: 19 tests -->
28
<suite id="Shared Classes CommandLineOptionTests Suite">
29
30
<!-- Our test modes for this suite -->
31
<variable name="mode204" value="-Xshareclasses:name=ShareClassesCMLTests"/>
32
33
<!-- Set variables up -->
34
<variable name="currentMode" value="$mode204$"/>
35
36
<if testVariable="SCMODE" testValue="204" resultVariable="currentMode" resultValue="$mode204$"/>
37
38
<echo value=" "/>
39
<echo value="#######################################################"/>
40
<echo value="Running tests in mode $SCMODE$ with command line options: $currentMode$"/>
41
<echo value="#######################################################"/>
42
<echo value=" "/>
43
44
<!--
45
Note:
46
Most tests check for strings 'corrupt', 'JVM requested Java dump', and 'JVM requested Snap dump' in the output.
47
These checks are present because a cache may be found to be corrupt, and the test could otherwise pass.
48
49
The string 'corrupt' is checked because it can appear several messages like below.
50
JVMSHRC443E Cache CRC is incorrect indicating a corrupt cache. Incorrect cache CRC: 0x0.
51
JVMDUMP013I Processed dump event "corruptcache", detail "".
52
JVMSHRC442E Shared cache "jim" is corrupt. Corruption code is -1. Corrupt value is 0x0. No new JVMs will be allowed to connect to the cache.
53
-->
54
55
<test id="Start : Cleanup" timeout="600" runPath=".">
56
<command>$JAVA_EXE$ $currentMode$,destroy</command>
57
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
58
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
59
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
60
61
<output type="failure" caseSensitive="no" regex="no">error</output>
62
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
63
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
64
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
65
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
66
</test>
67
68
<!-- Pass -Xshareclasses option to <arg> to prevent shell intercepting and fragmenting comma-separated command -->
69
70
<test id="Test 1 - a: Run option invalidateAotMethods on a non-existing cache" timeout="600" runPath=".">
71
<command command="$JAVA_EXE$">
72
<arg>$currentMode$,invalidateAotMethods={*.*(*)}</arg>
73
</command>
74
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
75
76
<output type="failure" caseSensitive="no" regex="no">Invalidated the</output>
77
<output type="failure" caseSensitive="yes" regex="no">has been created</output>
78
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
79
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
80
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
81
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
82
</test>
83
84
<test id="Test 1 - b: Run option revalidateAotMethods on a non-existing cache" timeout="600" runPath=".">
85
<command command="$JAVA_EXE$">
86
<arg>$currentMode$,revalidateAotMethods={*.*(*)}</arg>
87
</command>
88
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
89
90
<output type="failure" caseSensitive="no" regex="no">Revalidated the</output>
91
<output type="failure" caseSensitive="yes" regex="no">has been created</output>
92
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
93
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
94
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
95
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
96
</test>
97
98
<test id="Test 1 - c: Run option findAotMethods on a non-existing cache" timeout="600" runPath=".">
99
<command command="$JAVA_EXE$">
100
<arg>$currentMode$,findAotMethods={*.*(*)}</arg>
101
</command>
102
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
103
104
<output type="failure" caseSensitive="no" regex="no">Found the</output>
105
<output type="failure" caseSensitive="yes" regex="no">has been created</output>
106
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
107
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
108
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
109
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
110
</test>
111
112
<test id="Test 2 - Setup: create an cache with AOT methods" timeout="600" runPath=".">
113
<command>$JAVA_EXE$ $currentMode$ -Xaot:forceAot,count=0,disableAsyncCompilation -version</command>
114
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
115
116
<output type="failure" caseSensitive="yes" regex="no">error</output>
117
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
118
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
119
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
120
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
121
</test>
122
123
<test id="Test 3: Invalidate all the methods in java/lang/ with readOnly option" timeout="600" runPath=".">
124
<command command="$JAVA_EXE$">
125
<arg>$currentMode$,readOnly,invalidateAotMethods={java/lang/*.*(*)}</arg>
126
</command>
127
<output type="required" caseSensitive="yes" regex="no">Sub-options "readonly" and "invalidateAotMethods=" are incompatible. Sub-option "readonly" is ignored</output>
128
<output type="success" caseSensitive="yes" regex="no">Invalidated the</output>
129
130
<output type="failure" caseSensitive="no" regex="no">Failed to invalidate</output>
131
<output type="failure" caseSensitive="yes" regex="no">error</output>
132
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
133
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
134
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
135
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
136
</test>
137
138
<test id="Test 4: Test printStats=aot that only valid aot methods can be printed out" timeout="600" runPath=".">
139
<command>$JAVA_EXE$ $currentMode$,printStats=aot</command>
140
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*[\n\r](.)*for ROMClass</output>
141
142
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass</output>
143
<output type="failure" caseSensitive="yes" regex="no">error</output>
144
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
145
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
146
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
147
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
148
</test>
149
150
<test id="Test 5: Test printStats=invalidatedaot that only invalidated aot methods can be printed out" timeout="600" runPath=".">
151
<command>$JAVA_EXE$ $currentMode$,printStats=invalidatedaot</command>
152
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass java\/lang\/</output>
153
154
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*[\n\r](.)*for ROMClass</output>
155
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.(?!java\/lang\/))*at[\s]0x[\w]</output>
156
<output type="failure" caseSensitive="yes" regex="no">error</output>
157
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
158
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
159
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
160
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
161
</test>
162
163
<test id="Test 6 - a: RevalidateAotMethods all the methods in java/lang/ with readOnly option" timeout="600" runPath=".">
164
<command command="$JAVA_EXE$">
165
<arg>$currentMode$,readOnly,revalidateAotMethods={java/lang/*.*(*)}</arg>
166
</command>
167
<output type="required" caseSensitive="yes" regex="no">Sub-options "readonly" and "revalidateAotMethods=" are incompatible. Sub-option "readonly" is ignored</output>
168
<output type="success" caseSensitive="yes" regex="no">Revalidated the</output>
169
170
<output type="failure" caseSensitive="no" regex="no">Failed to revalidate</output>
171
<output type="failure" caseSensitive="yes" regex="no">error</output>
172
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
173
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
174
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
175
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
176
</test>
177
178
<test id="Test 6 - b: Print out the AOT methods to check the result" timeout="600" runPath=".">
179
<command>$JAVA_EXE$ $currentMode$,printStats=aot+invalidatedaot</command>
180
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*[\n\r](.)*for ROMClass java\/lang\/</output>
181
182
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: (.)*INVALIDATED[\n\r](.)*for ROMClass</output>
183
<output type="failure" caseSensitive="yes" regex="no">error</output>
184
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
185
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
186
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
187
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
188
</test>
189
190
<test id="Test 7 - a: Invalidate any methods but java/lang/Object.hashCode()" timeout="600" runPath=".">
191
<command command="$JAVA_EXE$">
192
<arg>$currentMode$,invalidateAotMethods={*.*,!java/lang/Object.hashCode()}</arg>
193
</command>
194
<output type="success" caseSensitive="yes" regex="no">Invalidated the</output>
195
196
<output type="failure" caseSensitive="no" regex="no">Failed to invalidate</output>
197
<output type="failure" caseSensitive="yes" regex="no">error</output>
198
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
199
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
200
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
201
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
202
</test>
203
204
<test id="Test 7 - b: Find all the AOT methods and check the result" timeout="600" runPath=".">
205
<command>$JAVA_EXE$ $currentMode$,readOnly,findAotMethods={*.*}</command>
206
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: hashCode Signature: \(\)I Address: 0x[\w]*[\n\r](.)*for ROMClass java\/lang\/Object at</output>
207
<output type="required" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass</output>
208
<output type="required" caseSensitive="yes" regex="no">Found the</output>
209
210
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: hashCode Signature: \(\)I Address: (.)*INVALIDATED[\n\r](.)*for ROMClass java\/lang\/Object at</output>
211
<output type="failure" caseSensitive="yes" regex="no">Sub-options "readonly" and "findAotMethods=" are incompatible. Sub-option "readonly" is ignored</output>
212
<output type="failure" caseSensitive="yes" regex="no">error</output>
213
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
214
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
215
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
216
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
217
</test>
218
219
<test id="Test 8: Test the first method specification that should have no effect if it has an exclamation mark" timeout="600" runPath=".">
220
<command command="$JAVA_EXE$">
221
<arg>$currentMode$,invalidateAotMethods={!java/lang/*.*(*),java/lang/Object.hashCode()}</arg>
222
</command>
223
<output type="success" caseSensitive="yes" regex="no">Invalidated the 1 AOT method(s)</output>
224
225
<output type="failure" caseSensitive="yes" regex="no">No AOT methods match the method specification(s)</output>
226
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Invalidated the [02-9]|\d{2,} AOT method(s)</output>
227
<output type="failure" caseSensitive="yes" regex="no">Failed to invalidate the AOT method(s)</output>
228
<output type="failure" caseSensitive="yes" regex="no">error</output>
229
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
230
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
231
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
232
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
233
</test>
234
235
<test id="Test 9 - a: Revalidate all the AOT methods" timeout="600" runPath=".">
236
<command command="$JAVA_EXE$">
237
<arg>$currentMode$,revalidateAotMethods={*.*}</arg>
238
</command>
239
<output type="success" caseSensitive="yes" regex="no">Revalidated the</output>
240
241
<output type="failure" caseSensitive="no" regex="no">Failed to revalidate</output>
242
<output type="failure" caseSensitive="yes" regex="no">error</output>
243
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
244
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
245
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
246
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
247
</test>
248
249
<test id="Test 9 - b: Invalidate all the AOT methods but the ones matching two method specifications" timeout="600" runPath=".">
250
<command command="$JAVA_EXE$">
251
<arg>$currentMode$,invalidateAotMethods={*.*,!java/lang/Object.hashCode,!java/util/HashMap.put}</arg>
252
</command>
253
<output type="success" caseSensitive="yes" regex="no">Invalidated the</output>
254
255
<output type="failure" caseSensitive="no" regex="no">Failed to invalidate</output>
256
<output type="failure" caseSensitive="yes" regex="no">error</output>
257
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
258
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
259
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
260
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
261
</test>
262
263
<test id="Test 9 - c: Print out the AOT methods to check the result" timeout="600" runPath=".">
264
<command>$JAVA_EXE$ $currentMode$,printStats=aot+invalidatedaot</command>
265
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass</output>
266
267
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: hashCode Signature: \((.)*\)I Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass java\/lang\/Object at</output>
268
<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: put Signature: \((.)*\)V Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass java\/util\/HashMap at</output>
269
<output type="failure" caseSensitive="yes" regex="no">error</output>
270
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
271
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
272
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
273
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
274
</test>
275
276
<test id="Test 10: Try revalidating anything but two methods using two method specifications containing an exclamation mark" timeout="600" runPath=".">
277
<command command="$JAVA_EXE$">
278
<arg>$currentMode$,revalidateAotMethods={!java/lang/Object.hashCode,!java/util/HashMap.put}</arg>
279
</command>
280
<output type="success" caseSensitive="yes" regex="no">No AOT methods match the method specification(s)</output>
281
282
<output type="failure" caseSensitive="yes" regex="no">Failed to revalidate the AOT method(s)</output>
283
<output type="failure" caseSensitive="yes" regex="no">Revalidated the</output>
284
<output type="failure" caseSensitive="yes" regex="no">error</output>
285
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
286
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
287
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
288
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
289
</test>
290
291
<test id="Test 11: Pass multiple exclamation marks" timeout="600" runPath=".">
292
<command command="$JAVA_EXE$">
293
<arg>$currentMode$,invalidateAotMethods={!!java/lang/*.*(*)}</arg>
294
</command>
295
<output type="success" caseSensitive="yes" regex="no">Failed to parse the method specification(s)</output>
296
<output type="required" caseSensitive="yes" regex="no">Failed to invalidate the AOT method(s)</output>
297
298
<output type="failure" caseSensitive="yes" regex="no">Invalidated the</output>
299
<output type="failure" caseSensitive="yes" regex="no">error</output>
300
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
301
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
302
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
303
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
304
</test>
305
306
<test id="At end destroy the cache for cleanup" timeout="600" runPath=".">
307
<command>$JAVA_EXE$ $currentMode$,destroy</command>
308
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
309
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
310
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
311
312
<output type="failure" caseSensitive="no" regex="no">error</output>
313
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
314
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
315
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
316
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
317
<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>
318
<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>
319
</test>
320
321
<!--
322
***** IMPORTANT NOTE *****
323
The last test in this file is normally a call to -Xshareclasses:destroy. When the test passes no files should ever be left behind.
324
-->
325
</suite>
326
327