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