Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/cmdLineTest_J9tests/j9tests.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
2
3
<!--
4
Copyright (c) 2019, 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 Command-Line Option Tests" timeout="600">
28
<variable name="READIPINFOFORRAS" value="-XX:+ReadIPInfoForRAS"/>
29
<variable name="NOREADIPINFOFORRAS" value="-XX:-ReadIPInfoForRAS"/>
30
<variable name="READIPINFOFORRAS_MESSAGE" value="enabled network query to determine host name and IP address for RAS."/>
31
<variable name="NOREADIPINFOFORRAS_MESSAGE" value="disabled network query to determine host name and IP address for RAS."/>
32
33
<variable name="JVM_HEAP_LIMIT" value="-Xmx64m"/>
34
<variable name="ONOUTOFMEMORYERROR_EQUALS" value="-XX:OnOutOfMemoryError="/>
35
<variable name="ONOUTOFMEMORYERROR_JAR" value="-cp $Q$$JARPATH$$Q$ OnOutOfMemoryErrorTest"/>
36
<variable name="JAVALANGOUTOFMEMORYERROR" value="java.lang.OutOfMemoryError:"/>
37
38
<test id="Verify Generate a javacore to STDOUT">
39
<command>$EXE$ -Xdump:java:events=vmstart,file=/STDOUT/</command>
40
<output type="success" caseSensitive="yes" regex="no">TITLE subcomponent dump routine</output>
41
<output type="success" caseSensitive="yes" regex="no">END OF DUMP</output>
42
<output regex="no" type="failure">Command-line option unrecognised</output>
43
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
44
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
45
</test>
46
47
<test id="Verify Generate a javacore to STDERR">
48
<command>$EXE$ -Xdump:java:events=vmstart,file=/STDERR/</command>
49
<output type="success" caseSensitive="yes" regex="no">TITLE subcomponent dump routine</output>
50
<output type="success" caseSensitive="yes" regex="no">END OF DUMP</output>
51
<output regex="no" type="failure">Command-line option unrecognised</output>
52
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
53
<output type="failure" caseSensitive="yes" regex="no">Exception:</output>
54
</test>
55
56
<test id="test -XX:-ReadIPInfoForRAS -XX:+ReadIPInfoForRAS">
57
<command>$EXE$ $NOREADIPINFOFORRAS$ $READIPINFOFORRAS$ -verbose:init -version</command>
58
<output type="success" caseSensitive="yes" regex="no">$READIPINFOFORRAS_MESSAGE$</output>
59
<output type="failure" caseSensitive="yes" regex="no">$NOREADIPINFOFORRAS_MESSAGE$</output>
60
</test>
61
62
<test id="test -XX:+ReadIPInfoForRAS -XX:-ReadIPInfoForRAS">
63
<command>$EXE$ $READIPINFOFORRAS$ $NOREADIPINFOFORRAS$ -verbose:init -version</command>
64
<output type="success" caseSensitive="yes" regex="no">$NOREADIPINFOFORRAS_MESSAGE$</output>
65
<output type="failure" caseSensitive="yes" regex="no">$READIPINFOFORRAS_MESSAGE$</output>
66
</test>
67
68
<test id="test -XX:OnOutOfMemoryError=">
69
<command>$EXE$ $JVM_HEAP_LIMIT$ $ONOUTOFMEMORYERROR_EQUALS$"$EXE$ -version" $ONOUTOFMEMORYERROR_JAR$</command>
70
<output type="success" caseSensitive="yes" regex="no">$JAVALANGOUTOFMEMORYERROR$</output>
71
<output type="required" caseSensitive="yes" regex="yes" javaUtilPattern="yes">java (.)* -version</output>
72
<output type="required" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>
73
</test>
74
75
<test id="Verify Xdump:exit behaves as expected">
76
<command>$EXE$ -Xdump:exit:events=vmstart</command>
77
<output type="success" caseSensitive="yes" regex="no">VM is shutting down. Reason: Unknown</output>
78
<output type="failure" caseSensitive="yes" regex="no">dump written to</output>
79
</test>
80
81
<!-- -XX:+ExitOnOutOfMemoryError -->
82
<test id="Verify -XX:+ExitOnOutOfMemoryError behaves as expected with OutOfMemoryError">
83
<command>$EXE$ $JVM_HEAP_LIMIT$ -XX:+ExitOnOutOfMemoryError $ONOUTOFMEMORYERROR_JAR$</command>
84
<output type="success" caseSensitive="yes" regex="no">dump written to</output>
85
<output type="success" caseSensitive="yes" regex="no">VM is shutting down. Reason: java/lang/OutOfMemoryError</output>
86
</test>
87
88
<!-- -XX:+ExitOnOutOfMemoryError -XX:-HeapDumpOnOutOfMemoryError -->
89
<test id="Verify -XX:+ExitOnOutOfMemoryError -XX:-HeapDumpOnOutOfMemoryError behaves as expected with OutOfMemoryError">
90
<command>$EXE$ $JVM_HEAP_LIMIT$ -XX:+ExitOnOutOfMemoryError -XX:-HeapDumpOnOutOfMemoryError $ONOUTOFMEMORYERROR_JAR$</command>
91
<output type="failure" caseSensitive="yes" regex="no">dump written to</output>
92
<output type="success" caseSensitive="yes" regex="no">VM is shutting down. Reason: java/lang/OutOfMemoryError</output>
93
</test>
94
95
<!-- -XX:+PortableSharedCache -XX:-PortableSharedCache -->
96
<test id="Verify -XX:+PortableSharedCache -XX:-PortableSharedCache behaves as expected with the portable shared cache feature disabled">
97
<command>$EXE$ -Xshareclasses -Xtrace:print=j9jit.88 -XX:+PortableSharedCache -XX:-PortableSharedCache -version</command>
98
<output type="success" caseSensitive="yes" regex="no">PortableSharedCache is 0</output>
99
<output type="failure" caseSensitive="yes" regex="no">PortableSharedCache is 1</output>
100
</test>
101
102
<!-- -XX:+PortableSharedCache -XX:-PortableSharedCache -->
103
<test id="Verify -XX:-PortableSharedCache -XX:+PortableSharedCache behaves as expected with the portable shared cache feature enabled">
104
<command>$EXE$ -Xshareclasses -Xtrace:print=j9jit.88 -XX:-PortableSharedCache -XX:+PortableSharedCache -version</command>
105
<output type="success" caseSensitive="yes" regex="no">PortableSharedCache is 1</output>
106
<output type="failure" caseSensitive="yes" regex="no">PortableSharedCache is 0</output>
107
</test>
108
</suite>
109
110
111