Path: blob/master/test/functional/cmdLineTests/shareClassTests/SCCMLTests/testSCCMLAotMethodOperation.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 1 to Test 11: 19 tests -->27<suite id="Shared Classes CommandLineOptionTests Suite">2829<!-- Our test modes for this suite -->30<variable name="mode204" value="-Xshareclasses:name=ShareClassesCMLTests"/>3132<!-- Set variables up -->33<variable name="currentMode" value="$mode204$"/>3435<if testVariable="SCMODE" testValue="204" resultVariable="currentMode" resultValue="$mode204$"/>3637<echo value=" "/>38<echo value="#######################################################"/>39<echo value="Running tests in mode $SCMODE$ with command line options: $currentMode$"/>40<echo value="#######################################################"/>41<echo value=" "/>4243<!--44Note:45Most tests check for strings 'corrupt', 'JVM requested Java dump', and 'JVM requested Snap dump' in the output.46These checks are present because a cache may be found to be corrupt, and the test could otherwise pass.4748The string 'corrupt' is checked because it can appear several messages like below.49JVMSHRC443E Cache CRC is incorrect indicating a corrupt cache. Incorrect cache CRC: 0x0.50JVMDUMP013I Processed dump event "corruptcache", detail "".51JVMSHRC442E Shared cache "jim" is corrupt. Corruption code is -1. Corrupt value is 0x0. No new JVMs will be allowed to connect to the cache.52-->5354<test id="Start : Cleanup" timeout="600" runPath=".">55<command>$JAVA_EXE$ $currentMode$,destroy</command>56<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>57<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>58<output type="success" caseSensitive="yes" regex="no">is destroyed</output>5960<output type="failure" caseSensitive="no" regex="no">error</output>61<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>62<output type="failure" caseSensitive="yes" regex="no">Exception:</output>63<output type="failure" caseSensitive="no" regex="no">corrupt</output>64<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>65</test>6667<!-- Pass -Xshareclasses option to <arg> to prevent shell intercepting and fragmenting comma-separated command -->6869<test id="Test 1 - a: Run option invalidateAotMethods on a non-existing cache" timeout="600" runPath=".">70<command command="$JAVA_EXE$">71<arg>$currentMode$,invalidateAotMethods={*.*(*)}</arg>72</command>73<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>7475<output type="failure" caseSensitive="no" regex="no">Invalidated the</output>76<output type="failure" caseSensitive="yes" regex="no">has been created</output>77<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>78<output type="failure" caseSensitive="yes" regex="no">Exception:</output>79<output type="failure" caseSensitive="no" regex="no">corrupt</output>80<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>81</test>8283<test id="Test 1 - b: Run option revalidateAotMethods on a non-existing cache" timeout="600" runPath=".">84<command command="$JAVA_EXE$">85<arg>$currentMode$,revalidateAotMethods={*.*(*)}</arg>86</command>87<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>8889<output type="failure" caseSensitive="no" regex="no">Revalidated the</output>90<output type="failure" caseSensitive="yes" regex="no">has been created</output>91<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>92<output type="failure" caseSensitive="yes" regex="no">Exception:</output>93<output type="failure" caseSensitive="no" regex="no">corrupt</output>94<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>95</test>9697<test id="Test 1 - c: Run option findAotMethods on a non-existing cache" timeout="600" runPath=".">98<command command="$JAVA_EXE$">99<arg>$currentMode$,findAotMethods={*.*(*)}</arg>100</command>101<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>102103<output type="failure" caseSensitive="no" regex="no">Found the</output>104<output type="failure" caseSensitive="yes" regex="no">has been created</output>105<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>106<output type="failure" caseSensitive="yes" regex="no">Exception:</output>107<output type="failure" caseSensitive="no" regex="no">corrupt</output>108<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>109</test>110111<test id="Test 2 - Setup: create an cache with AOT methods" timeout="600" runPath=".">112<command>$JAVA_EXE$ $currentMode$ -Xaot:forceAot,count=0,disableAsyncCompilation -version</command>113<output type="success" caseSensitive="no" regex="yes" javaUtilPattern="yes">(java|openjdk|semeru) version</output>114115<output type="failure" caseSensitive="yes" regex="no">error</output>116<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>117<output type="failure" caseSensitive="yes" regex="no">Exception:</output>118<output type="failure" caseSensitive="no" regex="no">corrupt</output>119<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>120</test>121122<test id="Test 3: Invalidate all the methods in java/lang/ with readOnly option" timeout="600" runPath=".">123<command command="$JAVA_EXE$">124<arg>$currentMode$,readOnly,invalidateAotMethods={java/lang/*.*(*)}</arg>125</command>126<output type="required" caseSensitive="yes" regex="no">Sub-options "readonly" and "invalidateAotMethods=" are incompatible. Sub-option "readonly" is ignored</output>127<output type="success" caseSensitive="yes" regex="no">Invalidated the</output>128129<output type="failure" caseSensitive="no" regex="no">Failed to invalidate</output>130<output type="failure" caseSensitive="yes" regex="no">error</output>131<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>132<output type="failure" caseSensitive="yes" regex="no">Exception:</output>133<output type="failure" caseSensitive="no" regex="no">corrupt</output>134<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>135</test>136137<test id="Test 4: Test printStats=aot that only valid aot methods can be printed out" timeout="600" runPath=".">138<command>$JAVA_EXE$ $currentMode$,printStats=aot</command>139<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*[\n\r](.)*for ROMClass</output>140141<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass</output>142<output type="failure" caseSensitive="yes" regex="no">error</output>143<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>144<output type="failure" caseSensitive="yes" regex="no">Exception:</output>145<output type="failure" caseSensitive="no" regex="no">corrupt</output>146<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>147</test>148149<test id="Test 5: Test printStats=invalidatedaot that only invalidated aot methods can be printed out" timeout="600" runPath=".">150<command>$JAVA_EXE$ $currentMode$,printStats=invalidatedaot</command>151<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass java\/lang\/</output>152153<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*[\n\r](.)*for ROMClass</output>154<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.(?!java\/lang\/))*at[\s]0x[\w]</output>155<output type="failure" caseSensitive="yes" regex="no">error</output>156<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>157<output type="failure" caseSensitive="yes" regex="no">Exception:</output>158<output type="failure" caseSensitive="no" regex="no">corrupt</output>159<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>160</test>161162<test id="Test 6 - a: RevalidateAotMethods all the methods in java/lang/ with readOnly option" timeout="600" runPath=".">163<command command="$JAVA_EXE$">164<arg>$currentMode$,readOnly,revalidateAotMethods={java/lang/*.*(*)}</arg>165</command>166<output type="required" caseSensitive="yes" regex="no">Sub-options "readonly" and "revalidateAotMethods=" are incompatible. Sub-option "readonly" is ignored</output>167<output type="success" caseSensitive="yes" regex="no">Revalidated the</output>168169<output type="failure" caseSensitive="no" regex="no">Failed to revalidate</output>170<output type="failure" caseSensitive="yes" regex="no">error</output>171<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>172<output type="failure" caseSensitive="yes" regex="no">Exception:</output>173<output type="failure" caseSensitive="no" regex="no">corrupt</output>174<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>175</test>176177<test id="Test 6 - b: Print out the AOT methods to check the result" timeout="600" runPath=".">178<command>$JAVA_EXE$ $currentMode$,printStats=aot+invalidatedaot</command>179<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*[\n\r](.)*for ROMClass java\/lang\/</output>180181<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: (.)*INVALIDATED[\n\r](.)*for ROMClass</output>182<output type="failure" caseSensitive="yes" regex="no">error</output>183<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>184<output type="failure" caseSensitive="yes" regex="no">Exception:</output>185<output type="failure" caseSensitive="no" regex="no">corrupt</output>186<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>187</test>188189<test id="Test 7 - a: Invalidate any methods but java/lang/Object.hashCode()" timeout="600" runPath=".">190<command command="$JAVA_EXE$">191<arg>$currentMode$,invalidateAotMethods={*.*,!java/lang/Object.hashCode()}</arg>192</command>193<output type="success" caseSensitive="yes" regex="no">Invalidated the</output>194195<output type="failure" caseSensitive="no" regex="no">Failed to invalidate</output>196<output type="failure" caseSensitive="yes" regex="no">error</output>197<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>198<output type="failure" caseSensitive="yes" regex="no">Exception:</output>199<output type="failure" caseSensitive="no" regex="no">corrupt</output>200<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>201</test>202203<test id="Test 7 - b: Find all the AOT methods and check the result" timeout="600" runPath=".">204<command>$JAVA_EXE$ $currentMode$,readOnly,findAotMethods={*.*}</command>205<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: hashCode Signature: \(\)I Address: 0x[\w]*[\n\r](.)*for ROMClass java\/lang\/Object at</output>206<output type="required" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass</output>207<output type="required" caseSensitive="yes" regex="no">Found the</output>208209<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: hashCode Signature: \(\)I Address: (.)*INVALIDATED[\n\r](.)*for ROMClass java\/lang\/Object at</output>210<output type="failure" caseSensitive="yes" regex="no">Sub-options "readonly" and "findAotMethods=" are incompatible. Sub-option "readonly" is ignored</output>211<output type="failure" caseSensitive="yes" regex="no">error</output>212<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>213<output type="failure" caseSensitive="yes" regex="no">Exception:</output>214<output type="failure" caseSensitive="no" regex="no">corrupt</output>215<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>216</test>217218<test id="Test 8: Test the first method specification that should have no effect if it has an exclamation mark" timeout="600" runPath=".">219<command command="$JAVA_EXE$">220<arg>$currentMode$,invalidateAotMethods={!java/lang/*.*(*),java/lang/Object.hashCode()}</arg>221</command>222<output type="success" caseSensitive="yes" regex="no">Invalidated the 1 AOT method(s)</output>223224<output type="failure" caseSensitive="yes" regex="no">No AOT methods match the method specification(s)</output>225<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Invalidated the [02-9]|\d{2,} AOT method(s)</output>226<output type="failure" caseSensitive="yes" regex="no">Failed to invalidate the AOT method(s)</output>227<output type="failure" caseSensitive="yes" regex="no">error</output>228<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>229<output type="failure" caseSensitive="yes" regex="no">Exception:</output>230<output type="failure" caseSensitive="no" regex="no">corrupt</output>231<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>232</test>233234<test id="Test 9 - a: Revalidate all the AOT methods" timeout="600" runPath=".">235<command command="$JAVA_EXE$">236<arg>$currentMode$,revalidateAotMethods={*.*}</arg>237</command>238<output type="success" caseSensitive="yes" regex="no">Revalidated the</output>239240<output type="failure" caseSensitive="no" regex="no">Failed to revalidate</output>241<output type="failure" caseSensitive="yes" regex="no">error</output>242<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>243<output type="failure" caseSensitive="yes" regex="no">Exception:</output>244<output type="failure" caseSensitive="no" regex="no">corrupt</output>245<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>246</test>247248<test id="Test 9 - b: Invalidate all the AOT methods but the ones matching two method specifications" timeout="600" runPath=".">249<command command="$JAVA_EXE$">250<arg>$currentMode$,invalidateAotMethods={*.*,!java/lang/Object.hashCode,!java/util/HashMap.put}</arg>251</command>252<output type="success" caseSensitive="yes" regex="no">Invalidated the</output>253254<output type="failure" caseSensitive="no" regex="no">Failed to invalidate</output>255<output type="failure" caseSensitive="yes" regex="no">error</output>256<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>257<output type="failure" caseSensitive="yes" regex="no">Exception:</output>258<output type="failure" caseSensitive="no" regex="no">corrupt</output>259<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>260</test>261262<test id="Test 9 - c: Print out the AOT methods to check the result" timeout="600" runPath=".">263<command>$JAVA_EXE$ $currentMode$,printStats=aot+invalidatedaot</command>264<output type="success" caseSensitive="yes" regex="yes" javaUtilPattern="yes">Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass</output>265266<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: hashCode Signature: \((.)*\)I Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass java\/lang\/Object at</output>267<output type="failure" caseSensitive="yes" regex="yes" javaUtilPattern="yes">AOT: put Signature: \((.)*\)V Address: 0x[\w]*\sINVALIDATED[\n\r](.)*for ROMClass java\/util\/HashMap at</output>268<output type="failure" caseSensitive="yes" regex="no">error</output>269<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>270<output type="failure" caseSensitive="yes" regex="no">Exception:</output>271<output type="failure" caseSensitive="no" regex="no">corrupt</output>272<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>273</test>274275<test id="Test 10: Try revalidating anything but two methods using two method specifications containing an exclamation mark" timeout="600" runPath=".">276<command command="$JAVA_EXE$">277<arg>$currentMode$,revalidateAotMethods={!java/lang/Object.hashCode,!java/util/HashMap.put}</arg>278</command>279<output type="success" caseSensitive="yes" regex="no">No AOT methods match the method specification(s)</output>280281<output type="failure" caseSensitive="yes" regex="no">Failed to revalidate the AOT method(s)</output>282<output type="failure" caseSensitive="yes" regex="no">Revalidated the</output>283<output type="failure" caseSensitive="yes" regex="no">error</output>284<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>285<output type="failure" caseSensitive="yes" regex="no">Exception:</output>286<output type="failure" caseSensitive="no" regex="no">corrupt</output>287<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>288</test>289290<test id="Test 11: Pass multiple exclamation marks" timeout="600" runPath=".">291<command command="$JAVA_EXE$">292<arg>$currentMode$,invalidateAotMethods={!!java/lang/*.*(*)}</arg>293</command>294<output type="success" caseSensitive="yes" regex="no">Failed to parse the method specification(s)</output>295<output type="required" caseSensitive="yes" regex="no">Failed to invalidate the AOT method(s)</output>296297<output type="failure" caseSensitive="yes" regex="no">Invalidated the</output>298<output type="failure" caseSensitive="yes" regex="no">error</output>299<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>300<output type="failure" caseSensitive="yes" regex="no">Exception:</output>301<output type="failure" caseSensitive="no" regex="no">corrupt</output>302<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>303</test>304305<test id="At end destroy the cache for cleanup" timeout="600" runPath=".">306<command>$JAVA_EXE$ $currentMode$,destroy</command>307<output type="success" caseSensitive="yes" regex="no">Cache does not exist</output>308<output type="success" caseSensitive="yes" regex="no">has been destroyed</output>309<output type="success" caseSensitive="yes" regex="no">is destroyed</output>310311<output type="failure" caseSensitive="no" regex="no">error</output>312<output type="failure" caseSensitive="no" regex="no">Unhandled Exception</output>313<output type="failure" caseSensitive="yes" regex="no">Exception:</output>314<output type="failure" caseSensitive="no" regex="no">corrupt</output>315<output type="failure" caseSensitive="yes" regex="no">Processing dump event</output>316<output type="failure" caseSensitive="yes" regex="no">JVM requested Java dump</output>317<output type="failure" caseSensitive="yes" regex="no">JVM requested Snap dump</output>318</test>319320<!--321***** IMPORTANT NOTE *****322The last test in this file is normally a call to -Xshareclasses:destroy. When the test passes no files should ever be left behind.323-->324</suite>325326327