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