8253372: [TESTBUG] update tests which require jvmti - hotspot

Reviewed-by: sspitsyn, iklam
This commit is contained in:
Alex Menkov 2020-09-23 21:11:31 +00:00
parent f765a7f513
commit 3320fc0f52
36 changed files with 38 additions and 13 deletions

View File

@ -31,6 +31,7 @@
* java.base/jdk.internal.misc
* java.base/jdk.internal.reflect
* @modules java.instrument
* @requires vm.jvmti
*
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox

View File

@ -28,7 +28,7 @@
* java.base/jdk.internal.misc
* java.base/jdk.internal.vm.annotation
* @library /test/lib / ../patches
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
*
* @build sun.hotspot.WhiteBox
* java.base/java.lang.invoke.MethodHandleHelper

View File

@ -31,6 +31,7 @@
* java.instrument
* java.management
* jdk.attach
* @requires vm.jvmti
*
* @run main/othervm -Djdk.attach.allowAttachSelf compiler.jsr292.RedefineMethodUsedByMultipleMethodHandles
*/

View File

@ -24,6 +24,7 @@
/*
* @test
* @bug 8026328
* @requires vm.jvmti
* @run main/othervm/native -agentlib:Test8026328 compiler.jsr292.cr8026328.Test8026328
*/

View File

@ -24,6 +24,7 @@
/**
* @test
* @requires vm.jvmci
* @requires vm.jvmti
* @library ../../../../../
* @modules jdk.internal.vm.ci/jdk.vm.ci.meta
* jdk.internal.vm.ci/jdk.vm.ci.runtime

View File

@ -28,6 +28,7 @@
* @modules java.base/jdk.internal.misc
* java.instrument
* java.management
* @requires vm.jvmti
* @build compiler.profiling.spectrapredefineclass.Agent
* @run driver ClassFileInstaller compiler.profiling.spectrapredefineclass.Agent
* @run driver compiler.profiling.spectrapredefineclass.Launcher

View File

@ -28,6 +28,7 @@
* @modules java.base/jdk.internal.misc
* java.instrument
* java.management
* @requires vm.jvmti
* @build compiler.profiling.spectrapredefineclass_classloaders.Agent
* compiler.profiling.spectrapredefineclass_classloaders.Test
* compiler.profiling.spectrapredefineclass_classloaders.A

View File

@ -26,6 +26,7 @@
* @test TestHeapDump
* @summary Tests JVMTI heap dumps
* @requires vm.gc.Shenandoah
* @requires vm.jvmti
* @compile TestHeapDump.java
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive TestHeapDump
*
@ -35,6 +36,7 @@
* @test TestHeapDump
* @summary Tests JVMTI heap dumps
* @requires vm.gc.Shenandoah
* @requires vm.jvmti
* @requires vm.bits == "64"
* @compile TestHeapDump.java
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:-UseCompressedOops TestHeapDump
@ -44,6 +46,7 @@
* @test TestHeapDump
* @summary Tests JVMTI heap dumps
* @requires vm.gc.Shenandoah
* @requires vm.jvmti
* @compile TestHeapDump.java
* @run main/othervm/native/timeout=300 -agentlib:TestHeapDump -XX:+UnlockDiagnosticVMOptions -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -Xmx128m -XX:ShenandoahGCHeuristics=aggressive -XX:+UseStringDeduplication TestHeapDump
*/

View File

@ -24,6 +24,7 @@
/*
* @test
* @bug 6294277
* @requires vm.jvmti
* @summary java -Xdebug crashes on SourceDebugExtension attribute larger than 64K
* @run main/othervm -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n SourceDebugExtension
*/

View File

@ -24,6 +24,7 @@
/*
* @test FieldMonitor.java
* @bug 7158988
* @requires vm.jvmti
* @summary verify jvm does not crash while debugging
* @run compile TestPostFieldModification.java
* @run main/othervm FieldMonitor

View File

@ -26,6 +26,7 @@
* @test
* @bug 8173743
* @requires vm.compMode != "Xcomp"
* @requires vm.jvmti
* @summary Failures during class definition can lead to memory leaks in metaspace
* @requires vm.opt.final.ClassUnloading
* @library /test/lib

View File

@ -27,6 +27,7 @@
* @summary Redefine shared class. GC should not cause crash with cached resolved_references.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes /test/hotspot/jtreg/runtime/cds/appcds/jvmti
* @requires vm.cds.archived.java.heap
* @requires vm.jvmti
* @build sun.hotspot.WhiteBox
* RedefineClassApp
* InstrumentationClassFileTransformer

View File

@ -31,7 +31,7 @@
* See https://blogs.oracle.com/jrose/anonymous-classes-in-the-vm.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @run driver AnonVmClassesDuringDump
*/

