Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/shareClassTests/SCCMLTests/testSCCMLSnapshot.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 18: 29 tests -->
28
29
<suite id="Shared Classes CommandLineOptionTests Suite">
30
31
<!-- Our test modes for this suite -->
32
<variable name="mode204" value="-Xshareclasses:name=ShareClassesCMLTests"/>
33
34
<!-- Set variables up -->
35
<variable name="currentMode" value="$mode204$"/>
36
37
<if testVariable="SCMODE" testValue="204" resultVariable="currentMode" resultValue="$mode204$"/>
38
39
<echo value=" "/>
40
<echo value="#######################################################"/>
41
<echo value="Running tests in mode $SCMODE$ with command line options: $currentMode$"/>
42
<echo value="#######################################################"/>
43
<echo value=" "/>
44
45
<!--
46
Note:
47
Most tests check for strings 'corrupt', 'JVM requested Java dump', and 'JVM requested Snap dump' in the output.
48
These checks are present because a cache may be found to be corrupt, and the test could otherwise pass.
49
50
The string 'corrupt' is checked because it can appear several messages like below.
51
JVMSHRC443E Cache CRC is incorrect indicating a corrupt cache. Incorrect cache CRC: 0x0.
52
JVMDUMP013I Processed dump event "corruptcache", detail "".
53
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.
54
-->
55
56
<test id="Start : Cleanup: persistent" timeout="600" runPath=".">
57
<command>$JAVA_EXE$ $currentMode$,destroy</command>
58
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
59
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
60
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
61
62
<output type="failure" caseSensitive="no" regex="no">error</output>
63
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
64
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
65
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
66
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
67
</test>
68
69
<test id="Start: Cleanup: nonpersistent" timeout="600" runPath=".">
70
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
71
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
72
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
73
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
74
75
<output type="failure" caseSensitive="no" regex="no">error</output>
76
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
77
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
78
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
79
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
80
</test>
81
82
<test id="Test 1: Create a snapshot of the non-persistent cache that does not exist" timeout="600" runPath=".">
83
<command>$JAVA_EXE$ $currentMode$,nonpersistent,snapshotCache</command>
84
<output type="required" caseSensitive="yes" regex="no">Cache does not exist</output>
85
<output type="success" caseSensitive="yes" regex="no">Failed to create a snapshot of non-persistent shared cache "ShareClassesCMLTests"</output>
86
<output type="failure" caseSensitive="no" regex="no">error</output>
87
<output type="failure" caseSensitive="yes" regex="no">has been created</output>
88
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
89
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
90
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
91
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
92
</test>
93
94
<test id="Test 2s: Set up for test 2, test 3, test 4, test 5 and test 6, create a non-persistent cache" timeout="600" runPath=".">
95
<command>$JAVA_EXE$ $currentMode$,nonpersistent -version</command>
96
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
97
<output type="failure" caseSensitive="no" regex="no">error</output>
98
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
99
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
100
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
101
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
102
</test>
103
104
<test id="Test 2: Create a snapshot of the non-persistent cache" timeout="600" runPath=".">
105
<command>$JAVA_EXE$ $currentMode$,nonpersistent,snapshotCache</command>
106
<output type="success" caseSensitive="yes" regex="no">Snapshot of non-persistent shared cache "ShareClassesCMLTests" has been created</output>
107
<output type="failure" caseSensitive="yes" regex="no">Failed to create</output>
108
<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>
109
<output type="failure" caseSensitive="no" regex="no">error</output>
110
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
111
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
112
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
113
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
114
</test>
115
116
<test id="Test 3: Create a snapshot of the non-persistent cache when the snapshot file already exists" timeout="600" runPath=".">
117
<command>$JAVA_EXE$ $currentMode$,nonpersistent,snapshotCache</command>
118
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">The JVM is creating a snapshot of the non-persistent shared cache "ShareClassesCMLTests", but a snapshot file(.)*ShareClassesCMLTests(.)*already exists and it will be overwritten</output>
119
<output type="required" caseSensitive="yes" regex="no">Snapshot of non-persistent shared cache "ShareClassesCMLTests" has been created</output>
120
<output type="failure" caseSensitive="yes" regex="no">Failed to create</output>
121
<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>
122
<output type="failure" caseSensitive="no" regex="no">error</output>
123
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
124
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
125
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
126
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
127
</test>
128
129
<test id="Test 4: Create a snapshot of the non-persistent cache without changing to non-persistent mode" timeout="600" runPath=".">
130
<command>$JAVA_EXE$ $currentMode$,snapshotCache</command>
131
<output type="success" caseSensitive="yes" regex="no" platforms="zos.*">Snapshot of non-persistent shared cache "ShareClassesCMLTests" has been created</output>
132
<output type="success" caseSensitive="yes" regex="no" platforms="aix.*,linux.*,osx.*">To run the "snapshotCache" utility on a nonpersistent shared cache "ShareClassesCMLTests", you must also use the "nonpersistent" suboption</output>
133
<output type="failure" caseSensitive="yes" regex="no" platforms="zos.*">Failed to create</output>
134
<output type="failure" caseSensitive="yes" regex="no" platforms="zos.*">Cache does not exist</output>
135
<output type="failure" caseSensitive="yes" regex="no" platforms="aix.*,linux.*,osx.*">has been created</output>
136
<output type="failure" caseSensitive="no" regex="no">error</output>
137
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
138
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
139
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
140
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
141
</test>
142
143
<test id="Test 5: Create a snapshot of the non-persistent cache with reset option" timeout="600" runPath=".">
144
<command>$JAVA_EXE$ $currentMode$,nonpersistent,snapshotCache,reset -version</command>
145
<output type="required" caseSensitive="yes" regex="no">Sub-options "reset" and "snapshotCache" are incompatible. Sub-option "reset" is ignored</output>
146
<output type="success" caseSensitive="yes" regex="no">Snapshot of non-persistent shared cache "ShareClassesCMLTests" has been created</output>
147
<output type="failure" caseSensitive="yes" regex="no">Failed to create</output>
148
<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>
149
<output type="failure" caseSensitive="no" regex="no">error</output>
150
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
151
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
152
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
153
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
154
</test>
155
156
<test id="Test 6: Clean up, destroy the non-persistent cache if it exists" timeout="600" runPath=".">
157
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
158
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
159
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
160
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
161
162
<output type="failure" caseSensitive="no" regex="no">error</output>
163
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
164
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
165
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
166
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
167
</test>
168
169
<test id="Test 7: Restore a non-persistent cache that does not exist" timeout="600" runPath=".">
170
<command>$JAVA_EXE$ $currentMode$,nonpersistent,restoreFromSnapshot</command>
171
<output type="success" caseSensitive="yes" regex="no">Non-persistent shared cache "ShareClassesCMLTests" has been restored successfully from the snapshot</output>
172
<output type="failure" caseSensitive="yes" regex="no">Failed to restore</output>
173
<output type="failure" caseSensitive="no" regex="no">error</output>
174
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
175
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
176
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
177
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
178
</test>
179
180
<test id="Test 8: Restore a non-persistent cache that already exists" timeout="600" runPath=".">
181
<command>$JAVA_EXE$ $currentMode$,nonpersistent,restoreFromSnapshot</command>
182
<output type="success" caseSensitive="yes" regex="no">Non-persistent shared cache "ShareClassesCMLTests" already exists. It cannot be restored from the snapshot</output>
183
<output type="failure" caseSensitive="no" regex="no">error</output>
184
<output type="failure" caseSensitive="yes" regex="no">has been restored successfully</output>
185
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
186
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
187
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
188
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
189
</test>
190
191
<test id="Test 9s: Set up for test 9. Destroy the non-persistent cache if it exists" timeout="600" runPath=".">
192
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
193
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
194
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
195
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
196
197
<output type="failure" caseSensitive="no" 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 9: Restore a cache without switching to non-persistent mode" timeout="600" runPath=".">
205
<command>$JAVA_EXE$ $currentMode$,restoreFromSnapshot</command>
206
<output type="success" caseSensitive="yes" regex="no" platforms="zos.*">Non-persistent shared cache "ShareClassesCMLTests" has been restored successfully from the snapshot</output>
207
<output type="success" caseSensitive="yes" regex="no" platforms="aix.*,linux.*,osx.*">To run the "restoreFromSnapshot" utility on a nonpersistent shared cache "ShareClassesCMLTests", you must also use the "nonpersistent" suboption</output>
208
<output type="failure" caseSensitive="no" regex="no">error</output>
209
<output type="failure" caseSensitive="yes" regex="no" platforms="aix.*,linux.*,osx.*">has been restored successfully</output>
210
<output type="failure" caseSensitive="yes" regex="no" platforms="zos.*">Failed to restore</output>
211
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
212
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
213
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
214
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
215
</test>
216
217
<test id="Test 10s: Setup for test 10. Destroy the non-persistent cache if it exists" timeout="600" runPath=".">
218
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
219
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
220
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
221
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
222
223
<output type="failure" caseSensitive="no" regex="no">error</output>
224
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
225
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
226
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
227
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
228
<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>
229
<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>
230
</test>
231
232
<test id="Test 10: Restore a non-persistent cache that does not exist with readOnly option" timeout="600" runPath=".">
233
<command>$JAVA_EXE$ $currentMode$,nonpersistent,restoreFromSnapshot,readOnly</command>
234
<output type="required" caseSensitive="yes" regex="no">Sub-options "readonly" and "restoreFromSnapshot" are incompatible. Sub-option "readonly" is ignored</output>
235
<output type="success" caseSensitive="yes" regex="no">Non-persistent shared cache "ShareClassesCMLTests" has been restored successfully from the snapshot</output>
236
<output type="failure" caseSensitive="yes" regex="no">Failed to restore</output>
237
<output type="failure" caseSensitive="no" regex="no">error</output>
238
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
239
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
240
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
241
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
242
</test>
243
244
<test id="Test 11 - a: Setup for test 11. Create a snapshot of the non-persistent cache that has a bad buildID" timeout="600" runPath=".">
245
<command>$JAVA_EXE$ $currentMode$,nonpersistent,testBadBuildID,snapshotCache</command>
246
<output type="success" caseSensitive="yes" regex="no">Snapshot of non-persistent shared cache "ShareClassesCMLTests" has been created</output>
247
<output type="failure" caseSensitive="yes" regex="no">Failed to create</output>
248
<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>
249
<output type="failure" caseSensitive="no" regex="no">error</output>
250
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
251
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
252
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
253
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
254
</test>
255
256
<test id="Test 11 - b: Setup for test 11. Destroy the non-persistent cache if it exists" timeout="600" runPath=".">
257
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
258
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
259
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
260
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
261
262
<output type="failure" caseSensitive="no" regex="no">error</output>
263
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
264
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
265
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
266
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
267
<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>
268
<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>
269
</test>
270
271
<test id="Test 11: Restore a non-persistent cache that has a different buildID" timeout="600" runPath=".">
272
<command>$JAVA_EXE$ $currentMode$,nonpersistent,restoreFromSnapshot</command>
273
<output type="success" caseSensitive="yes" regex="no">The snapshot was created by a different JVM build and doesn't match the running JVM</output>
274
<output type="required" caseSensitive="yes" regex="no">Failed to restore the non-persistent shared cache "ShareClassesCMLTests" from the snapshot</output>
275
<output type="failure" caseSensitive="no" regex="no">error</output>
276
<output type="failure" caseSensitive="yes" regex="no">has been restored successfully</output>
277
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
278
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
279
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
280
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
281
</test>
282
283
<test id="Test 12: Restore a non-persistent cache that has a different buildID with noAutoPunt option" timeout="600" runPath=".">
284
<command>$JAVA_EXE$ $currentMode$,nonpersistent,noAutoPunt,restoreFromSnapshot</command>
285
<output type="success" caseSensitive="yes" regex="no">Non-persistent shared cache "ShareClassesCMLTests" has been restored successfully from the snapshot</output>
286
<output type="failure" caseSensitive="yes" regex="no">Failed to restore</output>
287
<output type="failure" caseSensitive="no" regex="no">error</output>
288
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
289
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
290
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
291
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
292
</test>
293
294
<test id="Test 13: Clean up, destroy the snapshot" timeout="600" runPath=".">
295
<command>$JAVA_EXE$ $currentMode$,destroySnapshot</command>
296
<output type="success" caseSensitive="no" regex="no">Shared cache snapshot "ShareClassesCMLTests" is destroyed</output>
297
<output type="failure" caseSensitive="yes" regex="no">Snapshot does not exist</output>
298
<output type="failure" caseSensitive="no" regex="no">error</output>
299
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
300
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
301
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
302
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
303
</test>
304
305
<test id="Test 14: Clean up, destroy the non-persistent cache if it exists" timeout="600" runPath=".">
306
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
307
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
308
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
309
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
310
311
<output type="failure" caseSensitive="no" regex="no">error</output>
312
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
313
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
314
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
315
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
316
<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>
317
<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>
318
</test>
319
320
<test id="Test 15: Restore a non-persistent cache from a corrupted snapshot" timeout="600" runPath=".">
321
<exec command="$JAVA_EXE$ $currentMode$C,printSnapshotFilename -XX:-JITServerTechPreviewMessage" captureStderr="FILENAME" platforms="aix.*,linux.*,osx.*" />
322
<exec command="$JAVA_EXE$ $currentMode$C,printSnapshotFilename -Xifa:off -XX:-JITServerTechPreviewMessage" captureStderr="FILENAME" platforms="zos.*" />
323
<exec command="touch $FILENAME$" />
324
325
<command>$JAVA_EXE$ $currentMode$C,nonpersistent,restoreFromSnapshot</command>
326
<output type="success" caseSensitive="yes" regex="no">The length of the non-persistent shared cache snapshot file "$FILENAME$" is invalid</output>
327
<output type="required" caseSensitive="yes" regex="no">Failed to restore the non-persistent shared cache "ShareClassesCMLTestsC" from the snapshot</output>
328
<output type="failure" caseSensitive="no" regex="no">error</output>
329
<output type="failure" caseSensitive="yes" regex="no">has been restored successfully</output>
330
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
331
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
332
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
333
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
334
</test>
335
336
<test id="Test 16 - clean up, destroy the corrupted snapshot if exist" timeout="600" runPath=".">
337
<command>$JAVA_EXE$ $currentMode$C,destroySnapshot</command>
338
<output type="success" caseSensitive="no" regex="no">Shared cache snapshot "ShareClassesCMLTestsC" is destroyed</output>
339
<output type="failure" caseSensitive="yes" regex="no">Snapshot does not exist</output>
340
<output type="failure" caseSensitive="no" regex="no">error</output>
341
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
342
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
343
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
344
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
345
</test>
346
347
<test id="Test 17 - a: Set up for test 17 and test 18, create a non-persistent cache" timeout="600" runPath=".">
348
<command>$JAVA_EXE$ $currentMode$,nonpersistent -version</command>
349
<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
350
<output type="failure" caseSensitive="no" regex="no">error</output>
351
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
352
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
353
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
354
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
355
</test>
356
357
<test id="Test 17 - b: Set up for test 17 and test 18, create a snapshot of the non-persistent cache" timeout="600" runPath=".">
358
<command>$JAVA_EXE$ $currentMode$,nonpersistent,snapshotCache</command>
359
<output type="success" caseSensitive="yes" regex="no">Snapshot of non-persistent shared cache "ShareClassesCMLTests" has been created</output>
360
<output type="failure" caseSensitive="yes" regex="no">Failed to create</output>
361
<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>
362
<output type="failure" caseSensitive="no" regex="no">error</output>
363
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
364
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
365
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
366
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
367
</test>
368
369
<test id="Test 17 - c: run listAllCaches to show the snapshot" timeout="600" runPath=".">
370
<command>$JAVA_EXE$ -Xshareclasses:listAllCaches</command>
371
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">ShareClassesCMLTests[\s]*Java(.)*snapshot</output>
372
<output type="failure" caseSensitive="yes" regex="no" javaUtilPattern="yes">No shared class caches available</output>
373
<output type="failure" caseSensitive="no" regex="no">error</output>
374
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
375
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
376
</test>
377
378
<test id="Test 18: Destroy all snapshots" timeout="600" runPath=".">
379
<command>$JAVA_EXE$ -Xshareclasses:destroyAllSnapshots</command>
380
<output type="success" caseSensitive="yes" regex="no">Attempting to destroy all shared cache snapshots in cacheDir</output>
381
<output type="required" caseSensitive="no" regex="no">Shared cache snapshot "ShareClassesCMLTests" is destroyed</output>
382
<output type="failure" caseSensitive="yes" regex="no">No snapshots available</output>
383
<output type="failure" caseSensitive="no" regex="no">error</output>
384
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
385
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
386
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
387
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
388
</test>
389
390
<test id="At end destroy persistent cache for cleanup" timeout="600" runPath=".">
391
<command>$JAVA_EXE$ $currentMode$P,destroy</command>
392
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
393
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
394
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
395
396
<output type="failure" caseSensitive="no" regex="no">error</output>
397
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
398
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
399
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
400
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
401
<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>
402
<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>
403
</test>
404
405
<test id="At end destroy non-persistent cache for cleanup" timeout="600" runPath=".">
406
<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>
407
<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>
408
<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>
409
<output type="success" caseSensitive="yes" regex="no">is destroyed</output>
410
411
<output type="failure" caseSensitive="no" regex="no">error</output>
412
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
413
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
414
<output type="failure" caseSensitive="no" regex="no">corrupt</output>
415
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
416
<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>
417
<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>
418
</test>
419
420
<!--
421
***** IMPORTANT NOTE *****
422
The last test in this file is normally a call to -Xshareclasses:destroy. When the test passes no files should ever be left behind.
423
-->
424
</suite>
425
426