Path: blob/master/test/functional/cmdLineTests/shareClassTests/SCCMLTests/ShareClassesCMLTests-4.xml
6004 views
<?xml version="1.0" encoding="UTF-8" standalone="no"?>12<!--3Copyright (c) 2012, 2021 IBM Corp. and others45This program and the accompanying materials are made available under6the terms of the Eclipse Public License 2.0 which accompanies this7distribution and is available at https://www.eclipse.org/legal/epl-2.0/8or the Apache License, Version 2.0 which accompanies this distribution and9is available at https://www.apache.org/licenses/LICENSE-2.0.1011This Source Code may also be made available under the following12Secondary Licenses when the conditions for such availability set13forth in the Eclipse Public License, v. 2.0 are satisfied: GNU14General Public License, version 2 with the GNU Classpath15Exception [1] and GNU General Public License, version 2 with the16OpenJDK Assembly Exception [2].1718[1] https://www.gnu.org/software/classpath/license.html19[2] http://openjdk.java.net/legal/assembly-exception.html2021SPDX-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-exception22-->2324<!DOCTYPE suite SYSTEM "cmdlinetester.dtd">2526<!-- Test 180-a to Test 188-c: 53 tests -->2728<suite id="Shared Classes CommandLineOptionTests Suite">2930<!-- Our test modes for this suite -->31<variable name="mode204" value="-Xshareclasses:name=ShareClassesCMLTests"/>3233<!-- Set variables up -->34<variable name="UTILITIES_PROGRAM" value="com.ibm.j9.sharedCacheAPI.tests.SharedUtilsTest"/>35<variable name="UTILITIES_CP" value="-cp $JVM_TEST_ROOT$$PATHSEP$functional$PATHSEP$VM_Test$PATHSEP$VM_Test.jar"/>36<variable name="UTILITIES_CACHE" value="-Xshareclasses:name=ShareClassesUtilities"/>37<variable name="JAVAC_DIR" value="$JAVA_HOME$$PATHSEP$bin"/>38<variable name="CACHE_DIR" value="cacheDir=."/>3940<variable name="BOOTCLASSPATH" value="-Xbootclasspath/p:.$PATHSEP$Utils$CPDL$."/>41<variable name="currentMode" value="$mode204$"/>42<variable name="XXShareClassesEnableBCI" value="-XX:ShareClassesEnableBCI"/>4344<variable name="CP_HANOI" value="-cp $UTILSJAR$" />45<variable name="BOOTCP_HANOI" value="-Xbootclasspath/a:$UTILSJAR$" />46<variable name="PROGRAM_HANOI" value="org.openj9.test.ivj.Hanoi 2" />47<variable name="CLASS_HANOI" value="org/openj9/test/ivj/Hanoi" />48<variable name="BOOTSTRAP_CLASS" value="java/lang/Object" />4950<variable name="AGENT_NOCLASSMODIFICATION" value="-agentlib:jvmtitest=test:ecflh001,args:noModify" />51<variable name="AGENT_RETRANSFORM" value="-agentlib:jvmtitest=test:rtc001" />5253<variable name="DUMPFILE" value="shrcmltest" />54<variable name="SYSDUMP" value="-Xdump:system:file=$DUMPFILE$.dmp" />55<variable name="JAVADUMP" value="-Xdump:java:file=$DUMPFILE$.txt" />56<variable name="SNAPDUMP" value="-Xdump:snap:file=$DUMPFILE$.trc" />57<!-- Override -Xdump option on z/OS -->58<variable name="SYSDUMP" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORE.DMP" platforms="zos.*" />5960<variable name="NON_WINDOWS_PLATFORMS" value="aix.*,linux.*,zos.*,osx.*" />61<variable name="WINDOWS_PLATFORMS" value="win.*" />6263<!--64Following variable specifies cache directory to be used by tests for 'cacheDirPerm' sub-option.65Since 'cacheDirPerm' sub-option is not applicable on Windows, we can use current dir as cache dir.66-->67<variable name="CACHE_DIR_FOR_PERM_TEST" value="/tmp/ShareClassesCMLTestDir" platforms="$NON_WINDOWS_PLATFORMS$" />68<variable name="CACHE_DIR_FOR_PERM_TEST" value="." platforms="$WINDOWS_PLATFORMS$" />6970<if testVariable="SCMODE" testValue="204" resultVariable="currentMode" resultValue="$mode204$"/>7172<echo value=" "/>73<echo value="#######################################################"/>74<echo value="Running tests in mode $SCMODE$ with command line options: $currentMode$"/>75<echo value="#######################################################"/>76<echo value=" "/>7778<!--79Note:80Most tests check for strings 'corrupt', 'JVM requested Java dump', and 'JVM requested Snap dump' in the output.81These checks are present because a cache may be found to be corrupt, and the test could otherwise pass.8283The string 'corrupt' is checked because it can appear several messages like below.84JVMSHRC443E Cache CRC is incorrect indicating a corrupt cache. Incorrect cache CRC: 0x0.85JVMDUMP013I Processed dump event "corruptcache", detail "".86JVMSHRC442E Shared cache "jim" is corrupt. Corruption code is -1. Corrupt value is 0x0. No new JVMs will be allowed to connect to the cache.87-->8889<test id="Start : Cleanup: persistent" timeout="600" runPath=".">90<command>$JAVA_EXE$ $currentMode$,destroy</command>91<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>92<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>93<output type="success" caseSensitive="yes" regex="no">is destroyed</output>94<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>95<output type="failure" caseSensitive="yes" regex="no">Exception:</output>96<output type="failure" caseSensitive="no" regex="no">corrupt</output>97<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>98</test>99100101<test id="Start: Cleanup: nonpersistent" timeout="600" runPath=".">102<command>$JAVA_EXE$ $currentMode$,nonpersistent,destroy</command>103<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>104<output type="success" caseSensitive="yes" regex="no">is destroyed</output>105<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>106<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>107<output type="failure" caseSensitive="yes" regex="no">Exception:</output>108<output type="failure" caseSensitive="no" regex="no">corrupt</output>109<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>110</test>111<!--112Note: Tests 180(a-h) validate following scenario:113When running with -Xshareclasses:enableBCI, verify that intermediate class data is present for114bootstrap/non-bootstrap classes stored in cache, whether a JVMTI agent is being used or not.115-->116117<!-- Remove stale dumps, if any. Test 180-a is going to create new dumps. -->118<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />119<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />120121<test id="Test 180-a: Create a system dump by using a shared cache with enableBCI option and with a JVMTI agent" timeout="600" runPath=".">122<command>$JAVA_EXE$ -Xmx4m $SYSDUMP$,events=vmstop $currentMode$,reset,enableBCI $AGENT_NOCLASSMODIFICATION$ $CP_HANOI$ $PROGRAM_HANOI$</command>123<output type="success" regex="no">Moved disk 0 to 1</output>124<output type="required" regex="no" >System dump written</output>125<!-- check for unexpected core dumps -->126<output type="failure" regex="no">0001.dmp</output>127<output type="failure" caseSensitive="no" regex="no">corrupt</output>128<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>129</test>130131<test id="Test 180-b: Make sure system dump exists." timeout="600" runPath=".">132<exec command="sh" capture="LOGNAME" platforms="zos.*" >133<arg>-c</arg>134<arg>echo $$LOGNAME</arg>135</exec>136<exec command="cp //'$LOGNAME$.J9CORE.DMP.X001' $DUMPFILE$.dmp" platforms="zos_390-64.*" />137<exec command="cp //'$LOGNAME$.J9CORE.DMP' $DUMPFILE$.dmp" platforms="zos_390-31.*" />138<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />139<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />140<command>ls</command>141<output type="success" caseSensitive="no" regex="no">$DUMPFILE$.dmp</output>142</test>143144<test id="Test 180-c: Verify that Intermediate Class Data is present for non-bootstrap class" timeout="600" runPath=".">145<command command="$JDMPVIEW_EXE$">146<arg>-core $DUMPFILE$.dmp</arg>147<input>!dumpromclass name:$CLASS_HANOI$</input>148<input>quit</input>149</command>150<output type="success" regex="yes" javaUtilPattern="yes" showMatch="yes">Intermediate Class Data \([^0][0-9]* bytes\): [^0][0-9a-fA-F]*</output>151<output type="failure" regex="no">no shared cache</output>152<output type="failure" regex="no">unable to read</output>153<output type="failure" regex="no">could not read</output>154<output type="failure" regex="no">dump event</output>155<output type="failure" regex="no">DDRInteractiveCommandException</output>156</test>157158<test id="Test 180-d: Verify that Intermediate Class Data is present for bootstrap class" timeout="600" runPath=".">159<command command="$JDMPVIEW_EXE$">160<arg>-core $DUMPFILE$.dmp</arg>161<input>!dumpromclass name:$BOOTSTRAP_CLASS$</input>162<input>quit</input>163</command>164<output type="success" regex="yes" javaUtilPattern="yes" showMatch="yes">Intermediate Class Data \([^0][0-9]* bytes\): [^0][0-9a-fA-F]*</output>165<output type="failure" regex="no">no shared cache</output>166<output type="failure" regex="no">unable to read</output>167<output type="failure" regex="no">could not read</output>168<output type="failure" regex="no">dump event</output>169<output type="failure" regex="no">DDRInteractiveCommandException</output>170</test>171172<exec command="rm -f $DUMPFILE$.dmp" quiet="false" />173174<!-- Remove stale dumps, if any. Test 180-e is going to create new dumps. -->175<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />176<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />177178<test id="Test 180-e: Create a system dump by using a shared cache with enableBCI option and without a JVMTI agent" timeout="600" runPath=".">179<command>$JAVA_EXE$ -Xmx4m $SYSDUMP$,events=vmstop $currentMode$,reset,enableBCI $CP_HANOI$ $PROGRAM_HANOI$</command>180<output type="success" regex="no">Moved disk 0 to 1</output>181<output type="required" regex="no">System dump written</output>182<!-- check for unexpected core dumps -->183<output regex="no" type="failure">0001.dmp</output>184<output type="failure" caseSensitive="no" regex="no">corrupt</output>185<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>186</test>187188<test id="Test 180-f: Make sure system dump exists." timeout="600" runPath=".">189<exec command="sh" capture="LOGNAME" platforms="zos.*" >190<arg>-c</arg>191<arg>echo $$LOGNAME</arg>192</exec>193<exec command="cp //'$LOGNAME$.J9CORE.DMP.X001' $DUMPFILE$.dmp" platforms="zos_390-64.*" />194<exec command="cp //'$LOGNAME$.J9CORE.DMP' $DUMPFILE$.dmp" platforms="zos_390-31.*" />195<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />196<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />197<command>ls</command>198<output type="success" caseSensitive="no" regex="no">$DUMPFILE$.dmp</output>199</test>200201<test id="Test 180-g: Verify that Intermediate Class Data is present for non-bootstrap class" timeout="600" runPath=".">202<command command="$JDMPVIEW_EXE$">203<arg>-core $DUMPFILE$.dmp</arg>204<input>!dumpromclass name:$CLASS_HANOI$</input>205<input>quit</input>206</command>207<output type="success" regex="yes" javaUtilPattern="yes" showMatch="yes">Intermediate Class Data \([^0][0-9]* bytes\): [^0][0-9a-fA-F]*</output>208<output type="failure" regex="no">no shared cache</output>209<output type="failure" regex="no">unable to read</output>210<output type="failure" regex="no">could not read</output>211<output type="failure" regex="no">dump event</output>212<output type="failure" regex="no">DDRInteractiveCommandException</output>213</test>214215<test id="Test 180-h: Verify that Intermediate Class Data is present for bootstrap class" timeout="600" runPath=".">216<command command="$JDMPVIEW_EXE$">217<arg>-core $DUMPFILE$.dmp</arg>218<input>!dumpromclass name:$BOOTSTRAP_CLASS$</input>219<input>quit</input>220</command>221<output type="success" regex="yes" javaUtilPattern="yes" showMatch="yes">Intermediate Class Data \([^0][0-9]* bytes\): [^0][0-9a-fA-F]*</output>222<output type="failure" regex="no">no shared cache</output>223<output type="failure" regex="no">unable to read</output>224<output type="failure" regex="no">could not read</output>225<output type="failure" regex="no">dump event</output>226<output type="failure" regex="no">DDRInteractiveCommandException</output>227</test>228229<exec command="rm -f $DUMPFILE$.dmp" quiet="false" />230231<!--232Note: Tests 181(a-d) validate following scenario:233When running with -Xshareclasses:enableBCI, if for some reason, we fail to store ROMClass in the cache,234and retransformation is enabled, then the ROMClass should contain intermediate class data.235-->236<test id="Test 181-a: Create a shared cache with enableBCI option" timeout="600" runPath=".">237<command>$JAVA_EXE$ $currentMode$,reset,enableBCI -version</command>238<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>239<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>240<output type="failure" caseSensitive="yes" regex="no">Exception:</output>241<output type="failure" caseSensitive="no" regex="no">corrupt</output>242<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>243</test>244245<!-- Remove stale dumps, if any. Test 181-b is going to create new dumps. -->246<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />247<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />248249<test id="Test 181-b: Create a system dump by using previously created cache in read only mode with a JVMTI agent that has retransformation enabled" timeout="600" runPath=".">250<command>$JAVA_EXE$ -Xmx4m $SYSDUMP$,events=vmstop $currentMode$,enableBCI,readonly $AGENT_RETRANSFORM$ $CP_HANOI$ $PROGRAM_HANOI$</command>251<output type="success" regex="no">Moved disk 0 to 1</output>252<output type="required" regex="no">System dump written</output>253<!-- check for unexpected core dumps -->254<output regex="no" type="failure">0001.dmp</output>255<output type="failure" caseSensitive="no" regex="no">corrupt</output>256<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>257</test>258259<test id="Test 181-c: Make sure system dump exists." timeout="600" runPath=".">260<exec command="sh" capture="LOGNAME" platforms="zos.*" >261<arg>-c</arg>262<arg>echo $$LOGNAME</arg>263</exec>264<exec command="cp //'$LOGNAME$.J9CORE.DMP.X001' $DUMPFILE$.dmp" platforms="zos_390-64.*" />265<exec command="cp //'$LOGNAME$.J9CORE.DMP' $DUMPFILE$.dmp" platforms="zos_390-31.*" />266<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />267<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />268<command>ls</command>269<output type="success" caseSensitive="no" regex="no">$DUMPFILE$.dmp</output>270</test>271272<test id="Test 181-d: Verify that Intermediate Class Data is present" timeout="600" runPath=".">273<command command="$JDMPVIEW_EXE$">274<arg>-core $DUMPFILE$.dmp</arg>275<input>!dumpromclass name:$CLASS_HANOI$</input>276<input>quit</input>277</command>278<output type="success" regex="yes" javaUtilPattern="yes" showMatch="yes">Intermediate Class Data \([^0][0-9]* bytes\): [^0][0-9a-fA-F]*</output>279<output type="failure" regex="no">no shared cache</output>280<output type="failure" regex="no">unable to read</output>281<output type="failure" regex="no">could not read</output>282<output type="failure" regex="no">dump event</output>283<output type="failure" regex="no">DDRInteractiveCommandException</output>284</test>285286<exec command="rm -f $DUMPFILE$.dmp" quiet="false" />287288<!--289Note: Tests 182(a-d) validate following scenario:290When running with -Xshareclasses:enableBCI, if for some reason, we fail to store ROMClass in the cache,291and retransformation is disabled, then the ROMClass should still contain intermediate class data.292-->293<test id="Test 182-a: Create a shared cache with enableBCI option" timeout="600" runPath=".">294<command>$JAVA_EXE$ $currentMode$,reset,enableBCI -version</command>295<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>296<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>297<output type="failure" caseSensitive="yes" regex="no">Exception:</output>298<output type="failure" caseSensitive="no" regex="no">corrupt</output>299<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>300</test>301302<!-- Remove stale dumps on z/OS, if any. Test 182-b is going to create new dumps. -->303<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />304<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />305306<test id="Test 182-b: Create a system dump using previously created cache in read only mode with a JVMTI agent that has retransformation disabled" timeout="600" runPath=".">307<command>$JAVA_EXE$ -Xmx4m $SYSDUMP$,events=vmstop $currentMode$,enableBCI,readonly $AGENT_NOCLASSMODIFICATION$ $CP_HANOI$ $PROGRAM_HANOI$</command>308<output type="success" regex="no">Moved disk 0 to 1</output>309<output type="required" regex="no">System dump written</output>310<!-- check for unexpected core dumps -->311<output type="failure" regex="no">0001.dmp</output>312<output type="failure" caseSensitive="no" regex="no">corrupt</output>313<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>314</test>315316<test id="Test 182-c: Make sure system dump exists." timeout="600" runPath=".">317<exec command="sh" capture="LOGNAME" platforms="zos.*" >318<arg>-c</arg>319<arg>echo $$LOGNAME</arg>320</exec>321<exec command="cp //'$LOGNAME$.J9CORE.DMP.X001' $DUMPFILE$.dmp" platforms="zos_390-64.*" />322<exec command="cp //'$LOGNAME$.J9CORE.DMP' $DUMPFILE$.dmp" platforms="zos_390-31.*" />323<exec command="tso delete J9CORE.DMP.*" platforms="zos_390-64.*" />324<exec command="tso delete J9CORE.DMP" platforms="zos_390-31.*" />325<command>ls</command>326<output type="success" caseSensitive="no" regex="no">$DUMPFILE$.dmp</output>327</test>328329<test id="Test 182-d: Verify that Intermediate Class Data is present" timeout="600" runPath=".">330<command command="$JDMPVIEW_EXE$">331<arg>-core $DUMPFILE$.dmp</arg>332<input>!dumpromclass name:$CLASS_HANOI$</input>333<input>quit</input>334</command>335<output type="success" regex="yes" javaUtilPattern="yes" showMatch="yes">Intermediate Class Data \([^0][0-9]* bytes\): [^0][0-9a-fA-F]*</output>336<output type="failure" regex="no">no shared cache</output>337<output type="failure" regex="no">unable to read</output>338<output type="failure" regex="no">could not read</output>339<output type="failure" regex="no">dump event</output>340<output type="failure" regex="no">DDRInteractiveCommandException</output>341</test>342343<exec command="rm -f $DUMPFILE$.dmp" quiet="false" />344345<!-- Tests 183a-f Verify printStats and javacore output when enableBCI sub-option is used. -->346347<test id="Test 183-a: Create a cache and javacore without enableBCI option" timeout="600" runPath=".">348<command>$JAVA_EXE$ -Xdump:java:events=vmstop,file=javacore.txt $currentMode$,reset -version</command>349<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>350<output type="required" caseSensitive="yes" regex="no">Processed dump event</output>351<output type="required" caseSensitive="yes" regex="no">javacore.txt</output>352<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>353<output type="failure" caseSensitive="yes" regex="no">Exception:</output>354<output type="failure" caseSensitive="no" regex="no">corrupt</output>355</test>356357<test id="Test 183-b: Ensure BCI Enabled is true" timeout="600" runPath=".">358<command>cat javacore.txt</command>359<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes" showMatch="yes">BCI Enabled[\s]*= true</output>360<output type="failure" caseSensitive="no" regex="yes" javaUtilPattern="yes" showMatch="yes">BCI Enabled[\s]*= false</output>361</test>362363<test id="Test 183-c: Verify BCI Enabled is true in printStats output" timeout="600" runPath=".">364<command>$JAVA_EXE$ $currentMode$,printStats -version</command>365<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">BCI Enabled[\s]*= true</output>366<output type="failure" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>367<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>368<output type="failure" caseSensitive="yes" regex="no">Exception:</output>369<output type="failure" caseSensitive="no" regex="no">corrupt</output>370<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>371</test>372373<exec command="rm -f javacore.txt" quiet="false"/>374375<test id="Test 183-d: Create a cache and javacore with enableBCI option" timeout="600" runPath=".">376<command>$JAVA_EXE$ -Xdump:java:events=vmstop,file=javacore.txt $currentMode$,reset,enableBCI -version</command>377<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>378<output type="required" caseSensitive="yes" regex="no">Processed dump event</output>379<output type="required" caseSensitive="yes" regex="no">javacore.txt</output>380<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>381<output type="failure" caseSensitive="yes" regex="no">Exception:</output>382<output type="failure" caseSensitive="no" regex="no">corrupt</output>383</test>384385<test id="Test 183-e: Ensure BCI Enabled is true in generated javacore" timeout="600" runPath=".">386<command>cat javacore.txt</command>387<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes" showMatch="yes">BCI Enabled[\s]*= true</output>388<output type="failure" caseSensitive="no" regex="yes" javaUtilPattern="yes" showMatch="yes">BCI Enabled[\s]*= false</output>389</test>390391<test id="Test 183-f: Ensure BCI Enabled is true in printStats output" timeout="600" runPath=".">392<command>$JAVA_EXE$ $currentMode$,printStats -version</command>393<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">BCI Enabled[\s]*= true</output>394<output type="failure" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>395<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>396<output type="failure" caseSensitive="yes" regex="no">Exception:</output>397<output type="failure" caseSensitive="no" regex="no">corrupt</output>398<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>399</test>400401<exec command="rm -f javacore.txt" quiet="false"/>402403<!-- Tests 184a-m verify that shared class utility options like printStats, destroy, destroyAll work even when incompatible options are present.404Right now enableBCI and cacheRetransformed are treated as incompatible options.405-->406<test id="Test 184-a: Create a cache without enableBCI sub-option" timeout="600" runPath=".">407<command>$JAVA_EXE$ $currentMode$,reset -version</command>408<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>409<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>410<output type="failure" caseSensitive="yes" regex="no">Exception:</output>411<output type="failure" caseSensitive="no" regex="no">corrupt</output>412<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>413</test>414415<test id="Test 184-b: Run 'printStats' on existing cache with incompatible options specified at the end in the option list" timeout="600" runPath=".">416<command>$JAVA_EXE$ $currentMode$,printStats,enableBCI,cacheRetransformed</command>417<output type="success" caseSensitive="yes" regex="no">Current statistics for cache</output>418<output type="required" caseSensitive="yes" regex="yes" javaUtilPattern="yes">BCI Enabled[\s]*= true</output>419<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>420<output type="failure" caseSensitive="yes" regex="no">Exception:</output>421<output type="failure" caseSensitive="no" regex="no">corrupt</output>422<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>423</test>424425<test id="Test 184-c: Run 'printStats' on existing cache with incompatible options specified before 'printStats' in the option list" timeout="600" runPath=".">426<command>$JAVA_EXE$ $currentMode$,enableBCI,cacheRetransformed,printStats</command>427<output type="success" caseSensitive="yes" regex="no">Current statistics for cache</output>428<output type="required" caseSensitive="yes" regex="yes" javaUtilPattern="yes">BCI Enabled[\s]*= true</output>429<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>430<output type="failure" caseSensitive="yes" regex="no">Exception:</output>431<output type="failure" caseSensitive="no" regex="no">corrupt</output>432<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>433</test>434435<test id="Test 184-d: Run 'listAllCaches' with incompatible options specified at the end in the option list" timeout="600" runPath=".">436<command>$JAVA_EXE$ $currentMode$,listAllCaches,enableBCI,cacheRetransformed</command>437<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes" showMatch="yes">Cache[\s]*name[\s]*level[\s]*(persistent|cache-type)(.)*last detach time</output>438<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes" showMatch="yes">ShareClassesCMLTests[\s]*Java(.)*(yes|persistent)</output>439<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>440<output type="failure" caseSensitive="yes" regex="no">Exception:</output>441<output type="failure" caseSensitive="no" regex="no">corrupt</output>442<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>443</test>444445<test id="Test 184-e: Run 'listAllCaches' with incompatible options specified before 'listAllCaches' in the option list" timeout="600" runPath=".">446<command>$JAVA_EXE$ $currentMode$,enableBCI,cacheRetransformed,listAllCaches</command>447<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes" showMatch="yes">Cache[\s]*name[\s]*level[\s]*(persistent|cache-type)(.)*last detach time</output>448<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes" showMatch="yes">ShareClassesCMLTests[\s]*Java(.)*(yes|persistent)</output>449<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>450<output type="failure" caseSensitive="yes" regex="no">Exception:</output>451<output type="failure" caseSensitive="no" regex="no">corrupt</output>452<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>453</test>454455<test id="Test 184-f: Run 'destroy' on existing cache with incompatible options specified at the end in the option list" timeout="600" runPath=".">456<command>$JAVA_EXE$ $currentMode$,destroy,enableBCI,cacheRetransformed</command>457<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>458<output type="success" caseSensitive="yes" regex="no">is destroyed</output>459460<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>461<output type="failure" caseSensitive="yes" regex="no">Exception:</output>462<output type="failure" caseSensitive="no" regex="no">corrupt</output>463<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>464</test>465466<test id="Test 184-g: Create a cache without enableBCI sub-option" timeout="600" runPath=".">467<command>$JAVA_EXE$ $currentMode$,reset -version</command>468<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>469<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>470<output type="failure" caseSensitive="yes" regex="no">Exception:</output>471<output type="failure" caseSensitive="no" regex="no">corrupt</output>472<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>473</test>474475<test id="Test 184-h: Run 'destroy' on existing cache with incompatible options specified before 'destroy' in the option list" timeout="600" runPath=".">476<command>$JAVA_EXE$ $currentMode$,enableBCI,cacheRetransformed,destroy</command>477<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>478<output type="success" caseSensitive="yes" regex="no">is destroyed</output>479480<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>481<output type="failure" caseSensitive="yes" regex="no">Exception:</output>482<output type="failure" caseSensitive="no" regex="no">corrupt</output>483<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>484</test>485486<test id="Test 184-i: Create a cache without enableBCI sub-option" timeout="600" runPath=".">487<command>$JAVA_EXE$ $currentMode$,reset -version</command>488<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>489<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>490<output type="failure" caseSensitive="yes" regex="no">Exception:</output>491<output type="failure" caseSensitive="no" regex="no">corrupt</output>492<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>493</test>494495<test id="Test 184-j: Verify that using reset with incompatible options fails" timeout="600" runPath=".">496<command>$JAVA_EXE$ $currentMode$,reset,enableBCI,cacheRetransformed -version</command>497<output type="success" caseSensitive="yes" regex="no">JVMSHRC595E Command-line options "enableBCI" and "cacheRetransformed" are incompatible</output>498<output type="required" caseSensitive="yes" regex="no">JVMJ9VM015W Initialization error</output>499500<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>501<output type="failure" caseSensitive="yes" regex="no">Exception:</output>502<output type="failure" caseSensitive="no" regex="no">corrupt</output>503<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>504</test>505506<test id="Test 184-k: Ensure previous test did not destroy the cache" timeout="600" runPath=".">507<command>$JAVA_EXE$ $currentMode$,printStats</command>508<output type="success" caseSensitive="yes" regex="no">Current statistics for cache</output>509<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>510<output type="failure" caseSensitive="yes" regex="no">Exception:</output>511<output type="failure" caseSensitive="no" regex="no">corrupt</output>512<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>513</test>514515<test id="Test 184-l: Create a cache with enableBCI option" timeout="600" runPath=".">516<command>$JAVA_EXE$ $currentMode$,reset,enableBCI -version</command>517<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>518<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>519<output type="failure" caseSensitive="yes" regex="no">Exception:</output>520<output type="failure" caseSensitive="no" regex="no">corrupt</output>521<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>522</test>523524<test id="Test 184-m: Try to reset a BCI enabled cache with cacheRetransformed option" timeout="600" runPath=".">525<command>$JAVA_EXE$ $currentMode$,reset,cacheRetransformed -version</command>526<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>527<output type="success" caseSensitive="yes" regex="no">is destroyed</output>528<output type="required" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>529530<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>531<output type="failure" caseSensitive="yes" regex="no">Exception:</output>532<output type="failure" caseSensitive="no" regex="no">corrupt</output>533<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>534</test>535536<!-- Tests 185a-f checks that "cacheRetransformed" is incompatible with "enableBCI" sub-option -->537538<test id="Test 185-a: Destroy any existing cache" timeout="600" runPath=".">539<command>$JAVA_EXE$ $currentMode$,destroy -version</command>540<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>541<output type="success" caseSensitive="yes" regex="no">is destroyed</output>542<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>543<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>544<output type="failure" caseSensitive="yes" regex="no">Exception:</output>545<output type="failure" caseSensitive="no" regex="no">corrupt</output>546<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>547</test>548549<test id="Test 185-b: Verify that cacheRetransformed is incompatible with enableBCI sub-option" timeout="600" runPath=".">550<command>$JAVA_EXE$ $currentMode$,enableBCI,cacheRetransformed -version</command>551<output type="success" caseSensitive="yes" regex="no">JVMSHRC595E Command-line options "enableBCI" and "cacheRetransformed" are incompatible</output>552<output type="required" caseSensitive="yes" regex="no">JVMJ9VM015W Initialization error</output>553<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>554<output type="failure" caseSensitive="yes" regex="no">Exception:</output>555<output type="failure" caseSensitive="no" regex="no">corrupt</output>556<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>557</test>558559<test id="Test 185-c: Verify that using cacheRetransformed and enableBCI with non-fatal sub-option does not fail" timeout="600" runPath=".">560<command>$JAVA_EXE$ $currentMode$,enableBCI,cacheRetransformed,nonfatal -version</command>561<output type="success" caseSensitive="yes" regex="no">JVMSHRC595E Command-line options "enableBCI" and "cacheRetransformed" are incompatible</output>562<output type="required" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>563<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>564<output type="failure" caseSensitive="yes" regex="no">Exception:</output>565<output type="failure" caseSensitive="no" regex="no">corrupt</output>566<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>567</test>568569<test id="Test 185-d: Create a cache with enableBCI option" timeout="600" runPath=".">570<command>$JAVA_EXE$ $currentMode$,enableBCI -version</command>571<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>572<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>573<output type="failure" caseSensitive="yes" regex="no">Exception:</output>574<output type="failure" caseSensitive="no" regex="no">corrupt</output>575<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>576</test>577578<test id="Test 185-e: Verify that using cacheRetransformed sub-option is incompatible with BCI enabled cache" timeout="600" runPath=".">579<command>$JAVA_EXE$ $currentMode$,cacheRetransformed -version</command>580<output type="success" caseSensitive="yes" regex="no">JVMSHRC637E The -Xshareclasses:cacheRetransformed sub-option is incompatible with an existing BCI enabled shared cache.</output>581<output type="required" caseSensitive="yes" regex="no">JVMJ9VM015W Initialization error</output>582<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>583<output type="failure" caseSensitive="yes" regex="no">Exception:</output>584<output type="failure" caseSensitive="no" regex="no">corrupt</output>585<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>586</test>587588<test id="Test 185-f: Verify that using cacheRetransformed and nonfatal sub-options with a BCI enabled cache does not fail" timeout="600" runPath=".">589<command>$JAVA_EXE$ $currentMode$,cacheRetransformed,nonfatal -version</command>590<output type="success" caseSensitive="yes" regex="no">JVMSHRC637E The -Xshareclasses:cacheRetransformed sub-option is incompatible with an existing BCI enabled shared cache.</output>591<output type="required" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>592<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>593<output type="failure" caseSensitive="yes" regex="no">Exception:</output>594<output type="failure" caseSensitive="no" regex="no">corrupt</output>595<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>596</test>597598<exec command="rm -fr $CACHE_DIR_FOR_PERM_TEST$" quiet="false" platforms="$NON_WINDOWS_PLATFORMS$" />599600<test id="Test 186-a: Test for valid value of 'cacheDirPerm' sub-option" timeout="600" runPath=".">601<command>$JAVA_EXE$ $currentMode$,reset,cacheDir=$CACHE_DIR_FOR_PERM_TEST$,cacheDirPerm=0744 -version</command>602<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>603<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>604<output type="failure" caseSensitive="yes" regex="no">Exception:</output>605<output type="failure" caseSensitive="no" regex="no">corrupt</output>606<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>607</test>608609<test id="Test 186-b: Verify that cache can be re-used" timeout="600" runPath=".">610<command>$JAVA_EXE$ $currentMode$,cacheDir=$CACHE_DIR_FOR_PERM_TEST$ -version</command>611<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>612<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>613<output type="failure" caseSensitive="yes" regex="no">Exception:</output>614<output type="failure" caseSensitive="no" regex="no">corrupt</output>615<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>616</test>617618<test id="Test 186-c: Cleanup the cache" timeout="600" runPath=".">619<command>$JAVA_EXE$ $currentMode$,cacheDir=$CACHE_DIR_FOR_PERM_TEST$,destroy</command>620<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>621<output type="success" caseSensitive="yes" regex="no">is destroyed</output>622623<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>624<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>625<output type="failure" caseSensitive="yes" regex="no">Exception:</output>626<output type="failure" caseSensitive="no" regex="no">corrupt</output>627<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>628</test>629630<exec command="rm -fr $CACHE_DIR_FOR_PERM_TEST$" quiet="false" platforms="$NON_WINDOWS_PLATFORMS$"/>631632<test id="Test 187-a: Test for valid value of 'cacheDirPerm' sub-option with sticky bit on" timeout="600" runPath=".">633<command>$JAVA_EXE$ $currentMode$,reset,cacheDir=$CACHE_DIR_FOR_PERM_TEST$,cacheDirPerm=1744 -version</command>634<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>635<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>636<output type="failure" caseSensitive="yes" regex="no">Exception:</output>637<output type="failure" caseSensitive="no" regex="no">corrupt</output>638<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>639</test>640641<test id="Test 187-b: Verify that cache can be re-used" timeout="600" runPath=".">642<command>$JAVA_EXE$ $currentMode$,cacheDir=$CACHE_DIR_FOR_PERM_TEST$ -version</command>643<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>644<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>645<output type="failure" caseSensitive="yes" regex="no">Exception:</output>646<output type="failure" caseSensitive="no" regex="no">corrupt</output>647<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>648</test>649650<test id="Test 187-c: Cleanup the cache" timeout="600" runPath=".">651<command>$JAVA_EXE$ $currentMode$,cacheDir=$CACHE_DIR_FOR_PERM_TEST$,destroy</command>652<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>653<output type="success" caseSensitive="yes" regex="no">is destroyed</output>654655<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>656<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>657<output type="failure" caseSensitive="yes" regex="no">Exception:</output>658<output type="failure" caseSensitive="no" regex="no">corrupt</output>659<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>660</test>661662<exec command="rm -fr $CACHE_DIR_FOR_PERM_TEST$" quiet="false" platforms="$NON_WINDOWS_PLATFORMS$"/>663664<test id="Test 188-a: Test for special value of 'cacheDirPerm' sub-option" timeout="600" runPath=".">665<command>$JAVA_EXE$ $currentMode$,reset,cacheDir=$CACHE_DIR_FOR_PERM_TEST$,cacheDirPerm=0000 -version</command>666<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>667<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>668<output type="failure" caseSensitive="yes" regex="no">Exception:</output>669<output type="failure" caseSensitive="no" regex="no">corrupt</output>670<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>671</test>672673<test id="Test 188-b: Verify that cache can be re-used" timeout="600" runPath=".">674<command>$JAVA_EXE$ $currentMode$,cacheDir=$CACHE_DIR_FOR_PERM_TEST$ -version</command>675<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>676<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>677<output type="failure" caseSensitive="yes" regex="no">Exception:</output>678<output type="failure" caseSensitive="no" regex="no">corrupt</output>679<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>680</test>681682<test id="Test 188-c: Cleanup the cache" timeout="600" runPath=".">683<command>$JAVA_EXE$ $currentMode$,cacheDir=$CACHE_DIR_FOR_PERM_TEST$,destroy</command>684<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>685<output type="success" caseSensitive="yes" regex="no">is destroyed</output>686687<output type="failure" caseSensitive="yes" regex="no">Cache does not exist</output>688<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>689<output type="failure" caseSensitive="yes" regex="no">Exception:</output>690<output type="failure" caseSensitive="no" regex="no">corrupt</output>691<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>692</test>693694<exec command="rm -fr $CACHE_DIR_FOR_PERM_TEST$" quiet="false" platforms="$NON_WINDOWS_PLATFORMS$" />695696<test id="Verify whether VM successfully runs in read-only shared cache with testBadBuildID and nonfatal option specified" timeout="600" runPath=".">697<command>$JAVA_EXE$ -Xint -Xshareclasses:testBadBuildID,verbose,readonly,nonfatal -version</command>698<output type="required" caseSensitive="yes" regex="no">Continue without using it as -Xshareclasses:nonfatal is specified</output>699<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">(Semeru|OpenJDK|Java\(TM\) SE) Runtime</output>700701<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>702<output type="failure" caseSensitive="yes" regex="no">Exception:</output>703<output type="failure" caseSensitive="no" regex="no">corrupt</output>704<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>705<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>706<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>707</test>708709<test id="At end destroy cache for cleanup" timeout="600" runPath=".">710<command>$JAVA_EXE$ $currentMode$,destroy</command>711<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>712<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>713<output type="success" caseSensitive="yes" regex="no">is destroyed</output>714715<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>716<output type="failure" caseSensitive="yes" regex="no">Exception:</output>717<output type="failure" caseSensitive="no" regex="no">corrupt</output>718<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>719<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>720<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>721</test>722723<!--724***** IMPORTANT NOTE *****725The last test in this file is normally a call to -Xshareclasses:destroy. When the test passes no files should ever be left behind.726-->727</suite>728729730731