Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/shrcdbgddrext/shrcdbgextddrtests.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2018, 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
<suite id="J9 shared cache dbgext Tests" timeout="600">
28
29
<variable name="CP" value="-cp $UTILSJAR$" />
30
<variable name="PROGRAM" value="org.openj9.test.ivj.Hanoi 2" />
31
<variable name="PROGRAM1" value="SystemProperties" />
32
<variable name="CACHENAME" value="shareddbgext" />
33
<variable name="DUMPFILE1" value="j9core1.dmp" />
34
<variable name="DUMPFILE1a" value="j9core1a.dmp" />
35
<variable name="DUMPFILE1b" value="j9core1b.dmp" />
36
<variable name="DUMPFILE2" value="j9core2.dmp" />
37
<variable name="DUMPFILE2a" value="j9core2a.dmp" />
38
<variable name="DUMPFILE2b" value="j9core2b.dmp" />
39
<variable name="DUMPDIR" value="dumpdir" />
40
<variable name="XDUMP" value="-Xdump:system:file=$DUMPFILE1$,events=vmstop" />
41
<variable name="XDUMP2" value="-Xdump:system:file=$DUMPFILE2$,events=vmstop" />
42
43
<!-- override the JDMPVIEW_EXE command on win32 since jdmpview.exe is failing on Windows XP - CMVC 200287 -->
44
<variable name="JDMPVIEW_EXE" value="$EXE$ com.ibm.jvm.dtfjview.DTFJView" platforms="win_x86-32" />
45
46
<!-- override the -Xdump command on z/OS -->
47
<variable name="XDUMP" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORE1.DMP,events=vmstop,request=exclusive+compact" platforms="zos.*" />
48
<variable name="XDUMP2" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORE2.DMP,events=vmstop,request=exclusive+compact" platforms="zos.*" />
49
50
<variable name="SHARECLASSESOPTION" value="-Xshareclasses:name=$CACHENAME$,reset,modified=mod1"/>
51
<variable name="JIT_OPTIONS" value="-Xjit:disableAsyncCompilation,disableInlining -Xaot:forceaot,count=1,disableAsyncCompilation,disableInlining" />
52
53
54
55
<test id="Create new shared cache with partition">
56
<command>$EXE$ $JIT_OPTIONS$ $SHARECLASSESOPTION$ -XX:-ShareAnonymousClasses $CP$ $PROGRAM$</command>
57
<!-- We are adding the option "-XX:-ShareAnonymousClasses" to disable the shared class cache for anonymous classes so no more orphans are stored in the cache than that we know of. -->
58
<output regex="no" type="success">Puzzle solved!</output>
59
</test>
60
61
<test id="Add another class in the cache" >
62
<command>$EXE$ $JIT_OPTIONS$ -Xshareclasses:name=$CACHENAME$ -XX:-ShareAnonymousClasses $PROGRAM1$</command>
63
<output regex="no" type="success">OpenJ9</output>
64
</test>
65
66
<exec command="touch $PROGRAM1$.class" />
67
68
<test id="Mark previous class entry as stale" >
69
<command>$EXE$ $JIT_OPTIONS$ -Xshareclasses:name=$CACHENAME$ -XX:-ShareAnonymousClasses $PROGRAM1$</command>
70
<output regex="no" type="success">OpenJ9</output>
71
</test>
72
73
<test id="Create core file">
74
<exec command="tso delete J9CORE1.DMP.*" platforms="zos_390-64.*" />
75
<exec command="tso delete J9CORE1.DMP" platforms="zos_390-31.*" />
76
<exec command="rm -f $DUMPFILE1$" />
77
<command>$EXE$ -Xmx4m -Xshareclasses:name=$CACHENAME$ -XX:-ShareAnonymousClasses $CP$ $XDUMP$ $PROGRAM$</command>
78
<output regex="no" type="success">Moved disk 0 to 1</output>
79
<output regex="no" type="success">System dump written</output>
80
<!-- check for unexpected core dumps -->
81
<output regex="no" type="failure">0001.dmp</output>
82
</test>
83
84
<test id="Remove shared cache">
85
<command>$EXE$ -Xshareclasses:name=$CACHENAME$,destroy</command>
86
<output regex="no" type="success">destroyed</output>
87
</test>
88
89
<test id="Check whether dump file exist">
90
<exec command="sh" capture="LOGNAME" platforms="zos.*" >
91
<arg>-c</arg>
92
<arg>echo $$LOGNAME</arg>
93
</exec>
94
<exec command="cp //'$LOGNAME$.J9CORE1.DMP.X001' $DUMPFILE1a$" platforms="zos_390-64.*" />
95
<exec command="cp //'$LOGNAME$.J9CORE1.DMP.X002' $DUMPFILE1b$" platforms="zos_390-64.*" />
96
<exec command="sh $CONCAT$ $DUMPFILE1a$ $DUMPFILE1b$ $DUMPFILE1$" platforms="zos_390-64.*" />
97
<exec command="cp //'$LOGNAME$.J9CORE1.DMP' $DUMPFILE1$" platforms="zos_390-31.*" />
98
<exec command="tso delete J9CORE1.DMP.*" platforms="zos_390-64.*" />
99
<exec command="tso delete J9CORE1.DMP" platforms="zos_390-31.*" />
100
<command>ls</command>
101
<output regex="no" type="success">$DUMPFILE1$</output>
102
</test>
103
104
<test id="Run !shrc">
105
<command command="$JDMPVIEW_EXE$">
106
<arg>-core $DUMPFILE1$</arg>
107
<input>!shrc</input>
108
<input>quit</input>
109
</command>
110
<output regex="no" type="success">!shrc stats</output>
111
<output regex="no" type="required">!shrc allstats</output>
112
<output regex="no" type="required">!shrc rcstats</output>
113
<output regex="no" type="required">!shrc cpstats</output>
114
<output regex="no" type="required">!shrc orphanstats</output>
115
<output regex="no" type="required">!shrc scopestats</output>
116
<output regex="no" type="required">!shrc bytestats</output>
117
<output regex="no" type="required">!shrc invaotstats</output>
118
<output regex="no" type="required">!shrc findclass</output>
119
<output regex="no" type="required">!shrc findclassp</output>
120
<output regex="no" type="required">!shrc aotstats</output>
121
<output regex="no" type="required">!shrc findaot</output>
122
<output regex="no" type="required">!shrc findaotp</output>
123
<output regex="no" type="required">!shrc incache</output>
124
<output regex="no" type="required">!shrc method</output>
125
<output regex="no" type="required">!shrc jitpstats</output>
126
<output regex="no" type="required">!shrc findjitp</output>
127
<output regex="no" type="required">!shrc findjitpp</output>
128
<output regex="no" type="required">!shrc rtflags</output>
129
<output regex="no" type="failure">no shared cache</output>
130
<output regex="no" type="failure">unable to read</output>
131
<output regex="no" type="failure">could not read</output>
132
<output regex="no" type="failure">dump event</output>
133
<output regex="no" type="failure">DDRInteractiveCommandException</output>
134
</test>
135
136
<test id="Run !shrc stats">
137
<command command="$JDMPVIEW_EXE$">
138
<arg>-core $DUMPFILE1$</arg>
139
<input>!shrc stats</input>
140
<input>quit</input>
141
</command>
142
<!--
143
Regex (>= 4) added for the success condition since there are additional
144
java/lang/invoke/BoundMethodHandle$Species orphan classes in OJDK MH builds.
145
-->
146
<output regex="yes" javaUtilPattern="yes" type="success" >([4-9]|[1-9][0-9]+) orphans</output>
147
<output regex="no" type="failure">no shared cache</output>
148
<output regex="no" type="failure">unable to read</output>
149
<output regex="no" type="failure">could not read</output>
150
<output regex="no" type="failure">dump event</output>
151
<output regex="no" type="failure">DDRInteractiveCommandException</output>
152
</test>
153
154
<test id="Run !shrc allstats">
155
<command command="$JDMPVIEW_EXE$">
156
<arg>-core $DUMPFILE1$</arg>
157
<input>!shrc allstats</input>
158
<input>quit</input>
159
</command>
160
161
<output regex="no" type="success">SCOPE !</output>
162
<output regex="no" type="required">ROMCLASS:</output>
163
<output regex="no" type="required" >AOT data !</output>
164
<output regex="no" type="required">BYTEDATA Summary</output>
165
<output regex="no" type="required">DEBUG Area Summary</output>
166
<output regex="no" type="required">CLASSPATH</output>
167
<output regex="no" type="required">JITHINT</output>
168
<output regex="no" type="required">ZIPCACHE</output>
169
<output regex="no" type="required">ORPHAN:</output>
170
<output regex="no" type="required">LineNumberTable bytes</output>
171
<output regex="no" type="required">LocalVariableTable bytes</output>
172
<output regex="no" type="failure">no shared cache</output>
173
<output regex="no" type="failure">unable to read</output>
174
<output regex="no" type="failure">could not read</output>
175
<output regex="no" type="failure">dump event</output>
176
<output regex="no" type="failure">DDRInteractiveCommandException</output>
177
</test>
178
179
<test id="Run !shrc rcstats">
180
<command command="$JDMPVIEW_EXE$">
181
<arg>-core $DUMPFILE1$</arg>
182
<input>!shrc rcstats</input>
183
<input>quit</input>
184
</command>
185
<output regex="no" type="success">ROMCLASS: org/openj9/test/ivj/Disk</output>
186
<!-- Expect a stale entry for ROMClass for $PROGRAM1$.class (which is SystemProperties.class) as we touched the class earlier -->
187
<output regex="yes" javaUtilPattern="yes" type="required" >(.)*ROMCLASS: SystemProperties(.)* !STALE!</output>
188
<output regex="no" type="failure">no shared cache</output>
189
<output regex="no" type="failure">unable to read</output>
190
<output regex="no" type="failure">could not read</output>
191
<output regex="no" type="failure">dump event</output>
192
<output regex="no" type="failure">DDRInteractiveCommandException</output>
193
</test>
194
195
<test id="Run !shrc stalestats">
196
<command command="$JDMPVIEW_EXE$">
197
<arg>-core $DUMPFILE1$</arg>
198
<input>!shrc stalestats</input>
199
<input>quit</input>
200
</command>
201
<!-- Expect a stale entry for ROMClass for $PROGRAM1$.class (which is SystemProperties.class) as we touched the class earlier -->
202
<output regex="yes" javaUtilPattern="yes" type="success" >(.)*ROMCLASS: SystemProperties(.)*!STALE!</output>
203
<output regex="no" type="required" >stale bytes</output>
204
205
<output regex="no" type="failure">no shared cache</output>
206
<output regex="no" type="failure">unable to read</output>
207
<output regex="no" type="failure">could not read</output>
208
<output regex="no" type="failure">dump event</output>
209
<output regex="no" type="failure">DDRInteractiveCommandException</output>
210
</test>
211
212
<test id="Run !shrc cpstats">
213
<command command="$JDMPVIEW_EXE$">
214
<arg>-core $DUMPFILE1$</arg>
215
<input>!shrc cpstats</input>
216
<input>quit</input>
217
</command>
218
<output regex="no" type="success">utils.jar</output>
219
<output regex="no" type="failure">no shared cache</output>
220
<output regex="no" type="failure">unable to read</output>
221
<output regex="no" type="failure">could not read</output>
222
<output regex="no" type="failure">dump event</output>
223
<output regex="no" type="failure">DDRInteractiveCommandException</output>
224
</test>
225
226
<test id="Run !shrc orphanstats">
227
<command command="$JDMPVIEW_EXE$">
228
<arg>-core $DUMPFILE1$</arg>
229
<input>!shrc orphanstats</input>
230
<input>quit</input>
231
</command>
232
<output regex="no" type="success">ORPHAN: org/openj9/test/ivj/Disk</output>
233
<output regex="no" type="failure">no shared cache</output>
234
<output regex="no" type="failure">unable to read</output>
235
<output regex="no" type="failure">could not read</output>
236
<output regex="no" type="failure">dump event</output>
237
<output regex="no" type="failure">DDRInteractiveCommandException</output>
238
</test>
239
240
<test id="Run !shrc scopestats">
241
<command command="$JDMPVIEW_EXE$">
242
<arg>-core $DUMPFILE1$</arg>
243
<input>!shrc scopestats</input>
244
<input>quit</input>
245
</command>
246
<output regex="no" type="success">rt.jar</output>
247
<output regex="no" type="success">utils.jar</output>
248
<output regex="no" type="success">lib/modules</output>
249
<output regex="no" type="success">lib\modules</output>
250
<output regex="no" type="failure">no shared cache</output>
251
<output regex="no" type="failure">unable to read</output>
252
<output regex="no" type="failure">could not read</output>
253
<output regex="no" type="failure">dump event</output>
254
<output regex="no" type="failure">DDRInteractiveCommandException</output>
255
</test>
256
257
<test id="Run !shrc bytesstats">
258
<command command="$JDMPVIEW_EXE$">
259
<arg>-core $DUMPFILE1$</arg>
260
<input>!shrc bytestats</input>
261
<input>quit</input>
262
</command>
263
<output regex="no" type="success">BYTEDATA</output>
264
<output regex="no" type="failure">UNKNOWN(</output>
265
<output regex="no" type="failure">no shared cache</output>
266
<output regex="no" type="failure">unable to read</output>
267
<output regex="no" type="failure">could not read</output>
268
<output regex="no" type="failure">dump event</output>
269
<output regex="no" type="failure">DDRInteractiveCommandException</output>
270
</test>
271
272
<test id="Run !shrc findclass">
273
<command command="$JDMPVIEW_EXE$">
274
<arg>-core $DUMPFILE1$</arg>
275
<input>!shrc findclass org/openj9/test/ivj/Disk</input>
276
<input>quit</input>
277
</command>
278
<output regex="no" type="success">ROMCLASS: org/openj9/test/ivj/Disk</output>
279
<output regex="no" type="failure">no shared cache</output>
280
<output regex="no" type="failure">unable to read</output>
281
<output regex="no" type="failure">could not read</output>
282
<output regex="no" type="failure">dump event</output>
283
<output regex="no" type="failure">DDRInteractiveCommandException</output>
284
</test>
285
286
<test id="Run !shrc findclass for modcontext">
287
<command command="$JDMPVIEW_EXE$">
288
<arg>-core $DUMPFILE1$</arg>
289
<input>!shrc findclass java/lang/Object</input>
290
<input>quit</input>
291
</command>
292
<output regex="no" type="success">mod1</output>
293
<output regex="no" type="required" >2:</output>
294
<output regex="no" type="failure">no shared cache</output>
295
<output regex="no" type="failure">unable to read</output>
296
<output regex="no" type="failure">could not read</output>
297
<output regex="no" type="failure">dump event</output>
298
<output regex="no" type="failure">DDRInteractiveCommandException</output>
299
</test>
300
301
<test id="Run !shrc findclassp">
302
<command command="$JDMPVIEW_EXE$">
303
<arg>-core $DUMPFILE1$</arg>
304
<input>!shrc findclassp org/openj9/test/ivj</input>
305
<input>quit</input>
306
</command>
307
<output regex="no" type="success">ROMCLASS: org/openj9/test/ivj/Disk</output>
308
<output regex="no" type="failure">no shared cache</output>
309
<output regex="no" type="failure">unable to read</output>
310
<output regex="no" type="failure">could not read</output>
311
<output regex="no" type="failure">dump event</output>
312
<output regex="no" type="failure">DDRInteractiveCommandException</output>
313
</test>
314
315
<test id="Run !shrc aotstats">
316
<command command="$JDMPVIEW_EXE$">
317
<arg>-core $DUMPFILE1$</arg>
318
<input>!shrc aotstats</input>
319
<input>quit</input>
320
</command>
321
<output regex="no" type="success" >AOT data !</output>
322
<output regex="no" type="failure">no shared cache</output>
323
<output regex="no" type="failure">unable to read</output>
324
<output regex="no" type="failure">could not read</output>
325
<output regex="no" type="failure">dump event</output>
326
<output regex="no" type="failure">DDRInteractiveCommandException</output>
327
</test>
328
329
<test id="Run !shrc findaot">
330
<command command="$JDMPVIEW_EXE$">
331
<arg>-core $DUMPFILE1$</arg>
332
<!-- "solve" is the core method in Hanoi -->
333
<input>!shrc findaot solve</input>
334
<input>quit</input>
335
</command>
336
<output regex="no" type="success" >solve(ILorg/openj9/test/ivj/Post</output>
337
<output regex="no" type="failure">no shared cache</output>
338
<output regex="no" type="failure">unable to read</output>
339
<output regex="no" type="failure">could not read</output>
340
<output regex="no" type="failure">dump event</output>
341
<output regex="no" type="failure">DDRInteractiveCommandException</output>
342
</test>
343
344
<test id="Run !shrc findaotp">
345
<command command="$JDMPVIEW_EXE$">
346
<arg>-core $DUMPFILE1$</arg>
347
<input>!shrc findaotp sol</input>
348
<input>quit</input>
349
</command>
350
<output regex="no" type="success" >solve(ILorg/openj9/test/ivj/Post</output>
351
<output regex="no" type="failure">no shared cache</output>
352
<output regex="no" type="failure">unable to read</output>
353
<output regex="no" type="failure">could not read</output>
354
<output regex="no" type="failure">dump event</output>
355
<output regex="no" type="failure">DDRInteractiveCommandException</output>
356
</test>
357
358
<test id="Run !shrc incache 256">
359
<command command="$JDMPVIEW_EXE$">
360
<arg>-core $DUMPFILE1$</arg>
361
<input>!shrc incache 256</input>
362
<input>quit</input>
363
</command>
364
<output regex="yes" javaUtilPattern="yes" type="success">0x(0)*100 is not in the shared cache</output>
365
<output regex="no" type="failure">no shared cache</output>
366
<output regex="no" type="failure">unable to read</output>
367
<output regex="no" type="failure">could not read</output>
368
<output regex="no" type="failure">dump event</output>
369
<output regex="no" type="failure">DDRInteractiveCommandException</output>
370
</test>
371
372
<test id="Run !shrc method 256">
373
<command command="$JDMPVIEW_EXE$">
374
<arg>-core $DUMPFILE1$</arg>
375
<input>!shrc method 256</input>
376
<input>quit</input>
377
</command>
378
<output regex="yes" javaUtilPattern="yes" type="success">!j9rommethod 0x(0)*100 not found in cache</output>
379
<output regex="no" type="failure">no shared cache</output>
380
<output regex="no" type="failure">unable to read</output>
381
<output regex="no" type="failure">could not read</output>
382
<output regex="no" type="failure">dump event</output>
383
<output regex="no" type="failure">DDRInteractiveCommandException</output>
384
</test>
385
386
<test id="Run !shrc rtflags">
387
<command command="$JDMPVIEW_EXE$">
388
<arg>-core $DUMPFILE1$</arg>
389
<input>!shrc rtflags</input>
390
<input>quit</input>
391
</command>
392
<output regex="no" type="success">Printing the shared classes runtime flags</output>
393
<output regex="no" type="required">RUNTIMEFLAG</output>
394
<output regex="no" type="failure">Type !shrc to see all the valid options</output>
395
<output regex="no" type="failure">no shared cache</output>
396
<output regex="no" type="failure">unable to read</output>
397
<output regex="no" type="failure">could not read</output>
398
<output regex="no" type="failure">dump event</output>
399
<output regex="no" type="failure">DDRInteractiveCommandException</output>
400
</test>
401
402
<!-- Add JIT/JIT data related testcases below, All AOT related testcases should be added before this line -->
403
404
<test id="Create core file for JIT profile tests">
405
<exec command="tso delete J9CORE2.DMP.*" platforms="zos_390-64.*" />
406
<exec command="tso delete J9CORE2.DMP" platforms="zos_390-31.*" />
407
<exec command="rm -f $DUMPFILE2$" />
408
<command>$EXE$ -Xmx4m -Xjit:disableAsyncCompilation,count=20 $SHARECLASSESOPTION$ $CP$ $XDUMP2$ $PROGRAM$</command>
409
<output regex="no" type="success">Moved disk 0 to 1</output>
410
<output regex="no" type="success">System dump written</output>
411
<!-- check for unexpected core dumps -->
412
<output regex="no" type="failure">0001.dmp</output>
413
</test>
414
415
<test id="Remove shared cache created for JIT profile tests">
416
<command>$EXE$ -Xshareclasses:name=$CACHENAME$,destroy</command>
417
<output regex="no" type="success">destroyed</output>
418
</test>
419
420
<test id="Check whether dump file exist in JIT profile tests">
421
<exec command="sh" capture="LOGNAME" platforms="zos.*" >
422
<arg>-c</arg>
423
<arg>echo $$LOGNAME</arg>
424
</exec>
425
<exec command="cp //'$LOGNAME$.J9CORE2.DMP.X001' $DUMPFILE2a$" platforms="zos_390-64.*" />
426
<exec command="cp //'$LOGNAME$.J9CORE2.DMP.X002' $DUMPFILE2b$" platforms="zos_390-64.*" />
427
<exec command="sh $CONCAT$ $DUMPFILE2a$ $DUMPFILE2b$ $DUMPFILE2$" platforms="zos_390-64.*" />
428
<exec command="cp //'$LOGNAME$.J9CORE2.DMP' $DUMPFILE2$" platforms="zos_390-31.*" />
429
<exec command="tso delete J9CORE2.DMP.*" platforms="zos_390-64.*" />
430
<exec command="tso delete J9CORE2.DMP" platforms="zos_390-31.*" />
431
<command>ls</command>
432
<output regex="no" type="success">$DUMPFILE2$</output>
433
</test>
434
435
<test id="Run !shrc jitpstats">
436
<command command="$JDMPVIEW_EXE$">
437
<arg>-core $DUMPFILE2$</arg>
438
<input>!shrc jitpstats</input>
439
<input>quit</input>
440
</command>
441
<output regex="no" type="success" >JITPROFILE data !</output>
442
<output regex="no" type="required">JITPROFILE data length</output>
443
<output regex="no" type="failure">no shared cache</output>
444
<output regex="no" type="failure">unable to read</output>
445
<output regex="no" type="failure">could not read</output>
446
<output regex="no" type="failure">dump event</output>
447
<output regex="no" type="failure">DDRInteractiveCommandException</output>
448
</test>
449
450
</suite>
451
452