Skip to content

Commit

Permalink
8294486: Remove vmTestbase/nsk/jvmti/ tests ported to serviceability/…
Browse files Browse the repository at this point in the history
…jvmti.

Reviewed-by: sspitsyn
  • Loading branch information
lmesnik committed Oct 25, 2022
1 parent fec6174 commit 3bd3caf
Show file tree
Hide file tree
Showing 227 changed files with 67 additions and 23,310 deletions.
51 changes: 0 additions & 51 deletions test/hotspot/jtreg/TEST.quick-groups
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,6 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/Agent_OnLoad/agentonload002/TestDescription.java \
vmTestbase/nsk/jvmti/Agent_OnLoad/agentonload003/TestDriver.java \
vmTestbase/nsk/jvmti/Agent_OnUnload/agentonunload001/TestDriver.java \
vmTestbase/nsk/jvmti/Breakpoint/breakpoint001/TestDescription.java \
vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk001/TestDescription.java \
vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk002/TestDescription.java \
vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk003/TestDescription.java \
Expand All @@ -876,8 +875,6 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk007/TestDescription.java \
vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk008/TestDescription.java \
vmTestbase/nsk/jvmti/ClassFileLoadHook/classfloadhk009/TestDescription.java \
vmTestbase/nsk/jvmti/ClassLoad/classload001/TestDescription.java \
vmTestbase/nsk/jvmti/ClassPrepare/classprep001/TestDescription.java \
vmTestbase/nsk/jvmti/ClearBreakpoint/clrbrk001/TestDescription.java \
vmTestbase/nsk/jvmti/ClearBreakpoint/clrbrk002/TestDescription.java \
vmTestbase/nsk/jvmti/ClearBreakpoint/clrbrk005/TestDescription.java \
Expand All @@ -895,18 +892,8 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/DestroyRawMonitor/drrawmon003/TestDescription.java \
vmTestbase/nsk/jvmti/DestroyRawMonitor/drrawmon004/TestDescription.java \
vmTestbase/nsk/jvmti/DynamicCodeGenerated/dyncodgen001/TestDescription.java \
vmTestbase/nsk/jvmti/Exception/exception001/TestDescription.java \
vmTestbase/nsk/jvmti/ExceptionCatch/excatch001/TestDescription.java \
vmTestbase/nsk/jvmti/FieldAccess/fieldacc001/TestDescription.java \
vmTestbase/nsk/jvmti/FieldAccess/fieldacc002/TestDescription.java \
vmTestbase/nsk/jvmti/FieldAccess/fieldacc003/TestDescription.java \
vmTestbase/nsk/jvmti/FieldAccess/fieldacc004/TestDescription.java \
vmTestbase/nsk/jvmti/FieldModification/fieldmod001/TestDescription.java \
vmTestbase/nsk/jvmti/FieldModification/fieldmod002/TestDescription.java \
vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc001/TestDescription.java \
vmTestbase/nsk/jvmti/ForceGarbageCollection/forcegc002/TestDescription.java \
vmTestbase/nsk/jvmti/FramePop/framepop001/TestDescription.java \
vmTestbase/nsk/jvmti/FramePop/framepop002/TestDescription.java \
vmTestbase/nsk/jvmti/GenerateEvents/genevents001/TestDescription.java \
vmTestbase/nsk/jvmti/GetAllThreads/allthr001/TestDescription.java \
vmTestbase/nsk/jvmti/GetAllThreads/allthr002/TestDescription.java \
Expand Down Expand Up @@ -939,9 +926,6 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/GetClassStatus/getclstat005/TestDescription.java \
vmTestbase/nsk/jvmti/GetClassStatus/getclstat006/TestDescription.java \
vmTestbase/nsk/jvmti/GetClassStatus/getclstat007/TestDescription.java \
vmTestbase/nsk/jvmti/GetCurrentContendedMonitor/contmon001/TestDescription.java \
vmTestbase/nsk/jvmti/GetCurrentContendedMonitor/contmon002/TestDescription.java \
vmTestbase/nsk/jvmti/GetCurrentContendedMonitor/contmon003/TestDescription.java \
vmTestbase/nsk/jvmti/GetCurrentThreadCpuTime/curthrcputime001/TestDescription.java \
vmTestbase/nsk/jvmti/GetCurrentThreadCpuTimerInfo/curthrtimerinfo001/TestDescription.java \
vmTestbase/nsk/jvmti/GetEnvironmentLocalStorage/getenvstor001/TestDescription.java \
Expand All @@ -957,11 +941,6 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/GetFieldName/getfldnm003/TestDescription.java \
vmTestbase/nsk/jvmti/GetFieldName/getfldnm004/TestDescription.java \
vmTestbase/nsk/jvmti/GetFieldName/getfldnm005/TestDescription.java \
vmTestbase/nsk/jvmti/GetFrameCount/framecnt001/TestDescription.java \
vmTestbase/nsk/jvmti/GetFrameCount/framecnt002/TestDescription.java \
vmTestbase/nsk/jvmti/GetFrameCount/framecnt003/TestDescription.java \
vmTestbase/nsk/jvmti/GetFrameLocation/frameloc002/TestDescription.java \
vmTestbase/nsk/jvmti/GetFrameLocation/frameloc003/TestDescription.java \
vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf005/TestDescription.java \
vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf006/TestDescription.java \
vmTestbase/nsk/jvmti/GetImplementedInterfaces/getintrf007/TestDescription.java \
Expand Down Expand Up @@ -1017,24 +996,13 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/GetSystemProperties/getsysprops002/TestDescription.java \
vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop001/TestDescription.java \
vmTestbase/nsk/jvmti/GetSystemProperty/getsysprop002/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr001/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr002/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr003/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr004/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr005/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr006/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr007/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr008/TestDescription.java \
vmTestbase/nsk/jvmti/GetStackTrace/getstacktr009/TestDescription.java \
vmTestbase/nsk/jvmti/GetTag/gettag001/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime001/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadCpuTime/thrcputime002/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadCpuTimerInfo/thrtimerinfo001/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadGroupInfo/thrgrpinfo001/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadGroupInfo/thrgrpinfo002/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo001/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadInfo/thrinfo002/TestDescription.java \
vmTestbase/nsk/jvmti/GetThreadLocalStorage/getthrdstor001/TestDescription.java \
vmTestbase/nsk/jvmti/GetTime/gettime001/TestDescription.java \
vmTestbase/nsk/jvmti/GetTimerInfo/timerinfo001/TestDescription.java \
Expand Down Expand Up @@ -1087,17 +1055,6 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-tagged/TestDescription.java \
vmTestbase/nsk/jvmti/IterateThroughHeap/filter-class-untagged/TestDescription.java \
vmTestbase/nsk/jvmti/IterateThroughHeap/abort/Abort.java \
vmTestbase/nsk/jvmti/MethodEntry/mentry001/TestDescription.java \
vmTestbase/nsk/jvmti/MethodEntry/mentry002/TestDescription.java \
vmTestbase/nsk/jvmti/MethodExit/mexit002/TestDescription.java \
vmTestbase/nsk/jvmti/MonitorContendedEnter/mcontenter001/TestDescription.java \
vmTestbase/nsk/jvmti/MonitorContendedEntered/mcontentered001/TestDescription.java \
vmTestbase/nsk/jvmti/MonitorWait/monitorwait001/TestDescription.java \
vmTestbase/nsk/jvmti/MonitorWaited/monitorwaited001/TestDescription.java \
vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind001/TestDescription.java \
vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind002/TestDescription.java \
vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind003/TestDescription.java \
vmTestbase/nsk/jvmti/NativeMethodBind/nativemethbind004/TestDescription.java \
vmTestbase/nsk/jvmti/NotifyFramePop/nframepop001/TestDescription.java \
vmTestbase/nsk/jvmti/NotifyFramePop/nframepop002/TestDescription.java \
vmTestbase/nsk/jvmti/NotifyFramePop/nframepop003/TestDescription.java \
Expand Down Expand Up @@ -1212,20 +1169,12 @@ vmTestbase_nsk_jvmti_quick = \
vmTestbase/nsk/jvmti/SetThreadLocalStorage/setthrdstor003/TestDescription.java \
vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag001/TestDescription.java \
vmTestbase/nsk/jvmti/SetVerboseFlag/setvrbflag002/TestDescription.java \
vmTestbase/nsk/jvmti/SingleStep/singlestep001/TestDescription.java \
vmTestbase/nsk/jvmti/SingleStep/singlestep003/TestDescription.java \
vmTestbase/nsk/jvmti/SuspendThread/suspendthrd001/TestDescription.java \
vmTestbase/nsk/jvmti/SuspendThreadList/suspendthrdlst001/TestDescription.java \
vmTestbase/nsk/jvmti/StopThread/stopthrd006/TestDescription.java \
vmTestbase/nsk/jvmti/StopThread/stopthrd007/TestDescription.java \
vmTestbase/nsk/jvmti/ThreadEnd/threadend001/TestDescription.java \
vmTestbase/nsk/jvmti/ThreadEnd/threadend002/TestDescription.java \
vmTestbase/nsk/jvmti/ThreadStart/threadstart001/TestDescription.java \
vmTestbase/nsk/jvmti/ThreadStart/threadstart002/TestDescription.java \
vmTestbase/nsk/jvmti/ThreadStart/threadstart003/TestDescription.java \
vmTestbase/nsk/jvmti/VMDeath/vmdeath001/TestDescription.java \
vmTestbase/nsk/jvmti/VMInit/vminit001/TestDescription.java \
vmTestbase/nsk/jvmti/VMObjectAlloc/vmobjalloc001/TestDescription.java \
vmTestbase/nsk/jvmti/scenarios/allocation/AP01/ap01t001/TestDescription.java \
vmTestbase/nsk/jvmti/scenarios/allocation/AP02/ap02t001/TestDescription.java \
vmTestbase/nsk/jvmti/scenarios/allocation/AP03/ap03t001/TestDescription.java \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public class classprep01 {
System.loadLibrary("classprep01");
}

