8203809: [Graal] JDI tests fail with: JDITestRuntimeException : ** event IS NOT a breakpoint **
authordtitov
Wed, 13 Jun 2018 10:36:13 -0700
changeset 50551 367763702685
parent 50550 41ff671ed8cf
child 50552 7439ceaae8e4
8203809: [Graal] JDI tests fail with: JDITestRuntimeException : ** event IS NOT a breakpoint ** Reviewed-by: sspitsyn, cjplummer
test/hotspot/jtreg/ProblemList-graal.txt
test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002.java
test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002.java
test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilters.java
--- a/test/hotspot/jtreg/ProblemList-graal.txt	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/ProblemList-graal.txt	Wed Jun 13 10:36:13 2018 -0700
@@ -114,13 +114,6 @@
 vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java                                            8203174   generic-all
 vmTestbase/nsk/jdi/VMOutOfMemoryException/VMOutOfMemoryException001/VMOutOfMemoryException001.java        8203174   generic-all
 
-vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003/TestDescription.java   8203809   generic-all
-vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002/TestDescription.java        8203809   generic-all
-vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002/TestDescription.java      8203809   generic-all
-vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002/TestDescription.java  8203809   generic-all
-vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002/TestDescription.java   8203809   generic-all
-vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002/TestDescription.java    8203809   generic-all
-
 vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses026/TestDescription.java   8195627   generic-all
 vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses028/TestDescription.java   8195627   generic-all
 vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses030/TestDescription.java   8195627   generic-all
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassExclusionFilter/filter003.java	Wed Jun 13 10:36:13 2018 -0700
@@ -494,7 +494,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_rt/filter_rt002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -501,7 +501,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassPrepareRequest/addClassFilter_s/filter_s002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -498,7 +498,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/classPrepareRequests/clsprepreq002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -530,7 +530,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodEntryRequests/methentreq002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -525,7 +525,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/EventRequestManager/methodExitRequests/methexitreq002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -525,7 +525,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodEntryRequest/addClassExclusionFilter/filter002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -495,7 +495,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/MethodExitRequest/addClassExclusionFilter/filter002.java	Wed Jun 13 10:36:13 2018 -0700
@@ -495,7 +495,7 @@
 
             log2("      received: " + event);
 
-            if (EventFilters.filtered(event)) {
+            if (EventFilters.filtered(event, debuggeeName)) {
                 eventSet.resume();
             }
             else {
--- a/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilters.java	Wed Jun 13 07:53:27 2018 +0200
+++ b/test/hotspot/jtreg/vmTestbase/nsk/share/jdi/EventFilters.java	Wed Jun 13 10:36:13 2018 -0700
@@ -339,4 +339,18 @@
 
         return false;
     }
+
+    // Filters out events with location not matching the given type.
+    public static boolean filtered(Event event, String typeName) {
+        if (event instanceof Locatable) {
+            Location location = ((Locatable) event).location();
+            if (location != null) {
+                ReferenceType declaringType = location.declaringType();
+                if (declaringType != null && typeName.equals(declaringType.name())) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
 }