changeset 57174:96e706c77f92 lworld

8230925: [lworld] Some tests fail with matchCount verification when TieredCompilation is enabled
author thartmann
date Mon, 30 Sep 2019 11:03:43 +0200
parents d2eb765dc587
children c59b44adf996
files test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java test/hotspot/jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java
diffstat 2 files changed, 17 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java	Mon Sep 30 09:14:57 2019 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/TestLWorld.java	Mon Sep 30 11:03:43 2019 +0200
@@ -2102,7 +2102,9 @@
 
     // Following: should make 2 copies of the loop, one for non
     // flattened arrays, one for other cases
-    @Test(match = { COUNTEDLOOP }, matchCount = { 4 } )
+// TODO Re-enable with JDK-8231615
+//    @Test(match = { COUNTEDLOOP }, matchCount = { 4 } )
+    @Test()
     public void test84(Object[] src, Object[] dst) {
         for (int i = 0; i < src.length; i++) {
             dst[i] = src[i];
@@ -2153,7 +2155,9 @@
         Asserts.assertTrue(Arrays.equals(src, dst));
     }
 
-    @Test(match = { COUNTEDLOOP }, matchCount = { 4 } )
+// TODO Re-enable with JDK-8231615
+//    @Test(match = { COUNTEDLOOP }, matchCount = { 4 } )
+    @Test()
     public void test87(Object[] src, Object[] dst) {
         for (int i = 0; i < src.length; i++) {
             dst[i] = src[i];
@@ -2169,7 +2173,9 @@
         Asserts.assertTrue(Arrays.equals(src, dst));
     }
 
-    @Test(match = { COUNTEDLOOP }, matchCount = { 4 } )
+// TODO Re-enable with JDK-8231615
+//    @Test(match = { COUNTEDLOOP }, matchCount = { 4 } )
+    @Test()
     public void test88(Object[] src1, Object[] dst1, Object[] src2, Object[] dst2) {
         for (int i = 0; i < src1.length; i++) {
             dst1[i] = src1[i];
@@ -2242,14 +2248,15 @@
     }
 
     @Warmup(10000)
-    @Test(match = { CLASS_CHECK_TRAP }, matchCount = { 1 }, failOn = LOAD_UNKNOWN_VALUE + ALLOC_G)
+// TODO Re-enable with JDK-8231613
+//    @Test(match = { CLASS_CHECK_TRAP }, matchCount = { 1 }, failOn = LOAD_UNKNOWN_VALUE + ALLOC_G)
+    @Test(failOn = LOAD_UNKNOWN_VALUE + ALLOC_G)
     public Object test92(Object[] array) {
         // Dummy loops to ensure we run enough passes of split if
         for (int i = 0; i < 2; i++) {
             for (int j = 0; j < 2; j++) {
             }
         }
-        
         return (Integer)array[0];
     }
 
@@ -2271,7 +2278,6 @@
             for (int j = 0; j < 2; j++) {
             }
         }
-        
         Object v = (Integer)array[0];
         return v;
     }
@@ -2304,7 +2310,9 @@
     }
 
     @Warmup(10000)
-    @Test(match = { CLASS_CHECK_TRAP, LOOP }, matchCount = { 1, 1 }, failOn = LOAD_UNKNOWN_VALUE + ALLOC_G)
+// TODO Re-enable with JDK-8231613
+//    @Test(match = { CLASS_CHECK_TRAP, LOOP }, matchCount = { 1, 1 }, failOn = LOAD_UNKNOWN_VALUE + ALLOC_G)
+    @Test(match = { LOOP }, matchCount = { 1 }, failOn = LOAD_UNKNOWN_VALUE + ALLOC_G)
     public int test94(Object[] array) {
         int res = 0;
         for (int i = 1; i < 4; i *= 2) {
--- a/test/hotspot/jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java	Mon Sep 30 09:14:57 2019 +0200
+++ b/test/hotspot/jtreg/compiler/valhalla/valuetypes/ValueTypeTest.java	Mon Sep 30 11:03:43 2019 +0200
@@ -534,16 +534,10 @@
                     count++;
                     nodes += matcher.group() + "\n";
                 }
-
-                if (TieredCompilation) {
-                    // FIXME: TestLWorld.test88 fails with "expected 4 to equal 2". See JDK-8230925
-                    continue;
-                }
-
                 if (matchCount[i] < 0) {
-                    Asserts.assertLTE(Math.abs(matchCount[i]), count, "Graph for '" + testName + "' contains different number of match nodes:\n" + nodes);
+                    Asserts.assertLTE(Math.abs(matchCount[i]), count, "Graph for '" + testName + "' contains different number of match nodes (expected <= " + matchCount[i] + " but got " + count + "):\n" + nodes);
                 } else {
-                    Asserts.assertEQ(matchCount[i], count, "Graph for '" + testName + "' contains different number of match nodes:\n" + nodes);
+                    Asserts.assertEQ(matchCount[i], count, "Graph for '" + testName + "' contains different number of match nodes (expected " + matchCount[i] + " but got " + count + "):\n" + nodes);
                 }
             }
             tests.remove(testName);