View File

@ -27,7 +27,7 @@
* @summary When dumping the CDS archive, try to cause garbage collection while classes are being loaded.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @run driver GCDuringDump
*/

View File

@ -28,6 +28,7 @@
* option for testing the interaction with GC and shared strings.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds.archived.java.heap
* @requires vm.jvmti
* @build sun.hotspot.WhiteBox
* @run driver ClassFileInstaller sun.hotspot.WhiteBox
* @run driver/timeout=480 GCSharedStringsDuringDump

View File

@ -27,7 +27,7 @@
* @summary Test how CDS dumping handles the existence of humongous G1 regions.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds.archived.java.heap
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @run driver/timeout=240 HumongousDuringDump
*/

View File

@ -29,7 +29,7 @@
* without the locking bits in the markWord.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @modules java.instrument
* @run driver LockDuringDump
*/

View File

@ -27,6 +27,7 @@
* @summary Test jvmti class file loader hook interaction with AppCDS
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @requires vm.cds
* @requires vm.jvmti
* @build ClassFileLoadHook
* @run main/othervm/native ClassFileLoadHookTest
*/

View File

@ -28,7 +28,7 @@
* using CDS/AppCDSv1/AppCDSv2.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @build sun.hotspot.WhiteBox
* InstrumentationApp
* InstrumentationClassFileTransformer

View File

@ -27,7 +27,7 @@
* @summary CDS dumping with java agent.
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds /test/hotspot/jtreg/runtime/cds/appcds/test-classes
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @build SimpleAgent Hello
* @run main/othervm DumpingWithJavaAgent
*/

View File

@ -25,7 +25,7 @@
* @test
* @summary CDS dumping with JVMTI agent.
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @library /test/lib /test/hotspot/jtreg/runtime/cds/appcds
* @compile ../../test-classes/Hello.java
* @run main/othervm/native DumpingWithJvmtiAgent

View File

@ -31,6 +31,7 @@
* /test/hotspot/jtreg/testlibrary/jvmti
* @requires vm.cds
* @requires !vm.graal.enabled
* @requires vm.jvmti
* @build TransformUtil TransformerAgent ParallelLoad
* @run driver ParallelLoadAndTransformTest
*/

View File

@ -33,7 +33,7 @@
* /test/hotspot/jtreg/runtime/cds/appcds/customLoader
* /test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @requires !vm.graal.enabled
* @build TransformUtil TransformerAgent Interface Implementor
* @run main/othervm TransformRelatedClassesAppCDS Interface Implementor

View File

@ -33,7 +33,7 @@
* /test/hotspot/jtreg/runtime/cds/appcds/customLoader
* /test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @requires !vm.graal.enabled
* @build TransformUtil TransformerAgent SubClass SuperClazz
* @run main/othervm TransformRelatedClassesAppCDS SuperClazz SubClass

View File

@ -27,6 +27,7 @@
* @summary Run /serviceability/jvmti/RedefineClasses/RedefineRunningMethods in AppCDS mode to
* make sure class redefinition works with CDS.
* @requires vm.cds
* @requires vm.jvmti
* @library /test/lib /test/hotspot/jtreg/serviceability/jvmti/RedefineClasses /test/hotspot/jtreg/runtime/cds/appcds
* @run driver RedefineClassHelper
* @build sun.hotspot.WhiteBox RedefineBasic

View File

@ -27,6 +27,7 @@
* @summary Run /serviceability/jvmti/RedefineClasses/RedefineRunningMethods in AppCDS mode to
* make sure class redefinition works with CDS.
* @requires vm.cds
* @requires vm.jvmti
* @library /test/lib /test/hotspot/jtreg/serviceability/jvmti/RedefineClasses /test/hotspot/jtreg/runtime/cds/appcds
* @run driver RedefineClassHelper
* @build sun.hotspot.WhiteBox RedefineRunningMethods_SharedHelper

