Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/cmdLineTests/shareClassTests/SCCMLTests/ShareClassesCMLOpenJ9.xml
6004 views
1
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
<!--
3
Copyright (c) 2018, 2021 IBM Corp. and others
4
This program and the accompanying materials are made available under
5
the terms of the Eclipse Public License 2.0 which accompanies this
6
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
or the Apache License, Version 2.0 which accompanies this distribution and
8
is available at https://www.apache.org/licenses/LICENSE-2.0.
9
This Source Code may also be made available under the following
10
Secondary Licenses when the conditions for such availability set
11
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
12
General Public License, version 2 with the GNU Classpath
13
Exception [1] and GNU General Public License, version 2 with the
14
OpenJDK Assembly Exception [2].
15
[1] https://www.gnu.org/software/classpath/license.html
16
[2] http://openjdk.java.net/legal/assembly-exception.html
17
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
18
-->
19
<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">
20
<suite id="Shared Classes CommandLineOptionTests Suite ">
21
<!-- Our test modes for this suite -->
22
<variable name="mode204" value="-Xshareclasses:name=ShareClassesCMLTests"/>
23
<!-- Set variables up -->
24
<variable name="currentMode" value="$mode204$"/>
25
<variable name="CP_HANOI" value="-cp $UTILSJAR$" />
26
<variable name="PROGRAM_HANOI" value="org.openj9.test.ivj.Hanoi 2" />
27
<if testVariable="SCMODE" testValue="204" resultVariable="currentMode" resultValue="$mode204$"/>
28
29
<echo value=" "/>
30
<echo value="#######################################################"/>
31
<echo value="Running tests in mode $SCMODE$ with command line options: $currentMode$"/>
32
<echo value="#######################################################"/>
33
<echo value=" "/>
34
35
<!--
36
Note:
37
Most tests check for strings 'corrupt', 'JVM requested Java dump', and 'JVM requested Snap dump' in the output.
38
These checks are present because a cache may be found to be corrupt, and the test could otherwise pass.
39
40
The string 'corrupt' is checked because it can appear several messages like below.
41
JVMSHRC443E Cache CRC is incorrect indicating a corrupt cache. Incorrect cache CRC: 0x0.
42
JVMDUMP013I Processed dump event "corruptcache", detail "".
43
JVMSHRC442E Shared cache "jim" is corrupt. Corruption code is -1. Corrupt value is 0x0. No new JVMs will be allowed to connect to the cache.
44
-->
45
<exec command="$JAVA_EXE$ -Xshareclasses:destroy" quiet="false"/>
46
<!--Do not check the result of -Xshareclasses:destroy. It is possible another java process is holding the default shared cache open. In this case -Xshareclasses:destroy will fail on Windows -->
47
48
<test id="Test 1: Test that only bootstrap class sharing is enabled by default" timeout="600" runPath=".">
49
<command>$JAVA_EXE$ -Xtrace:print={j9shr.1297,j9shr.1514,j9shr.2272,j9shr.2273,j9shr.2264,j9jcl.104,j9jcl.97} $CP_HANOI$ $PROGRAM_HANOI$</command>
50
<!-- Enable j9shr.2272 Trc_SHR_INIT_j9shr_init_ExitOnNonFatal and j9shr.2264 Trc_SHR_OSC_getCacheDir_j9shmem_getDir_failed1 for debugging purpose when failed -->
51
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">j9shr.1514\s+ - CM commitROMClass : Data was stored in the cache for J9ROMClass</output>
52
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">j9shr.1297\s+ - CM findROMClass: class .* found at address</output>
53
<!--Let this test pass if someone is running in container-->
54
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">j9shr.2273\s+ - The JVM is running in container, class sharing is not enabled by default</output>
55
<output type="required" caseSensitive="yes" regex="no">Puzzle solved!</output>
56
<!-- j9jcl.104, j9jcl.97 SharedClassURLClasspathHelperImpl.storeSharedClassImpl()/findSharedClassImpl() is not triggered, non-bootstrap class sharing is not enabled. -->
57
<output type="failure" caseSensitive="no" regex="no">SharedClassURLClasspathHelperImpl</output>
58
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
59
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
60
</test>
61
62
<test id="Test 1-b: Test that only bootstrap class sharing is enabled by default with verbose output" timeout="600" runPath=".">
63
<!-- run with -Xshareclasses:bootClassesOnly,verbose, it gives us more debugging information if the above test failed -->
64
<command>$JAVA_EXE$ -Xshareclasses:bootClassesOnly,verbose -Xtrace:print={j9shr.1297,j9shr.1514,j9shr.2272,j9shr.2273,j9shr.2264,j9jcl.104,j9jcl.97} $CP_HANOI$ $PROGRAM_HANOI$</command>
65
<!-- Enable j9shr.2272 Trc_SHR_INIT_j9shr_init_ExitOnNonFatal and j9shr.2264 Trc_SHR_OSC_getCacheDir_j9shmem_getDir_failed1 for debugging purpose when failed -->
66
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">j9shr.1514\s+ - CM commitROMClass : Data was stored in the cache for J9ROMClass</output>
67
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">j9shr.1297\s+ - CM findROMClass: class .* found at address</output>
68
<!--Let this test pass if someone is running in container-->
69
<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">j9shr.2273\s+ - The JVM is running in container, class sharing is not enabled by default</output>
70
<output type="required" caseSensitive="yes" regex="no">Puzzle solved!</output>
71
<!-- j9jcl.104, j9jcl.97 SharedClassURLClasspathHelperImpl.storeSharedClassImpl()/findSharedClassImpl() is not triggered, non-bootstrap class sharing is not enabled. -->
72
<output type="failure" caseSensitive="no" regex="no">SharedClassURLClasspathHelperImpl</output>
73
<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>
74
<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>
75
</test>
76
77
<exec command="$JAVA_EXE$ -Xshareclasses:destroy" quiet="false"/>
78
<!--
79
***** IMPORTANT NOTE *****
80
The last test in this file is normally a call to -Xshareclasses:destroy. When the test passes no files should ever be left behind.
81
-->
82
</suite>
83
84