Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/modularityddrtests/modularityddrtests11.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2018, 2022 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 modularity ddr command Tests" timeout="600">
28
29
<variable name="PROGRAM" value="-version" />
30
<variable name="DUMPFILE" value="j9corep.dmp" />
31
<variable name="DUMPFILE_DENY" value="j9cored.dmp" />
32
<variable name="DUMPDIR" value="dumpdir" />
33
<variable name="XDUMP" value="-Xdump:system:file=$DUMPFILE$,events=vmstop" />
34
<variable name="XDUMP_DENY" value="-Xdump:system:file=$DUMPFILE_DENY$,events=vmstop" />
35
36
<!-- override the -Xdump command on z/OS -->
37
<variable name="XDUMP" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORE.DMP,events=vmstop,request=exclusive+compact" platforms="zos.*" />
38
<variable name="XDUMP_DENY" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORED.DMP,events=vmstop,request=exclusive+compact" platforms="zos.*" />
39
40
<test id="Create core file --illegal-access=permit">
41
<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />
42
<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />
43
<exec command="rm -f $DUMPFILE$" />
44
<command>$EXE$ -Xmx4m $XDUMP$ --illegal-access=permit $PROGRAM$</command>
45
<output regex="no" type="success">System dump written</output>
46
<!-- check for unexpected core dumps -->
47
<output regex="no" type="failure">0001.dmp</output>
48
</test>
49
50
<test id="Create core file --illegal-access=deny">
51
<exec command="tso delete J9CORED.DMP.*" platforms="zos_390-64.*" />
52
<exec command="tso delete J9CORED.DMP" platforms="zos_390-31.*" />
53
<exec command="rm -f $DUMPFILE_DENY$" />
54
<command>$EXE$ -Xmx4m $XDUMP_DENY$ --illegal-access=deny $PROGRAM$</command>
55
<output regex="no" type="success">System dump written</output>
56
<!-- check for unexpected core dumps -->
57
<output regex="no" type="failure">0001.dmp</output>
58
<exec command="sh" capture="LOGNAME" platforms="zos.*" >
59
<arg>-c</arg>
60
<arg>echo $$LOGNAME</arg>
61
</exec>
62
</test>
63
64
<exec command="cp //'$LOGNAME$.J9CORE.DMP.X001' $DUMPFILE$" platforms="zos_390-64.*" />
65
<exec command="cp //'$LOGNAME$.J9CORE.DMP' $DUMPFILE$" platforms="zos_390-31.*" />
66
<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />
67
<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />
68
69
<exec command="cp //'$LOGNAME$.J9CORED.DMP.X001' $DUMPFILE_DENY$" platforms="zos_390-64.*" />
70
<exec command="cp //'$LOGNAME$.J9CORED.DMP' $DUMPFILE_DENY$" platforms="zos_390-31.*" />
71
<exec command="tso delete J9CORED.DMP.*" platforms="zos_390-64.*" />
72
<exec command="tso delete J9CORED.DMP" platforms="zos_390-31.*" />
73
74
<test id="Run !findallmodules">
75
<command command="$JDMPVIEW_EXE$">
76
<arg>-core $DUMPFILE$</arg>
77
<input>!findallmodules</input>
78
<input>quit</input>
79
</command>
80
<output regex="no" type="success">java.base</output>
81
<output regex="no" type="required">!j9module</output>
82
<output regex="no" type="failure">DDRInteractiveCommandException</output>
83
</test>
84
85
<test id="Run !findmodulebyname">
86
<command command="$JDMPVIEW_EXE$">
87
<arg>-core $DUMPFILE$</arg>
88
<input>!findmodulebyname java.base</input>
89
<input>quit</input>
90
</command>
91
<saveoutput regex="no" type="success" saveName="moduleAddr" splitIndex="1" splitBy="!j9module ">!j9module 0x</saveoutput>
92
<output regex="no" type="required">java.base</output>
93
<output regex="no" type="required">Found 1 module(s)</output>
94
<output regex="no" type="failure">DDRInteractiveCommandException</output>
95
96
</test>
97
98
<test id="Verify !findmodulebyname">
99
<command command="$JDMPVIEW_EXE$">
100
<arg>-core $DUMPFILE$</arg>
101
<input>echo $moduleAddr$</input>
102
<input>!j9module $moduleAddr$</input>
103
<input>quit</input>
104
</command>
105
<output regex="no" type="success">Fields for J9Module:</output>
106
<output regex="no" type="required">moduleName</output>
107
<output regex="no" type="required">version</output>
108
<output regex="no" type="required">readAccessHashTable</output>
109
<output regex="no" type="failure">DDRInteractiveCommandException</output>
110
<output regex="no" type="failure">&lt;FAULT&gt;</output>
111
112
</test>
113
114
<test id="Run !findmodulebyname find non-existing module">
115
<command command="$JDMPVIEW_EXE$">
116
<arg>-core $DUMPFILE$</arg>
117
<input>!findmodulebyname thisdoesnotexist</input>
118
<input>quit</input>
119
</command>
120
<output regex="no" type="success">thisdoesnotexist</output>
121
<output regex="no" type="required">Found 0 module(s)</output>
122
<output regex="no" type="failure">DDRInteractiveCommandException</output>
123
124
</test>
125
126
<test id="Run !dumpmoduleexports">
127
<command command="$JDMPVIEW_EXE$">
128
<arg>-core $DUMPFILE$</arg>
129
<input>!dumpmoduleexports $moduleAddr$</input>
130
<input>quit</input>
131
</command>
132
<output regex="no" type="success">!j9package 0x</output>
133
<saveoutput regex="no" type="required" saveName="packageAddr" splitIndex="1" splitBy="!j9package ">jdk/internal/vm </saveoutput>
134
<output regex="no" type="required">sun/net</output>
135
<output regex="no" type="required">java/util/stream</output>
136
<output regex="no" type="failure">DDRInteractiveCommandException</output>
137
138
</test>
139
140
<test id="Verify !dumpmoduleexports">
141
<command command="$JDMPVIEW_EXE$">
142
<arg>-core $DUMPFILE$</arg>
143
<input>!j9package $packageAddr$</input>
144
<input>quit</input>
145
</command>
146
<output regex="no" type="success">Fields for J9Package:</output>
147
<output regex="no" type="required">packageName</output>
148
<output regex="no" type="required">jdk/internal/vm</output>
149
<output regex="no" type="required">module</output>
150
<output regex="no" type="required">exportsHashTable</output>
151
<output regex="no" type="failure">DDRInteractiveCommandException</output>
152
<output regex="no" type="failure">&lt;FAULT&gt;</output>
153
154
</test>
155
156
<test id="Run !dumpmodulereads">
157
<command command="$JDMPVIEW_EXE$">
158
<arg>-core $DUMPFILE$</arg>
159
<input>!dumpmodulereads $moduleAddr$</input>
160
<input>quit</input>
161
</command>
162
<output regex="no" type="success">!j9module 0x</output>
163
<saveoutput regex="no" type="required" saveName="readModuleAddr" splitIndex="1" splitBy="!j9module ">openj9.cuda</saveoutput>
164
<output regex="no" type="required">jdk.net</output>
165
<output regex="no" type="required">java.se</output>
166
<output regex="no" type="failure">DDRInteractiveCommandException</output>
167
168
</test>
169
170
<test id="Verify !dumpmodulereads">
171
<command command="$JDMPVIEW_EXE$">
172
<arg>-core $DUMPFILE$</arg>
173
<input>!j9module $readModuleAddr$</input>
174
<input>quit</input>
175
</command>
176
<output regex="no" type="success">Fields for J9Module:</output>
177
<output regex="no" type="required">moduleName</output>
178
<output regex="no" type="required">version</output>
179
<output regex="no" type="required">readAccessHashTable</output>
180
<output regex="no" type="failure">DDRInteractiveCommandException</output>
181
<output regex="no" type="failure">&lt;FAULT&gt;</output>
182
183
</test>
184
185
<test id="Run !dumpmoduleexports">
186
<command command="$JDMPVIEW_EXE$">
187
<arg>-core $DUMPFILE$</arg>
188
<input>!dumpmoduleexports $moduleAddr$</input>
189
<input>quit</input>
190
</command>
191
<output regex="no" type="success">!j9package 0x</output>
192
<saveoutput regex="no" type="required" saveName="packageAddr" splitIndex="1" splitBy="!j9package ">jdk/internal/vm </saveoutput>
193
<output regex="no" type="required">sun/net</output>
194
<output regex="no" type="required">java/util/stream</output>
195
<output regex="no" type="failure">DDRInteractiveCommandException</output>
196
197
</test>
198
199
<test id="Verify !dumpmoduleexports">
200
<command command="$JDMPVIEW_EXE$">
201
<arg>-core $DUMPFILE$</arg>
202
<input>!j9package $packageAddr$</input>
203
<input>quit</input>
204
</command>
205
<output regex="no" type="success">Fields for J9Package:</output>
206
<output regex="no" type="required">packageName</output>
207
<output regex="no" type="required">jdk/internal/vm</output>
208
<output regex="no" type="required">module</output>
209
<output regex="no" type="required">exportsHashTable</output>
210
<output regex="no" type="failure">DDRInteractiveCommandException</output>
211
<output regex="no" type="failure">&lt;FAULT&gt;</output>
212
213
</test>
214
215
<test id="Run !dumpmodulereads">
216
<command command="$JDMPVIEW_EXE$">
217
<arg>-core $DUMPFILE$</arg>
218
<input>!dumpmodulereads $moduleAddr$</input>
219
<input>quit</input>
220
</command>
221
<output regex="no" type="success">!j9module 0x</output>
222
<saveoutput regex="no" type="required" saveName="readModuleAddr" splitIndex="1" splitBy="!j9module ">openj9.cuda</saveoutput>
223
<output regex="no" type="required">jdk.net</output>
224
<output regex="no" type="required">java.se</output>
225
<output regex="no" type="failure">DDRInteractiveCommandException</output>
226
227
</test>
228
229
<test id="Verify !dumpmodulereads">
230
<command command="$JDMPVIEW_EXE$">
231
<arg>-core $DUMPFILE$</arg>
232
<input>!j9module $readModuleAddr$</input>
233
<input>quit</input>
234
</command>
235
<output regex="no" type="success">Fields for J9Module:</output>
236
<output regex="no" type="required">moduleName</output>
237
<output regex="no" type="required">version</output>
238
<output regex="no" type="required">readAccessHashTable</output>
239
<output regex="no" type="failure">DDRInteractiveCommandException</output>
240
<output regex="no" type="failure">&lt;FAULT&gt;</output>
241
242
</test>
243
244
<test id="Run !findallreads">
245
<command command="$JDMPVIEW_EXE$">
246
<arg>-core $DUMPFILE$</arg>
247
<input>!findallreads $readModuleAddr$</input>
248
<input>quit</input>
249
</command>
250
<output regex="no" type="success">!j9module 0x</output>
251
<output regex="no" type="required">java.base</output>
252
<output regex="no" type="required">Found 1 module(s)</output>
253
<output regex="no" type="failure">DDRInteractiveCommandException</output>
254
255
</test>
256
257
<test id="Run !dumpmoduledirectedexports">
258
<command command="$JDMPVIEW_EXE$">
259
<arg>-core $DUMPFILE$</arg>
260
<input>!dumpmoduledirectedexports $packageAddr$</input>
261
<input>quit</input>
262
</command>
263
<output regex="no" type="success">!j9module 0x</output>
264
<output regex="no" type="required">jdk.management.agent</output>
265
<output regex="no" type="required">jdk.internal.jvmstat</output>
266
<output regex="no" type="failure">DDRInteractiveCommandException</output>
267
268
</test>
269
270
<test id="Run !dumpallclassesinmodule">
271
<command command="$JDMPVIEW_EXE$">
272
<arg>-core $DUMPFILE$</arg>
273
<input>!dumpallclassesinmodule $moduleAddr$</input>
274
<input>quit</input>
275
</command>
276
<output regex="no" type="success">!j9class 0x</output>
277
<output regex="no" type="required">java/lang</output>
278
<output regex="no" type="required">classes in !j9module</output>
279
<output regex="no" type="failure">DDRInteractiveCommandException</output>
280
281
</test>
282
283
<!-- Test !findmodules and all options -->
284
<test id="Run !findmodules">
285
<command command="$JDMPVIEW_EXE$">
286
<arg>-core</arg>
287
<arg>$DUMPFILE$</arg>
288
<input>!findmodules</input>
289
<input>quit</input>
290
</command>
291
<output regex="no" type="success">java.base</output>
292
<output regex="no" type="required">!j9module 0x</output>
293
<output regex="no" type="failure">DDRInteractiveCommandException</output>
294
</test>
295
296
<test id="Run !findmodules all">
297
<command command="$JDMPVIEW_EXE$">
298
<arg>-core</arg>
299
<arg>$DUMPFILE$</arg>
300
<input>!findmodules all</input>
301
<input>quit</input>
302
</command>
303
<saveoutput regex="no" type="required" saveName="javaCompilerModuleAddr" splitIndex="1" splitBy="!j9module ">java.compiler</saveoutput>
304
<output regex="no" type="success">java.base</output>
305
<output regex="no" type="required">!j9module 0x</output>
306
<output regex="no" type="failure">DDRInteractiveCommandException</output>
307
</test>
308
309
<test id="Run !findmodules name --illegal-access=permit">
310
<command command="$JDMPVIEW_EXE$">
311
<arg>-core</arg>
312
<arg>$DUMPFILE$</arg>
313
<input>!findmodules name java.base</input>
314
<input>quit</input>
315
</command>
316
<saveoutput regex="no" type="success" saveName="javaBaseModuleAddr" splitIndex="1" splitBy="!j9module ">!j9module 0x</saveoutput>
317
<output regex="no" type="required">java.base</output>
318
<output regex="no" type="required">Found 1 module</output>
319
<output regex="no" type="failure">DDRInteractiveCommandException</output>
320
</test>
321
322
<test id="Run !findmodules name --illegal-access=deny">
323
<command command="$JDMPVIEW_EXE$">
324
<arg>-core</arg>
325
<arg>$DUMPFILE_DENY$</arg>
326
<input>!findmodules name java.base</input>
327
<input>quit</input>
328
</command>
329
<saveoutput regex="no" type="success" saveName="javaBaseModuleAddrDeny" splitIndex="1" splitBy="!j9module ">!j9module 0x</saveoutput>
330
<output regex="no" type="required">java.base</output>
331
<output regex="no" type="required">Found 1 module</output>
332
<output regex="no" type="failure">DDRInteractiveCommandException</output>
333
</test>
334
335
<test id="Verify !findmodules name">
336
<command command="$JDMPVIEW_EXE$">
337
<arg>-core</arg>
338
<arg>$DUMPFILE$</arg>
339
<input>!j9module $javaBaseModuleAddr$</input>
340
<input>quit</input>
341
</command>
342
<output regex="no" type="success">Fields for J9Module:</output>
343
<output regex="no" type="required">moduleName</output>
344
<output regex="no" type="required">version</output>
345
<output regex="no" type="required">readAccessHashTable</output>
346
<output regex="no" type="failure">DDRInteractiveCommandException</output>
347
<output regex="no" type="failure">&lt;FAULT&gt;</output>
348
</test>
349
350
<test id="Run !findmodules name on non-existing module">
351
<command command="$JDMPVIEW_EXE$">
352
<arg>-core</arg>
353
<arg>$DUMPFILE$</arg>
354
<input>!findmodules name thisdoesnotexist</input>
355
<input>quit</input>
356
</command>
357
<output regex="no" type="success">Found 0 modules</output>
358
<output regex="no" type="failure">!j9module</output>
359
<output regex="no" type="failure">DDRInteractiveCommandException</output>
360
</test>
361
362
<test id="Run !findmodules requires">
363
<command command="$JDMPVIEW_EXE$">
364
<arg>-core</arg>
365
<arg>$DUMPFILE$</arg>
366
<input>!findmodules requires java.base</input>
367
<input>quit</input>
368
</command>
369
<output regex="no" type="success">jdk.compiler</output>
370
<output regex="no" type="required">!j9module 0x</output>
371
<output regex="no" type="failure">DDRInteractiveCommandException</output>
372
</test>
373
374
<test id="Run !findmodules requires on non-existing module">
375
<command command="$JDMPVIEW_EXE$">
376
<arg>-core</arg>
377
<arg>$DUMPFILE$</arg>
378
<input>!findmodules requires thisdoesnotexist</input>
379
<input>quit</input>
380
</command>
381
<output regex="no" type="success">Found 0 modules</output>
382
<output regex="no" type="failure">!j9module</output>
383
<output regex="no" type="failure">DDRInteractiveCommandException</output>
384
</test>
385
386
<test id="Run !findmodules package">
387
<command command="$JDMPVIEW_EXE$">
388
<arg>-core</arg>
389
<arg>$DUMPFILE$</arg>
390
<input>!findmodules package java/io</input>
391
<input>quit</input>
392
</command>
393
<output regex="no" type="success">java.base</output>
394
<output regex="no" type="required">!j9module 0x</output>
395
<output regex="no" type="required">Found 1 module</output>
396
<output regex="no" type="failure">DDRInteractiveCommandException</output>
397
</test>
398
399
<test id="Run !findmodules package on non-existing package">
400
<command command="$JDMPVIEW_EXE$">
401
<arg>-core</arg>
402
<arg>$DUMPFILE$</arg>
403
<input>!findmodules package thisdoesnotexist</input>
404
<input>quit</input>
405
</command>
406
<output regex="no" type="success">Found 0 modules</output>
407
<output regex="no" type="failure">!j9module</output>
408
<output regex="no" type="failure">DDRInteractiveCommandException</output>
409
</test>
410
411
<test id="Run !findmodules help">
412
<command command="$JDMPVIEW_EXE$">
413
<arg>-core</arg>
414
<arg>$DUMPFILE$</arg>
415
<input>!findmodules help</input>
416
<input>quit</input>
417
</command>
418
<output regex="no" type="success">Usage:</output>
419
<output regex="no" type="required">!findmodules all</output>
420
<output regex="no" type="required">!findmodules name</output>
421
<output regex="no" type="required">!findmodules requires</output>
422
<output regex="no" type="required">!findmodules package</output>
423
<output regex="no" type="failure">Argument failed to parse or was parsed to an unhandled subcommand.</output>
424
<output regex="no" type="failure">DDRInteractiveCommandException</output>
425
</test>
426
427
<test id="Run !findmodules with an invalid subcommand">
428
<command command="$JDMPVIEW_EXE$">
429
<arg>-core</arg>
430
<arg>$DUMPFILE$</arg>
431
<input>!findmodules someInvalidOption</input>
432
<input>quit</input>
433
</command>
434
<output regex="no" type="success">Argument failed to parse or was parsed to an unhandled subcommand.</output>
435
<output regex="no" type="required">Usage:</output>
436
<output regex="no" type="required">!findmodules all</output>
437
<output regex="no" type="required">!findmodules name</output>
438
<output regex="no" type="required">!findmodules requires</output>
439
<output regex="no" type="required">!findmodules package</output>
440
<output regex="no" type="failure">DDRInteractiveCommandException</output>
441
</test>
442
443
<test id="Run !findmodules with too many arguments">
444
<command command="$JDMPVIEW_EXE$">
445
<arg>-core</arg>
446
<arg>$DUMPFILE$</arg>
447
<input>!findmodules multiple options</input>
448
<input>quit</input>
449
</command>
450
<output regex="no" type="success">Argument failed to parse or was parsed to an unhandled subcommand.</output>
451
<output regex="no" type="required">Usage:</output>
452
<output regex="no" type="required">!findmodules all</output>
453
<output regex="no" type="required">!findmodules name</output>
454
<output regex="no" type="required">!findmodules requires</output>
455
<output regex="no" type="required">!findmodules package</output>
456
<output regex="no" type="failure">DDRInteractiveCommandException</output>
457
</test>
458
459
<!-- Test !dumpmodule and all options-->
460
<test id="Run !dumpmodule --illegal-access=permit">
461
<command command="$JDMPVIEW_EXE$">
462
<arg>-core</arg>
463
<arg>$DUMPFILE$</arg>
464
<input>!dumpmodule $javaBaseModuleAddr$</input>
465
<input>quit</input>
466
</command>
467
<output regex="no" type="success">Module:</output>
468
<output regex="no" type="required">Exports:</output>
469
<output regex="no" type="required">Requires:</output>
470
<output regex="no" type="required">Exports java/nio/file/spi</output>
471
<output regex="no" type="required">!j9package 0x</output>
472
<output regex="no" type="required">Exports com/ibm/gpu/spi</output>
473
<output regex="no" type="required">to openj9.gpu</output>
474
<output regex="no" type="required">!j9module 0x</output>
475
<output regex="no" type="required">to ALL-UNNAMED</output>
476
<output regex="no" type="failure">DDRInteractiveCommandException</output>
477
</test>
478
479
<!-- Test !dumpmodule and all options-->
480
<test id="Run !dumpmodule --illegal-access=deny">
481
<command command="$JDMPVIEW_EXE$">
482
<arg>-core</arg>
483
<arg>$DUMPFILE_DENY$</arg>
484
<input>!dumpmodule $javaBaseModuleAddrDeny$</input>
485
<input>quit</input>
486
</command>
487
<output regex="no" type="success">Module:</output>
488
<output regex="no" type="required">Exports:</output>
489
<output regex="no" type="required">Requires:</output>
490
<output regex="no" type="required">Exports java/nio/file/spi</output>
491
<output regex="no" type="required">!j9package 0x</output>
492
<output regex="no" type="required">Exports com/ibm/gpu/spi</output>
493
<output regex="no" type="required">to openj9.gpu</output>
494
<output regex="no" type="required">!j9module 0x</output>
495
<output regex="no" type="failure">to ALL-UNNAMED</output>
496
<output regex="no" type="failure">DDRInteractiveCommandException</output>
497
</test>
498
499
<test id="Run !dumpmodule packages">
500
<command command="$JDMPVIEW_EXE$">
501
<arg>-core</arg>
502
<arg>$DUMPFILE$</arg>
503
<input>!dumpmodule packages $javaBaseModuleAddr$</input>
504
<input>quit</input>
505
</command>
506
<output regex="no" type="success">!j9package 0x</output>
507
<saveoutput regex="no" type="required" saveName="javaUtilPackageAddr" splitIndex="1" splitBy="!j9package ">java/util </saveoutput>
508
<output regex="no" type="failure">DDRInteractiveCommandException</output>
509
</test>
510
511
<test id="Verify !dumpmodule package">
512
<command command="$JDMPVIEW_EXE$">
513
<arg>-core</arg>
514
<arg>$DUMPFILE$</arg>
515
<input>!j9package $javaUtilPackageAddr$</input>
516
<input>quit</input>
517
</command>
518
<output regex="no" type="success">Fields for J9Package:</output>
519
<output regex="no" type="required">packageName</output>
520
<output regex="no" type="required">java/util</output>
521
<output regex="no" type="required">module</output>
522
<output regex="no" type="required">exportsHashTable</output>
523
<output regex="no" type="failure">DDRInteractiveCommandException</output>
524
<output regex="no" type="failure">&lt;FAULT&gt;</output>
525
</test>
526
527
<test id="Run !dumpmodule classes">
528
<command command="$JDMPVIEW_EXE$">
529
<arg>-core</arg>
530
<arg>$DUMPFILE$</arg>
531
<input>!dumpmodule classes $javaBaseModuleAddr$</input>
532
<input>quit</input>
533
</command>
534
<output regex="no" type="success">java/lang/Long</output>
535
<output regex="no" type="required">!j9class 0x</output>
536
<output regex="no" type="required">java/lang/Integer</output>
537
<output regex="no" type="failure">DDRInteractiveCommandException</output>
538
</test>
539
540
<test id="Run !dumpmodule requires">
541
<command command="$JDMPVIEW_EXE$">
542
<arg>-core</arg>
543
<arg>$DUMPFILE$</arg>
544
<input>!dumpmodule requires $javaCompilerModuleAddr$</input>
545
<input>quit</input>
546
</command>
547
<saveoutput regex="no" type="required" saveName="requiredModuleAddr" splitIndex="1" splitBy="!j9module ">!j9module 0x</saveoutput>
548
<output regex="no" type="success">!j9module 0x</output>
549
<output regex="no" type="required">java.base</output>
550
<output regex="no" type="failure">DDRInteractiveCommandException</output>
551
</test>
552
553
<test id="Verify !dumpmodule requires">
554
<command command="$JDMPVIEW_EXE$">
555
<arg>-core</arg>
556
<arg>$DUMPFILE$</arg>
557
<input>!j9module $requiredModuleAddr$</input>
558
<input>quit</input>
559
</command>
560
<output regex="no" type="success">Fields for J9Module:</output>
561
<output regex="no" type="required">moduleName</output>
562
<output regex="no" type="required">version</output>
563
<output regex="no" type="required">readAccessHashTable</output>
564
<output regex="no" type="failure">DDRInteractiveCommandException</output>
565
<output regex="no" type="failure">&lt;FAULT&gt;</output>
566
</test>
567
568
<test id="Run !dumpmodule exports --illegal-access=permit">
569
<command command="$JDMPVIEW_EXE$">
570
<arg>-core</arg>
571
<arg>$DUMPFILE$</arg>
572
<input>!dumpmodule exports $javaBaseModuleAddr$</input>
573
<input>quit</input>
574
</command>
575
<output regex="no" type="success">Exports java/nio/file/spi</output>
576
<output regex="no" type="required">!j9package 0x</output>
577
<output regex="no" type="required">Exports com/ibm/gpu/spi</output>
578
<output regex="no" type="required">to openj9.gpu</output>
579
<output regex="no" type="required">!j9module 0x</output>
580
<output regex="no" type="required">to ALL-UNNAMED</output>
581
<saveoutput regex="no" type="required" saveName="limitedExportPackage" splitIndex="1" splitBy="!j9package ">com/ibm/gpu/spi </saveoutput>
582
<output regex="no" type="failure">DDRInteractiveCommandException</output>
583
</test>
584
585
<test id="Run !dumpmodule exports --illegal-access=deny">
586
<command command="$JDMPVIEW_EXE$">
587
<arg>-core</arg>
588
<arg>$DUMPFILE_DENY$</arg>
589
<input>!dumpmodule exports $javaBaseModuleAddrDeny$</input>
590
<input>quit</input>
591
</command>
592
<output regex="no" type="success">Exports java/nio/file/spi</output>
593
<output regex="no" type="required">!j9package 0x</output>
594
<output regex="no" type="required">Exports com/ibm/gpu/spi</output>
595
<output regex="no" type="required">to openj9.gpu</output>
596
<output regex="no" type="required">!j9module 0x</output>
597
<output regex="no" type="failure">to ALL-UNNAMED</output>
598
<saveoutput regex="no" type="required" saveName="limitedExportPackageDeny" splitIndex="1" splitBy="!j9package ">com/ibm/gpu/spi </saveoutput>
599
<output regex="no" type="failure">DDRInteractiveCommandException</output>
600
</test>
601
602
<test id="Verify !dumpmodule exports">
603
<command command="$JDMPVIEW_EXE$">
604
<arg>-core</arg>
605
<arg>$DUMPFILE$</arg>
606
<input>!j9package $javaUtilPackageAddr$</input>
607
<input>quit</input>
608
</command>
609
<output regex="no" type="success">Fields for J9Package:</output>
610
<output regex="no" type="required">packageName</output>
611
<output regex="no" type="required">module</output>
612
<output regex="no" type="required">exportsHashTable</output>
613
<output regex="no" type="failure">DDRInteractiveCommandException</output>
614
<output regex="no" type="failure">&lt;FAULT&gt;</output>
615
</test>
616
617
<test id="Run !dumpmodule help">
618
<command command="$JDMPVIEW_EXE$">
619
<arg>-core</arg>
620
<arg>$DUMPFILE$</arg>
621
<input>!dumpmodule help</input>
622
<input>quit</input>
623
</command>
624
<output regex="no" type="success">Usage:</output>
625
<output regex="no" type="required">!dumpmodule all</output>
626
<output regex="no" type="required">!dumpmodule requires</output>
627
<output regex="no" type="required">!dumpmodule exports</output>
628
<output regex="no" type="required">!dumpmodule classes</output>
629
<output regex="no" type="required">!dumpmodule packages</output>
630
<output regex="no" type="failure">Argument failed to parse or was parsed to an unhandled subcommand.</output>
631
<output regex="no" type="failure">DDRInteractiveCommandException</output>
632
</test>
633
634
<test id="Run !dumpmodule with an invalid subcommand">
635
<command command="$JDMPVIEW_EXE$">
636
<arg>-core</arg>
637
<arg>$DUMPFILE$</arg>
638
<input>!dumpmodule someInvalidOption $javaBaseModuleAddr$</input>
639
<input>quit</input>
640
</command>
641
<output regex="no" type="success">Argument failed to parse or was parsed to an unhandled subcommand.</output>
642
<output regex="no" type="required">Usage:</output>
643
<output regex="no" type="required">!dumpmodule all</output>
644
<output regex="no" type="required">!dumpmodule requires</output>
645
<output regex="no" type="required">!dumpmodule exports</output>
646
<output regex="no" type="required">!dumpmodule classes</output>
647
<output regex="no" type="required">!dumpmodule packages</output>
648
<output regex="no" type="failure">DDRInteractiveCommandException</output>
649
</test>
650
651
<test id="Run !dumpmodule with too many arguments">
652
<command command="$JDMPVIEW_EXE$">
653
<arg>-core</arg>
654
<arg>$DUMPFILE$</arg>
655
<input>!dumpmodule too many options</input>
656
<input>quit</input>
657
</command>
658
<output regex="no" type="success">Argument failed to parse or was parsed to an unhandled subcommand.</output>
659
<output regex="no" type="required">Usage:</output>
660
<output regex="no" type="required">!dumpmodule all</output>
661
<output regex="no" type="required">!dumpmodule requires</output>
662
<output regex="no" type="required">!dumpmodule exports</output>
663
<output regex="no" type="required">!dumpmodule classes</output>
664
<output regex="no" type="required">!dumpmodule packages</output>
665
<output regex="no" type="failure">DDRInteractiveCommandException</output>
666
</test>
667
668
<test id="Run !dumpmodule with a non-numeric module address">
669
<command command="$JDMPVIEW_EXE$">
670
<arg>-core</arg>
671
<arg>$DUMPFILE$</arg>
672
<input>!dumpmodule NotANumber</input>
673
<input>quit</input>
674
</command>
675
<output regex="no" type="success">Problem running command:</output>
676
<output regex="no" type="required">The argument "NotANumber" is not a valid number. It should be the address of a J9Module.</output>
677
</test>
678
679
<test id="Run !dumpmodule with an invalid module address">
680
<command command="$JDMPVIEW_EXE$">
681
<arg>-core</arg>
682
<arg>$DUMPFILE$</arg>
683
<input>!dumpmodule 0x0</input>
684
<input>quit</input>
685
</command>
686
<output regex="no" type="success">Memory Fault reading 0x</output>
687
<output regex="no" type="required">Problem running command:</output>
688
<output regex="no" type="required">The argument "0x0" is not the address of a valid J9Module.</output>
689
</test>
690
691
<!-- Test !dumppackage and all options-->
692
<test id="Run !dumppackage on a globally exported package">
693
<command command="$JDMPVIEW_EXE$">
694
<arg>-core</arg>
695
<arg>$DUMPFILE$</arg>
696
<input>!dumppackage $javaUtilPackageAddr$</input>
697
<input>quit</input>
698
</command>
699
<output regex="no" type="success">Package is exported to all</output>
700
<output regex="no" type="failure">DDRInteractiveCommandException</output>
701
</test>
702
703
<test id="Run !dumppackage on a package exported to specific modules">
704
<command command="$JDMPVIEW_EXE$">
705
<arg>-core</arg>
706
<arg>$DUMPFILE$</arg>
707
<input>!dumppackage $limitedExportPackage$</input>
708
<input>quit</input>
709
</command>
710
<output regex="no" type="required">Exported to:</output>
711
<output regex="no" type="success">openj9.gpu</output>
712
<output regex="no" type="required">!j9module </output>
713
<output regex="no" type="failure">DDRInteractiveCommandException</output>
714
</test>
715
716
<test id="Run !dumppackage classes">
717
<command command="$JDMPVIEW_EXE$">
718
<arg>-core</arg>
719
<arg>$DUMPFILE$</arg>
720
<input>!dumppackage classes $javaUtilPackageAddr$</input>
721
<input>quit</input>
722
</command>
723
<saveoutput regex="no" type="success" saveName="queueClassAddr" splitIndex="1" splitBy="!j9class ">java/util/Queue</saveoutput>
724
<output regex="no" type="required">!j9class 0x</output>
725
<output regex="no" type="failure">DDRInteractiveCommandException</output>
726
</test>
727
728
<test id="Verify !dumppackage classes">
729
<command command="$JDMPVIEW_EXE$">
730
<arg>-core</arg>
731
<arg>$DUMPFILE$</arg>
732
<input>!j9class $queueClassAddr$</input>
733
<input>quit</input>
734
</command>
735
<output regex="no" type="success">J9Class at 0x</output>
736
<output regex="no" type="required">Fields for J9Class:</output>
737
<output regex="no" type="required">Class name: java/util/Queue</output>
738
<output regex="no" type="required">packageID</output>
739
<output regex="no" type="failure">DDRInteractiveCommandException</output>
740
<output regex="no" type="failure">&lt;FAULT&gt;</output>
741
</test>
742
743
<test id="Run !dumppackage help">
744
<command command="$JDMPVIEW_EXE$">
745
<arg>-core</arg>
746
<arg>$DUMPFILE$</arg>
747
<input>!dumppackage help</input>
748
<input>quit</input>
749
</command>
750
<output regex="no" type="success">Usage:</output>
751
<output regex="no" type="required">!dumppackage all</output>
752
<output regex="no" type="required">!dumppackage exportsTo</output>
753
<output regex="no" type="required">!dumppackage classes</output>
754
<output regex="no" type="failure">Argument failed to parse or was parsed to an unhandled subcommand.</output>
755
<output regex="no" type="failure">DDRInteractiveCommandException</output>
756
</test>
757
758
<test id="Run !dumppackage with an invalid subcommand">
759
<command command="$JDMPVIEW_EXE$">
760
<arg>-core</arg>
761
<arg>$DUMPFILE$</arg>
762
<input>!dumppackage someInvalidOption $javaUtilPackageAddr$</input>
763
<input>quit</input>
764
</command>
765
<output regex="no" type="success">Argument failed to parse or was parsed to an unhandled subcommand.</output>
766
<output regex="no" type="required">Usage:</output>
767
<output regex="no" type="required">!dumppackage all</output>
768
<output regex="no" type="required">!dumppackage exportsTo</output>
769
<output regex="no" type="required">!dumppackage classes</output>
770
<output regex="no" type="failure">DDRInteractiveCommandException</output>
771
</test>
772
773
<test id="Run !dumppackage with too many arguments">
774
<command command="$JDMPVIEW_EXE$">
775
<arg>-core</arg>
776
<arg>$DUMPFILE$</arg>
777
<input>!dumppackage too many options</input>
778
<input>quit</input>
779
</command>
780
<output regex="no" type="success">Argument failed to parse or was parsed to an unhandled subcommand.</output>
781
<output regex="no" type="required">Usage:</output>
782
<output regex="no" type="required">!dumppackage all</output>
783
<output regex="no" type="required">!dumppackage exportsTo</output>
784
<output regex="no" type="required">!dumppackage classes</output>
785
<output regex="no" type="failure">DDRInteractiveCommandException</output>
786
</test>
787
788
<test id="Run !dumppackage with a non-numeric package address">
789
<command command="$JDMPVIEW_EXE$">
790
<arg>-core</arg>
791
<arg>$DUMPFILE$</arg>
792
<input>!dumppackage NotANumber</input>
793
<input>quit</input>
794
</command>
795
<output regex="no" type="success">Problem running command:</output>
796
<output regex="no" type="required">The argument "NotANumber" is not a valid number. It should be the address of a J9Package.</output>
797
</test>
798
799
<test id="Run !dumppackage with an invalid package address">
800
<command command="$JDMPVIEW_EXE$">
801
<arg>-core</arg>
802
<arg>$DUMPFILE$</arg>
803
<input>!dumppackage 0x0</input>
804
<input>quit</input>
805
</command>
806
<output regex="no" type="success">Memory Fault reading 0x</output>
807
<output regex="no" type="required">Problem running command:</output>
808
</test>
809
</suite>
810
811