Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/gptest/gptests.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2004, 2018 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 GP test" timeout="300">
28
<variable name="DUMP" value="-Xdump:system:none" />
29
<variable name="CP" value="-cp $Q$$RESJAR$$Q$ VMBench.GPTests.GPTest" />
30
<variable name="TARGET" value="GPTest" />
31
<variable name="OUTPUT" value="Unhandled exception" />
32
<variable name="THREADED" value=" " />
33
<variable name="FIBOUT" value=".*Fibonacci.*iterations.*" />
34
<variable name="UTILS_JAR" value="$UTILS_DIR$/utils.jar"/>
35
36
<!-- Verifies JVM barfs on -XCEEHDLR when not on zos_s390 (31-bit) -->
37
<test id="-XCEEHDLR not supported on non 31-bit zOS">
38
<command>$EXE$ -XCEEHDLR </command>
39
<output type="success" regex="no">Command-line option unrecognised</output>
40
</test>
41
42
<test id="reject -Xsignal:posixSignalHandler=cooperativeShutdown on non-zOS">
43
<command>$EXE$ -Xsignal:posixSignalHandler=cooperativeShutdown $CP$ </command>
44
<output type="success" regex="no">Command-line option unrecognised: -Xsignal:posixSignalHandler=cooperativeShutdown</output>
45
</test>
46
47
<loop index="I" from="1" until="3" inc="1">
48
49
<!-- Verifies that the arithmetic condition exception is converted to a Java ConditionException when -XCEEHDLR is present -->
50
<test id="user condition handler: float -XCEEHDLR $THREADED$">
51
<command>$EXE$ -XCEEHDLR $DUMP$ $CP$ $THREADED$ float</command>
52
<output type="required" regex="no">com.ibm.le.conditionhandling.ConditionException</output>
53
<output type="required" regex="no">Java_VMBench_GPTests_GPTest_gpFloat</output>
54
<output type="required" regex="no">facilityID: CEE</output>
55
<output type="required" regex="no">severity: 3</output>
56
<output type="required" regex="no">messageNumber: 3209</output>
57
<output type="required" regex="no">feedback token: 0x0 0x3 0xc 0x89 0x59 0xc3 0xc5 0xc5</output>
58
<output type="required" regex="no">at VMBench.GPTests.GPTest.gpFloat(Native Method)</output>
59
<output type="success" regex="no">Succesfully threw exception 10 times</output>
60
<output type="failure" regex="no">Unhandled exception</output>
61
</test>
62
63
<!-- Verifies that a SEGV is NOT converted to a Java ConditionException when -XCEEHDLR is NOT present -->
64
<test id="user condition handler: read -XCEEHDLR $THREADED$">
65
<command>$EXE$ -XCEEHDLR $DUMP$ $CP$ $THREADED$ read</command>
66
<output type="success" regex="no">Unhandled exception</output>
67
<output type="required" regex="no">Java_VMBench_GPTests_GPTest_gpRead</output>
68
<output type="failure" regex="no">com.ibm.le.conditionhandling.ConditionException</output>
69
</test>
70
71
<!-- Verifies that the arithmetic condition exception is NOT converted to a JavaCondition Exception when -XCEEHDLR is NOT present -->
72
<test id="user condition handler: float without -XCEEHDLR $THREADED$">
73
<command>$EXE$ $DUMP$ $CP$ $THREADED$ float</command>
74
<output type="success" regex="no">Unhandled exception</output>
75
<output type="required" regex="no">Java_VMBench_GPTests_GPTest_gpFloat</output>
76
<output type="failure" regex="no">com.ibm.le.conditionhandling.ConditionException</output>
77
</test>
78
79
<!-- Verifies that the JVM installs its own LE condition handler on VM callin by verifying the one registered by the native does NOT get invoked -->
80
<test id="user condition handler: callin -XCEEHDLR $THREADED$">
81
<command>$EXE$ -XCEEHDLR $DUMP$ $CP$ $THREADED$ callin</command>
82
<output type="success" regex="no">Unhandled exception</output>
83
<output type="required" regex="no">Java_VMBench_GPTests_GPTest_gpRead</output>
84
<output type="failure" regex="no">gptest_le_condition_handler invoked</output>
85
</test>
86
87
<!-- Verifies that without -XCEEHDLR the JVM does not register a condition handler on vmEntry, by making sure the one registered by the native DOES get invoked -->
88
<test id="user condition handler: callin without -XCEEHDLR $THREADED$">
89
<command>$EXE$ $DUMP$ $CP$ $THREADED$ callin</command>
90
<output type="success" regex="no">gptest_user_condition_handler invoked</output>
91
<output type="required" regex="no">Unhandled exception</output>
92
</test>
93
94
<test id="abort $THREADED$">
95
<command>$EXE$ $DUMP$ $CP$ $THREADED$ abort</command>
96
<output type="success" regex="no">Processing dump event "abort"</output>
97
<output type="required" regex="no">Processed dump event "abort"</output>
98
</test>
99
100
<test id="abort -Xsignal:posixSignalHandler=cooperativeShutdown $THREADED$">
101
<command>$EXE$ -Xsignal:posixSignalHandler=cooperativeShutdown $DUMP$ $CP$ $THREADED$ abort</command>
102
<output type="success" regex="no">Processing dump event "abort"</output>
103
<output type="required" regex="no">Processed dump event "abort"</output>
104
<output type="required" regex="no">CEE3250C The system or user abend U3565</output>
105
</test>
106
107
<test id="softwareFloat $THREADED$">
108
<command>$EXE$ $DUMP$ $CP$ $THREADED$ softwareFloat</command>
109
<output type="success" regex="no">Processing dump event</output>
110
<output type="required" regex="no">Processed dump event</output>
111
</test>
112
113
<test id="softwareFloat -Xsignal:posixSignalHandler=cooperativeShutdown $THREADED$">
114
<command>$EXE$ -Xsignal:posixSignalHandler=cooperativeShutdown $DUMP$ $CP$ $THREADED$ softwareFloat</command>
115
<output type="success" regex="no">CEE3250C The system or user abend U3565</output>
116
</test>
117
118
<test id="hardwareFloat $THREADED$">
119
<command>$EXE$ $DUMP$ $CP$ $THREADED$ hardwareFloat</command>
120
<output type="success" regex="no">Unhandled exception</output>
121
</test>
122
123
<test id="hardwareFloat -Xsignal:posixSignalHandler=cooperativeShutdown $THREADED$">
124
<command>$EXE$ -Xsignal:posixSignalHandler=cooperativeShutdown $DUMP$ $CP$ $THREADED$ hardwareFloat</command>
125
<output type="success" regex="no">Unhandled exception</output>
126
<output type="failure" regex="no">Processing dump event "abort"</output>
127
<output type="required" regex="no">CEE3209S The system detected a fixed-point divide exception (System Completion Code=0C9)</output>
128
</test>
129
130
<test id="softwareRead $THREADED$">
131
<command>$EXE$ $DUMP$ $CP$ $THREADED$ softwareRead</command>
132
<output type="success" regex="no">Processing dump event</output>
133
<output type="required" regex="no">Processed dump event</output>
134
</test>
135
136
<test id="softwareRead -Xsignal:posixSignalHandler=cooperativeShutdown $THREADED$">
137
<command>$EXE$ -Xsignal:posixSignalHandler=cooperativeShutdown $DUMP$ $CP$ $THREADED$ softwareRead</command>
138
<output type="success" regex="no">Unhandled exception</output>
139
<output type="required" regex="no">CEE3250C The system or user abend U3565</output>
140
</test>
141
142
<test id="hardwareRead $THREADED$">
143
<command>$EXE$ $DUMP$ $CP$ $THREADED$ hardwareRead</command>
144
<output type="success" regex="no">Unhandled exception</output>
145
</test>
146
147
<test id="hardwareRead -Xsignal:posixSignalHandler=cooperativeShutdown $THREADED$">
148
<command>$EXE$ -Xsignal:posixSignalHandler=cooperativeShutdown $DUMP$ $CP$ $THREADED$ hardwareRead</command>
149
<output type="success" regex="no">Unhandled exception</output>
150
<output type="failure" regex="no">Processing dump event "abort"</output>
151
<output type="required" regex="no">CEE3204S The system detected a protection exception (System Completion Code=0C4).</output>
152
</test>
153
154
<!-- Verifies that a hardware float is NOT converted to a Java ConditionException when -Xsignal:userConditionHandler=percolate is present, and:
155
<!-- - diagnostics are generated -->
156
<!-- - the condition is percolated -->
157
<test id="hardware float -Xsignal:userConditionHandler=percolate $THREADED$">
158
<command>$EXE$ -Xsignal:userConditionHandler=percolate $DUMP$ $CP$ $THREADED$ hardwareFloat</command>
159
<output type="success" regex="no">Unhandled exception</output>
160
<output type="required" regex="no">Java_VMBench_GPTests_GPTest_gpHardwareFloat</output>
161
<output type="required" regex="no">Java dump written to</output>
162
<output type="required" regex="no">Snap dump written to</output>
163
<output type="required" regex="no">Processed dump event "gpf"</output>
164
<output type="required" regex="no">CEE3209S The system detected a fixed-point divide exception (System Completion Code=0C9)</output>
165
<output type="failure" regex="no">com.ibm.le.conditionhandling.ConditionException</output>
166
<output type="failure" regex="no">JVMJ9VM129E</output>
167
</test>
168
169
170
<!-- Verifies that a software float is NOT converted to a Java ConditionException when -Xsignal:userConditionHandler=percolate is present, and:
171
<!-- - diagnostics are generated -->
172
<!-- - the condition is percolated -->
173
<test id="software float -Xsignal:userConditionHandler=percolate $THREADED$">
174
<command>$EXE$ -Xsignal:userConditionHandler=percolate $DUMP$ $CP$ $THREADED$ softwareFloat</command>
175
<output type="success" regex="no">Unhandled exception</output>
176
<output type="required" regex="no">Java_VMBench_GPTests_GPTest_gpSoftwareFloat</output>
177
<output type="required" regex="no">Java dump written to</output>
178
<output type="required" regex="no">Snap dump written to</output>
179
<output type="required" regex="no">Processed dump event "gpf"</output>
180
<output type="required" regex="no">CEE5201S The signal SIGFPE was received</output>
181
<output type="failure" regex="no">com.ibm.le.conditionhandling.ConditionException</output>
182
<output type="failure" regex="no">Application resumed execution after handling an unrecoverable condition and illegally returned to, or called back into, Java</output>
183
</test>
184
185
<!-- Verifies that with -Xsignal:userConditionHandler=percolate if the native user condition handler illegally resumes execution and calls back into the VM after a crash, that the trace assert is thrown -->
186
<test id="callInAndTriggerGPReadThenResumeAndCallInAgain with -Xsignal:userConditionHandler=percolate $THREADED$">
187
<command>$EXE$ -Xsignal:userConditionHandler=percolate $DUMP$ $CP$ $THREADED$ callInAndTriggerGPReadThenResumeAndCallInAgain</command>
188
<output type="success" regex="no">Unhandled exception</output>
189
<output type="success" regex="no">Entry_Name=Java_VMBench_GPTests_GPTest_gpRead</output>
190
<output type="required" regex="no">Java dump written to</output>
191
<output type="required" regex="no">Snap dump written to</output>
192
<output type="required" regex="no">Processed dump event "gpf"</output>
193
<output type="required" regex="no">JVMJ9VM129E</output>
194
<output type="required" regex="no">JVMJ9VM131E Terminating process using CEE3AB2() with abend 3565, reason 17, cleanup 0</output>
195
</test>
196
197
<!-- Verifies that with -Xsignal:userConditionHandler=percolate if the native user condition handler illegally resumes execution and returns back to Java after a crash, that the trace assert is thrown -->
198
<test id="callInAndTriggerGPReadThenResumeAndReturnToJava with -Xsignal:userConditionHandler=percolate $THREADED$">
199
<command>$EXE$ -Xsignal:userConditionHandler=percolate $DUMP$ $CP$ $THREADED$ callInAndTriggerGPReadThenResumeAndReturnToJava</command>
200
<output type="success" regex="no">Unhandled exception</output>
201
<output type="success" regex="no">Entry_Name=Java_VMBench_GPTests_GPTest_gpRead</output>
202
<output type="required" regex="no">Java dump written to</output>
203
<output type="required" regex="no">Snap dump written to</output>
204
<output type="required" regex="no">Processed dump event "gpf"</output>
205
<output type="required" regex="no">JVMJ9VM129E</output>
206
<output type="required" regex="no">JVMJ9VM131E Terminating process using CEE3AB2() with abend 3565, reason 17, cleanup 0</output>
207
</test>
208
209
<!-- Verifies that with -Xsignal:userConditionHandler=percolate if the native user condition handler illegally resumes execution and returns back to the JIT after a crash, that the trace assert is thrown -->
210
<!-- - the test is implemented such that the java method returned to by the native is JITed -->
211
<test id="callInAndTriggerGPReadThenResumeAndReturnToJIT with -Xsignal:userConditionHandler=percolate $THREADED$">
212
<command>$EXE$ -Xjit:count=0 -Xsignal:userConditionHandler=percolate $DUMP$ $CP$ $THREADED$ callInAndTriggerGPReadThenResumeAndReturnToJIT</command>
213
<output type="success" regex="no">Unhandled exception</output>
214
<output type="success" regex="no">Entry_Name=Java_VMBench_GPTests_GPTest_gpRead</output>
215
<output type="required" regex="no">Java dump written to</output>
216
<output type="required" regex="no">Snap dump written to</output>
217
<output type="required" regex="no">Processed dump event "gpf"</output>
218
<output type="required" regex="no">JVMJ9VM130E</output>
219
<output type="required" regex="no">JVMJ9VM131E Terminating process using CEE3AB2() with abend 3565, reason 16, cleanup 0.</output>
220
</test>
221
222
<test id="glaunch fib example">
223
<command>$GLAUNCH$ $JVMLIBPATH$ $JVM_OPTIONS$ $DUMP$ -cp $UTILS_JAR$ $FIBTARGET$</command>
224
<output type="success" regex="yes">$FIBOUT$</output>
225
</test>
226
227
<!-- glaunch encounters segmentation fault before JVM is initialized -->
228
<test id="glaunch -Xsignal:userConditionHandler=percolate -GgpfBeforeVMInit" >
229
<command>$GLAUNCH$ $JVMLIBPATH$ $JVM_OPTIONS$ -GgpfBeforeVMInit -Xsignal:userConditionHandler=percolate $DUMP$ -cp $UTILS_JAR$ $FIBTARGET$</command>
230
<output type="failure" regex="no">Processing dump event</output>
231
<output type="failure" regex="no">Unhandled exception</output>
232
<output type="success" regex="no">CEE3204S The system detected a protection exception (System Completion Code=0C4)</output>
233
</test>
234
235
<!-- glaunch encounters segmentation fault after main method is called -->
236
<test id="glaunch -Xsignal:userConditionHandler=percolate -GgpfAfterMain" >
237
<command>$GLAUNCH$ $JVMLIBPATH$ $JVM_OPTIONS$ -GgpfAfterMain -Xsignal:userConditionHandler=percolate $DUMP$ -cp $UTILS_JAR$ $FIBTARGET$</command>
238
<output type="failure" regex="no">Processing dump event</output>
239
<output type="failure" regex="no">Unhandled exception</output>
240
<output type="success" regex="no">CEE3204S The system detected a protection exception (System Completion Code=0C4)</output>
241
<output type="required" regex="yes">$FIBOUT$</output>
242
</test>
243
244
<variable name="THREADED" value="thread" />
245
</loop>
246
247
</suite>
248