native static void getReady();
native static int check();
native static void getReady(Thread thread);
native static int check(Thread thread);

static volatile int result;
public static void main(String args[]) {
Expand All @@ -59,9 +59,9 @@ public static void main(String args[]) {
}
public static void testVirtualThread() {
Thread thread = Thread.startVirtualThread(() -> {
getReady();
getReady(Thread.currentThread());
new TestClassVirtual().run();
result = check();
result = check(Thread.currentThread());
});
try {
thread.join();
Expand All @@ -74,9 +74,22 @@ public static void testVirtualThread() {
}
}
public static void testPlatformThread() {
getReady();
Thread otherThread = new Thread(() -> {
new TestClass2().run();
});

getReady(Thread.currentThread());

// should generate the events
new TestClass().run();
result = check();

// loading classes on other thread should not generate the events
otherThread.start();
try {
otherThread.join();
} catch (InterruptedException e) {
}
result = check(Thread.currentThread());
if (result != 0) {
throw new RuntimeException("check failed with result " + result);
}
Expand All @@ -88,7 +101,7 @@ interface TestInterface {
void run();
}

static class TestClass implements TestInterface {
static class TestClass implements TestInterface {
static int i = 0;
int count = 0;
static {
Expand Down Expand Up @@ -116,5 +129,12 @@ public void run() {
}
}

interface TestInterface2 {
void run();
}

static class TestClass2 implements TestInterface2 {
public void run() {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ static class_info virtual_classes[] = {
{ (char *)"Lclassprep01$TestClassVirtual;", EXP_STATUS, 3, 2, 1 }
};

// These classes are loaded on a different thread.
// We should not get ClassPrepare events for them.
static const class_info unexpectedClasses[] = {
{ (char *)"Lclassprep01$TestInterface2;", 0, 0, 0, 0 },
{ (char *)"Lclassprep01$TestClass2;", 0, 0, 0, 0}
};

void printStatus(jint status) {