Path: blob/master/test/functional/cmdLineTests/shrcdbgddrext/shrcdbgextddrtests.xml
6004 views
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>12<!--3Copyright (c) 2018, 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<suite id="J9 shared cache dbgext Tests" timeout="600">2728<variable name="CP" value="-cp $UTILSJAR$" />29<variable name="PROGRAM" value="org.openj9.test.ivj.Hanoi 2" />30<variable name="PROGRAM1" value="SystemProperties" />31<variable name="CACHENAME" value="shareddbgext" />32<variable name="DUMPFILE1" value="j9core1.dmp" />33<variable name="DUMPFILE1a" value="j9core1a.dmp" />34<variable name="DUMPFILE1b" value="j9core1b.dmp" />35<variable name="DUMPFILE2" value="j9core2.dmp" />36<variable name="DUMPFILE2a" value="j9core2a.dmp" />37<variable name="DUMPFILE2b" value="j9core2b.dmp" />38<variable name="DUMPDIR" value="dumpdir" />39<variable name="XDUMP" value="-Xdump:system:file=$DUMPFILE1$,events=vmstop" />40<variable name="XDUMP2" value="-Xdump:system:file=$DUMPFILE2$,events=vmstop" />4142<!-- override the JDMPVIEW_EXE command on win32 since jdmpview.exe is failing on Windows XP - CMVC 200287 -->43<variable name="JDMPVIEW_EXE" value="$EXE$ com.ibm.jvm.dtfjview.DTFJView" platforms="win_x86-32" />4445<!-- override the -Xdump command on z/OS -->46<variable name="XDUMP" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORE1.DMP,events=vmstop,request=exclusive+compact" platforms="zos.*" />47<variable name="XDUMP2" value="-Xdump:system:opts=IEATDUMP,dsn=%uid.J9CORE2.DMP,events=vmstop,request=exclusive+compact" platforms="zos.*" />4849<variable name="SHARECLASSESOPTION" value="-Xshareclasses:name=$CACHENAME$,reset,modified=mod1"/>50<variable name="JIT_OPTIONS" value="-Xjit:disableAsyncCompilation,disableInlining -Xaot:forceaot,count=1,disableAsyncCompilation,disableInlining" />51525354<test id="Create new shared cache with partition">55<command>$EXE$ $JIT_OPTIONS$ $SHARECLASSESOPTION$ -XX:-ShareAnonymousClasses $CP$ $PROGRAM$</command>56<!-- We are adding the option "-XX:-ShareAnonymousClasses" to disable the shared class cache for anonymous classes so no more orphans are stored in the cache than that we know of. -->57<output regex="no" type="success">Puzzle solved!</output>58</test>5960<test id="Add another class in the cache" >61<command>$EXE$ $JIT_OPTIONS$ -Xshareclasses:name=$CACHENAME$ -XX:-ShareAnonymousClasses $PROGRAM1$</command>62<output regex="no" type="success">OpenJ9</output>63</test>6465<exec command="touch $PROGRAM1$.class" />6667<test id="Mark previous class entry as stale" >68<command>$EXE$ $JIT_OPTIONS$ -Xshareclasses:name=$CACHENAME$ -XX:-ShareAnonymousClasses $PROGRAM1$</command>69<output regex="no" type="success">OpenJ9</output>70</test>7172<test id="Create core file">73<exec command="tso delete J9CORE1.DMP.*" platforms="zos_390-64.*" />74<exec command="tso delete J9CORE1.DMP" platforms="zos_390-31.*" />75<exec command="rm -f $DUMPFILE1$" />76<command>$EXE$ -Xmx4m -Xshareclasses:name=$CACHENAME$ -XX:-ShareAnonymousClasses $CP$ $XDUMP$ $PROGRAM$</command>77<output regex="no" type="success">Moved disk 0 to 1</output>78<output regex="no" type="success">System dump written</output>79<!-- check for unexpected core dumps -->80<output regex="no" type="failure">0001.dmp</output>81</test>8283<test id="Remove shared cache">84<command>$EXE$ -Xshareclasses:name=$CACHENAME$,destroy</command>85<output regex="no" type="success">destroyed</output>86</test>8788<test id="Check whether dump file exist">89<exec command="sh" capture="LOGNAME" platforms="zos.*" >90<arg>-c</arg>91<arg>echo $$LOGNAME</arg>92</exec>93<exec command="cp //'$LOGNAME$.J9CORE1.DMP.X001' $DUMPFILE1a$" platforms="zos_390-64.*" />94<exec command="cp //'$LOGNAME$.J9CORE1.DMP.X002' $DUMPFILE1b$" platforms="zos_390-64.*" />95<exec command="sh $CONCAT$ $DUMPFILE1a$ $DUMPFILE1b$ $DUMPFILE1$" platforms="zos_390-64.*" />96<exec command="cp //'$LOGNAME$.J9CORE1.DMP' $DUMPFILE1$" platforms="zos_390-31.*" />97<exec command="tso delete J9CORE1.DMP.*" platforms="zos_390-64.*" />98<exec command="tso delete J9CORE1.DMP" platforms="zos_390-31.*" />99<command>ls</command>100<output regex="no" type="success">$DUMPFILE1$</output>101</test>102103<test id="Run !shrc">104<command command="$JDMPVIEW_EXE$">105<arg>-core $DUMPFILE1$</arg>106<input>!shrc</input>107<input>quit</input>108</command>109<output regex="no" type="success">!shrc stats</output>110<output regex="no" type="required">!shrc allstats</output>111<output regex="no" type="required">!shrc rcstats</output>112<output regex="no" type="required">!shrc cpstats</output>113<output regex="no" type="required">!shrc orphanstats</output>114<output regex="no" type="required">!shrc scopestats</output>115<output regex="no" type="required">!shrc bytestats</output>116<output regex="no" type="required">!shrc invaotstats</output>117<output regex="no" type="required">!shrc findclass</output>118<output regex="no" type="required">!shrc findclassp</output>119<output regex="no" type="required">!shrc aotstats</output>120<output regex="no" type="required">!shrc findaot</output>121<output regex="no" type="required">!shrc findaotp</output>122<output regex="no" type="required">!shrc incache</output>123<output regex="no" type="required">!shrc method</output>124<output regex="no" type="required">!shrc jitpstats</output>125<output regex="no" type="required">!shrc findjitp</output>126<output regex="no" type="required">!shrc findjitpp</output>127<output regex="no" type="required">!shrc rtflags</output>128<output regex="no" type="failure">no shared cache</output>129<output regex="no" type="failure">unable to read</output>130<output regex="no" type="failure">could not read</output>131<output regex="no" type="failure">dump event</output>132<output regex="no" type="failure">DDRInteractiveCommandException</output>133</test>134135<test id="Run !shrc stats">136<command command="$JDMPVIEW_EXE$">137<arg>-core $DUMPFILE1$</arg>138<input>!shrc stats</input>139<input>quit</input>140</command>141<!--142Regex (>= 4) added for the success condition since there are additional143java/lang/invoke/BoundMethodHandle$Species orphan classes in OJDK MH builds.144-->145<output regex="yes" javaUtilPattern="yes" type="success" >([4-9]|[1-9][0-9]+) orphans</output>146<output regex="no" type="failure">no shared cache</output>147<output regex="no" type="failure">unable to read</output>148<output regex="no" type="failure">could not read</output>149<output regex="no" type="failure">dump event</output>150<output regex="no" type="failure">DDRInteractiveCommandException</output>151</test>152153<test id="Run !shrc allstats">154<command command="$JDMPVIEW_EXE$">155<arg>-core $DUMPFILE1$</arg>156<input>!shrc allstats</input>157<input>quit</input>158</command>159160<output regex="no" type="success">SCOPE !</output>161<output regex="no" type="required">ROMCLASS:</output>162<output regex="no" type="required" >AOT data !</output>163<output regex="no" type="required">BYTEDATA Summary</output>164<output regex="no" type="required">DEBUG Area Summary</output>165<output regex="no" type="required">CLASSPATH</output>166<output regex="no" type="required">JITHINT</output>167<output regex="no" type="required">ZIPCACHE</output>168<output regex="no" type="required">ORPHAN:</output>169<output regex="no" type="required">LineNumberTable bytes</output>170<output regex="no" type="required">LocalVariableTable bytes</output>171<output regex="no" type="failure">no shared cache</output>172<output regex="no" type="failure">unable to read</output>173<output regex="no" type="failure">could not read</output>174<output regex="no" type="failure">dump event</output>175<output regex="no" type="failure">DDRInteractiveCommandException</output>176</test>177178<test id="Run !shrc rcstats">179<command command="$JDMPVIEW_EXE$">180<arg>-core $DUMPFILE1$</arg>181<input>!shrc rcstats</input>182<input>quit</input>183</command>184<output regex="no" type="success">ROMCLASS: org/openj9/test/ivj/Disk</output>185<!-- Expect a stale entry for ROMClass for $PROGRAM1$.class (which is SystemProperties.class) as we touched the class earlier -->186<output regex="yes" javaUtilPattern="yes" type="required" >(.)*ROMCLASS: SystemProperties(.)* !STALE!</output>187<output regex="no" type="failure">no shared cache</output>188<output regex="no" type="failure">unable to read</output>189<output regex="no" type="failure">could not read</output>190<output regex="no" type="failure">dump event</output>191<output regex="no" type="failure">DDRInteractiveCommandException</output>192</test>193194<test id="Run !shrc stalestats">195<command command="$JDMPVIEW_EXE$">196<arg>-core $DUMPFILE1$</arg>197<input>!shrc stalestats</input>198<input>quit</input>199</command>200<!-- Expect a stale entry for ROMClass for $PROGRAM1$.class (which is SystemProperties.class) as we touched the class earlier -->201<output regex="yes" javaUtilPattern="yes" type="success" >(.)*ROMCLASS: SystemProperties(.)*!STALE!</output>202<output regex="no" type="required" >stale bytes</output>203204<output regex="no" type="failure">no shared cache</output>205<output regex="no" type="failure">unable to read</output>206<output regex="no" type="failure">could not read</output>207<output regex="no" type="failure">dump event</output>208<output regex="no" type="failure">DDRInteractiveCommandException</output>209</test>210211<test id="Run !shrc cpstats">212<command command="$JDMPVIEW_EXE$">213<arg>-core $DUMPFILE1$</arg>214<input>!shrc cpstats</input>215<input>quit</input>216</command>217<output regex="no" type="success">utils.jar</output>218<output regex="no" type="failure">no shared cache</output>219<output regex="no" type="failure">unable to read</output>220<output regex="no" type="failure">could not read</output>221<output regex="no" type="failure">dump event</output>222<output regex="no" type="failure">DDRInteractiveCommandException</output>223</test>224225<test id="Run !shrc orphanstats">226<command command="$JDMPVIEW_EXE$">227<arg>-core $DUMPFILE1$</arg>228<input>!shrc orphanstats</input>229<input>quit</input>230</command>231<output regex="no" type="success">ORPHAN: org/openj9/test/ivj/Disk</output>232<output regex="no" type="failure">no shared cache</output>233<output regex="no" type="failure">unable to read</output>234<output regex="no" type="failure">could not read</output>235<output regex="no" type="failure">dump event</output>236<output regex="no" type="failure">DDRInteractiveCommandException</output>237</test>238239<test id="Run !shrc scopestats">240<command command="$JDMPVIEW_EXE$">241<arg>-core $DUMPFILE1$</arg>242<input>!shrc scopestats</input>243<input>quit</input>244</command>245<output regex="no" type="success">rt.jar</output>246<output regex="no" type="success">utils.jar</output>247<output regex="no" type="success">lib/modules</output>248<output regex="no" type="success">lib\modules</output>249<output regex="no" type="failure">no shared cache</output>250<output regex="no" type="failure">unable to read</output>251<output regex="no" type="failure">could not read</output>252<output regex="no" type="failure">dump event</output>253<output regex="no" type="failure">DDRInteractiveCommandException</output>254</test>255256<test id="Run !shrc bytesstats">257<command command="$JDMPVIEW_EXE$">258<arg>-core $DUMPFILE1$</arg>259<input>!shrc bytestats</input>260<input>quit</input>261</command>262<output regex="no" type="success">BYTEDATA</output>263<output regex="no" type="failure">UNKNOWN(</output>264<output regex="no" type="failure">no shared cache</output>265<output regex="no" type="failure">unable to read</output>266<output regex="no" type="failure">could not read</output>267<output regex="no" type="failure">dump event</output>268<output regex="no" type="failure">DDRInteractiveCommandException</output>269</test>270271<test id="Run !shrc findclass">272<command command="$JDMPVIEW_EXE$">273<arg>-core $DUMPFILE1$</arg>274<input>!shrc findclass org/openj9/test/ivj/Disk</input>275<input>quit</input>276</command>277<output regex="no" type="success">ROMCLASS: org/openj9/test/ivj/Disk</output>278<output regex="no" type="failure">no shared cache</output>279<output regex="no" type="failure">unable to read</output>280<output regex="no" type="failure">could not read</output>281<output regex="no" type="failure">dump event</output>282<output regex="no" type="failure">DDRInteractiveCommandException</output>283</test>284285<test id="Run !shrc findclass for modcontext">286<command command="$JDMPVIEW_EXE$">287<arg>-core $DUMPFILE1$</arg>288<input>!shrc findclass java/lang/Object</input>289<input>quit</input>290</command>291<output regex="no" type="success">mod1</output>292<output regex="no" type="required" >2:</output>293<output regex="no" type="failure">no shared cache</output>294<output regex="no" type="failure">unable to read</output>295<output regex="no" type="failure">could not read</output>296<output regex="no" type="failure">dump event</output>297<output regex="no" type="failure">DDRInteractiveCommandException</output>298</test>299300<test id="Run !shrc findclassp">301<command command="$JDMPVIEW_EXE$">302<arg>-core $DUMPFILE1$</arg>303<input>!shrc findclassp org/openj9/test/ivj</input>304<input>quit</input>305</command>306<output regex="no" type="success">ROMCLASS: org/openj9/test/ivj/Disk</output>307<output regex="no" type="failure">no shared cache</output>308<output regex="no" type="failure">unable to read</output>309<output regex="no" type="failure">could not read</output>310<output regex="no" type="failure">dump event</output>311<output regex="no" type="failure">DDRInteractiveCommandException</output>312</test>313314<test id="Run !shrc aotstats">315<command command="$JDMPVIEW_EXE$">316<arg>-core $DUMPFILE1$</arg>317<input>!shrc aotstats</input>318<input>quit</input>319</command>320<output regex="no" type="success" >AOT data !</output>321<output regex="no" type="failure">no shared cache</output>322<output regex="no" type="failure">unable to read</output>323<output regex="no" type="failure">could not read</output>324<output regex="no" type="failure">dump event</output>325<output regex="no" type="failure">DDRInteractiveCommandException</output>326</test>327328<test id="Run !shrc findaot">329<command command="$JDMPVIEW_EXE$">330<arg>-core $DUMPFILE1$</arg>331<!-- "solve" is the core method in Hanoi -->332<input>!shrc findaot solve</input>333<input>quit</input>334</command>335<output regex="no" type="success" >solve(ILorg/openj9/test/ivj/Post</output>336<output regex="no" type="failure">no shared cache</output>337<output regex="no" type="failure">unable to read</output>338<output regex="no" type="failure">could not read</output>339<output regex="no" type="failure">dump event</output>340<output regex="no" type="failure">DDRInteractiveCommandException</output>341</test>342343<test id="Run !shrc findaotp">344<command command="$JDMPVIEW_EXE$">345<arg>-core $DUMPFILE1$</arg>346<input>!shrc findaotp sol</input>347<input>quit</input>348</command>349<output regex="no" type="success" >solve(ILorg/openj9/test/ivj/Post</output>350<output regex="no" type="failure">no shared cache</output>351<output regex="no" type="failure">unable to read</output>352<output regex="no" type="failure">could not read</output>353<output regex="no" type="failure">dump event</output>354<output regex="no" type="failure">DDRInteractiveCommandException</output>355</test>356357<test id="Run !shrc incache 256">358<command command="$JDMPVIEW_EXE$">359<arg>-core $DUMPFILE1$</arg>360<input>!shrc incache 256</input>361<input>quit</input>362</command>363<output regex="yes" javaUtilPattern="yes" type="success">0x(0)*100 is not in the shared cache</output>364<output regex="no" type="failure">no shared cache</output>365<output regex="no" type="failure">unable to read</output>366<output regex="no" type="failure">could not read</output>367<output regex="no" type="failure">dump event</output>368<output regex="no" type="failure">DDRInteractiveCommandException</output>369</test>370371<test id="Run !shrc method 256">372<command command="$JDMPVIEW_EXE$">373<arg>-core $DUMPFILE1$</arg>374<input>!shrc method 256</input>375<input>quit</input>376</command>377<output regex="yes" javaUtilPattern="yes" type="success">!j9rommethod 0x(0)*100 not found in cache</output>378<output regex="no" type="failure">no shared cache</output>379<output regex="no" type="failure">unable to read</output>380<output regex="no" type="failure">could not read</output>381<output regex="no" type="failure">dump event</output>382<output regex="no" type="failure">DDRInteractiveCommandException</output>383</test>384385<test id="Run !shrc rtflags">386<command command="$JDMPVIEW_EXE$">387<arg>-core $DUMPFILE1$</arg>388<input>!shrc rtflags</input>389<input>quit</input>390</command>391<output regex="no" type="success">Printing the shared classes runtime flags</output>392<output regex="no" type="required">RUNTIMEFLAG</output>393<output regex="no" type="failure">Type !shrc to see all the valid options</output>394<output regex="no" type="failure">no shared cache</output>395<output regex="no" type="failure">unable to read</output>396<output regex="no" type="failure">could not read</output>397<output regex="no" type="failure">dump event</output>398<output regex="no" type="failure">DDRInteractiveCommandException</output>399</test>400401<!-- Add JIT/JIT data related testcases below, All AOT related testcases should be added before this line -->402403<test id="Create core file for JIT profile tests">404<exec command="tso delete J9CORE2.DMP.*" platforms="zos_390-64.*" />405<exec command="tso delete J9CORE2.DMP" platforms="zos_390-31.*" />406<exec command="rm -f $DUMPFILE2$" />407<command>$EXE$ -Xmx4m -Xjit:disableAsyncCompilation,count=20 $SHARECLASSESOPTION$ $CP$ $XDUMP2$ $PROGRAM$</command>408<output regex="no" type="success">Moved disk 0 to 1</output>409<output regex="no" type="success">System dump written</output>410<!-- check for unexpected core dumps -->411<output regex="no" type="failure">0001.dmp</output>412</test>413414<test id="Remove shared cache created for JIT profile tests">415<command>$EXE$ -Xshareclasses:name=$CACHENAME$,destroy</command>416<output regex="no" type="success">destroyed</output>417</test>418419<test id="Check whether dump file exist in JIT profile tests">420<exec command="sh" capture="LOGNAME" platforms="zos.*" >421<arg>-c</arg>422<arg>echo $$LOGNAME</arg>423</exec>424<exec command="cp //'$LOGNAME$.J9CORE2.DMP.X001' $DUMPFILE2a$" platforms="zos_390-64.*" />425<exec command="cp //'$LOGNAME$.J9CORE2.DMP.X002' $DUMPFILE2b$" platforms="zos_390-64.*" />426<exec command="sh $CONCAT$ $DUMPFILE2a$ $DUMPFILE2b$ $DUMPFILE2$" platforms="zos_390-64.*" />427<exec command="cp //'$LOGNAME$.J9CORE2.DMP' $DUMPFILE2$" platforms="zos_390-31.*" />428<exec command="tso delete J9CORE2.DMP.*" platforms="zos_390-64.*" />429<exec command="tso delete J9CORE2.DMP" platforms="zos_390-31.*" />430<command>ls</command>431<output regex="no" type="success">$DUMPFILE2$</output>432</test>433434<test id="Run !shrc jitpstats">435<command command="$JDMPVIEW_EXE$">436<arg>-core $DUMPFILE2$</arg>437<input>!shrc jitpstats</input>438<input>quit</input>439</command>440<output regex="no" type="success" >JITPROFILE data !</output>441<output regex="no" type="required">JITPROFILE data length</output>442<output regex="no" type="failure">no shared cache</output>443<output regex="no" type="failure">unable to read</output>444<output regex="no" type="failure">could not read</output>445<output regex="no" type="failure">dump event</output>446<output regex="no" type="failure">DDRInteractiveCommandException</output>447</test>448449</suite>450451452