View File

@ -27,7 +27,7 @@
* with CDS with Interface/Implementor pair
* @library /test/lib /runtime/cds /testlibrary/jvmti
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @requires !vm.graal.enabled
* @build TransformUtil TransformerAgent Interface Implementor
* @run main/othervm TransformRelatedClasses Interface Implementor

View File

@ -28,7 +28,7 @@
* with CDS with SubClass and SuperClass
* @library /test/lib /runtime/cds /testlibrary/jvmti
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @requires !vm.graal.enabled
* @build TransformUtil TransformerAgent SubClass SuperClazz
* @run main/othervm TransformRelatedClasses SuperClazz SubClass

View File

@ -28,7 +28,7 @@
* with CDS with SubClass and SuperClass, each lives in own separate package
* @library /test/lib /runtime/cds /testlibrary/jvmti
* @requires vm.cds
* @requires vm.flavor != "minimal"
* @requires vm.jvmti
* @requires !vm.graal.enabled
* @build TransformUtil TransformerAgent SubClass SuperClazz
* @compile myPkg2/SubClass.java myPkg1/SuperClazz.java

View File

@ -26,6 +26,7 @@
* @bug 8227680
* @summary Tests that all FieldAccess notifications for Get*Field
with primitive type are generated.
* @requires vm.jvmti
* @compile FastGetField.java
* @run main/othervm/native -agentlib:FastGetField -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyJNIFields FastGetField
* @run main/othervm/native -agentlib:FastGetField -XX:+IgnoreUnrecognizedVMOptions -XX:-VerifyJNIFields -XX:+UnlockDiagnosticVMOptions -XX:+ForceUnreachable -XX:+SafepointALot -XX:GuaranteedSafepointInterval=1 FastGetField

View File

@ -29,6 +29,7 @@
* @library /test/lib
* @modules java.compiler
* java.instrument
* @requires vm.jvmti
* @run main RedefineClassHelper
* @run main/othervm -Xmx256m -XX:MaxMetaspaceSize=64m -javaagent:redefineagent.jar -Xlog:all=trace:file=all.log RedefineClasses
*/

View File

@ -28,6 +28,7 @@
* @modules java.base/jdk.internal.misc
* @modules java.instrument
* jdk.jartool/sun.tools.jar
* @requires vm.jvmti
* @compile --enable-preview -source ${jdk.version} RedefineRecord.java
* @run main/othervm --enable-preview RedefineRecord buildagent
* @run main/othervm/timeout=6000 --enable-preview RedefineRecord runtest

View File

@ -29,6 +29,7 @@
* @modules java.base/jdk.internal.misc
* @modules java.instrument
* jdk.jartool/sun.tools.jar
* @requires vm.jvmti
* @compile --enable-preview -source ${jdk.version} RedefineSealedClass.java
* @run main/othervm --enable-preview RedefineSealedClass buildagent
* @run main/othervm/timeout=6000 --enable-preview RedefineSealedClass runtest

View File

@ -30,6 +30,7 @@ package MyPackage;
* @compile ASGCTBaseTest.java
* @requires os.family == "linux"
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="arm" | os.arch=="aarch64" | os.arch=="ppc64" | os.arch=="s390"
* @requires vm.jvmti
* @run main/othervm/native -agentlib:AsyncGetCallTraceTest MyPackage.ASGCTBaseTest
*/

View File

@ -34,6 +34,7 @@ import static jdk.test.lib.Asserts.assertTrue;
* @library /test/lib
* @modules jdk.jdwp.agent
* @modules java.base/jdk.internal.misc
* @requires vm.jvmti
* @compile AllModulesCommandTestDebuggee.java
* @run main/othervm AllModulesCommandTest
*/

View File

@ -27,6 +27,7 @@
* @summary Tests that jvmtiEnv::GetPotentialCapabilities reports
* can_generate_all_class_hook_events capability with CDS (-Xshare:on)
* at ONLOAD and LIVE phases
* @requires vm.jvmti
* @requires vm.cds
* @library /test/lib
* @compile CanGenerateAllClassHook.java