changeset 15265:34af9fbce1d4

Use ignore instead of commenting out tests. Add timeout for some tests that may block forever
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 22 Apr 2014 17:50:13 +0200
parents 29e3ba750c9e
children dfea12511642
files graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/EscapingNewFloatStringTest.java graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/lambda/ObjectArrayInstanceDerivedTest.java graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/lambda/ObjectArrayInstanceTest.java graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test6959129.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/micro/FloatingReads.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitor_contended01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitor_notowner01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitorenter01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitorenter02.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait02.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait03.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait04.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/SynchronizedLoopExit01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted02.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted03.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted04.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted05.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join02.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join03.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_sleep01.java graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_yield01.java
diffstat 25 files changed, 70 insertions(+), 67 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/EscapingNewFloatStringTest.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/EscapingNewFloatStringTest.java	Tue Apr 22 17:50:13 2014 +0200
@@ -22,6 +22,8 @@
  */
 package com.oracle.graal.compiler.hsail.test;
 
+import org.junit.*;
+
 /**
  * Tests creating a new String from a float.
  */
@@ -35,8 +37,8 @@
         myOutArray[gid] = Float.toString(gid * 2.22f);
     }
 
-    // problems runs out of memory space while inlining
-    // @Test
+    @Ignore("problems runs out of memory space while inlining")
+    @Test
     public void test() {
         testGeneratedHsail();
     }
--- a/graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/lambda/ObjectArrayInstanceDerivedTest.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/lambda/ObjectArrayInstanceDerivedTest.java	Tue Apr 22 17:50:13 2014 +0200
@@ -23,6 +23,8 @@
 
 package com.oracle.graal.compiler.hsail.test.lambda;
 
+import org.junit.*;
+
 import com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester;
 
 /**
@@ -69,12 +71,14 @@
         });
     }
 
-    // @Test
+    @Ignore
+    @Test
     public void test() {
         testGeneratedHsail();
     }
 
-    // @Test
+    @Ignore
+    @Test
     public void testUsingLambdaMethod() {
         testGeneratedHsailUsingLambdaMethod();
     }
--- a/graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/lambda/ObjectArrayInstanceTest.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.compiler.hsail.test/src/com/oracle/graal/compiler/hsail/test/lambda/ObjectArrayInstanceTest.java	Tue Apr 22 17:50:13 2014 +0200
@@ -24,7 +24,8 @@
 package com.oracle.graal.compiler.hsail.test.lambda;
 
 import com.oracle.graal.compiler.hsail.test.infra.GraalKernelTester;
-import org.junit.Test;
+
+import org.junit.*;
 
 /**
  * Tests calling a method on an object when there are no derived types of that object.
@@ -53,11 +54,13 @@
         });
     }
 
+    @Ignore
     @Test
     public void test() {
         testGeneratedHsail();
     }
 
+    @Ignore
     @Test
     public void testUsingLambdaMethod() {
         testGeneratedHsailUsingLambdaMethod();
--- a/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/CheckGraalInvariants.java	Tue Apr 22 17:50:13 2014 +0200
@@ -43,15 +43,16 @@
 import com.oracle.graal.phases.util.*;
 import com.oracle.graal.phases.verify.*;
 import com.oracle.graal.runtime.*;
+import com.oracle.graal.test.*;
 
 /**
  * Checks that all classes in graal.jar (which must be on the class path) comply with global
  * invariants such as using {@link Object#equals(Object)} to compare certain types instead of
  * identity comparisons.
  */
-public class CheckGraalInvariants {
+public class CheckGraalInvariants extends GraalTest {
 
-    @Test
+    @LongTest
     public void test() {
         RuntimeProvider rt = Graal.getRequiredCapability(RuntimeProvider.class);
         Providers providers = rt.getHostBackend().getProviders();
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotpath/HP_series.java	Tue Apr 22 17:50:13 2014 +0200
@@ -24,6 +24,8 @@
 
 package com.oracle.graal.jtt.hotpath;
 
+import org.junit.*;
+
 import com.oracle.graal.jtt.*;
 
 /*
@@ -104,7 +106,8 @@
      * different implementation may return different results. The 11 ulp delta allowed for test(100)
      * tries to account for that but is not guaranteed to work forever.
      */
-    // @Test
+    @Ignore("failure-prone because of the variabiliy of pow/cos/sin")
+    @Test
     public void run0() throws Throwable {
         double expected = 0.6248571921291398d;
         runTestWithDelta(11 * Math.ulp(expected), "test", 100);
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test6959129.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/hotspot/Test6959129.java	Tue Apr 22 17:50:13 2014 +0200
@@ -22,30 +22,16 @@
  */
 package com.oracle.graal.jtt.hotspot;
 
+import org.junit.*;
+
 import com.oracle.graal.jtt.*;
 
-//@formatter:off
-
-/**
- * @test
- * @bug 6959129
- * @summary COMPARISON WITH INTEGER.MAX_INT DOES NOT WORK CORRECTLY IN THE CLIENT VM.
- *
- *          This test will not run properly without assertions
- *
- * @run main/othervm -ea Test6959129
- */
 public class Test6959129 extends JTTTest {
 
-    public static int test() {
+    public static long test() {
         int min = Integer.MAX_VALUE - 30000;
         int max = Integer.MAX_VALUE;
-        try {
-            maxMoves(min, max);
-        } catch (AssertionError e) {
-            return 95;
-        }
-        return 97;
+        return maxMoves(min, max);
     }
 
     /**
@@ -55,7 +41,9 @@
         long n = n2;
         long moves = 0;
         while (n != 1) {
-            assert n > 1;
+            if (n <= 1) {
+                throw new IllegalStateException();
+            }
             if (isEven(n)) {
                 n = n / 2;
             } else {
@@ -86,7 +74,7 @@
         return maxmoves;
     }
 
-    //@Test
+    @Test(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/micro/FloatingReads.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/micro/FloatingReads.java	Tue Apr 22 17:50:13 2014 +0200
@@ -22,6 +22,8 @@
  */
 package com.oracle.graal.jtt.micro;
 
+import org.junit.*;
+
 import com.oracle.graal.jtt.*;
 
 public class FloatingReads extends JTTTest {
@@ -61,22 +63,22 @@
         return a + b + c;
     }
 
-    // @Test
+    @Test
     public void run0() {
         runTest("test", 10);
     }
 
-    // @Test
+    @Test
     public void run1() {
         runTest("test", 1000);
     }
 
-    // @Test
+    @Test
     public void run2() {
         runTest("test", 1);
     }
 
-    // @Test
+    @Test
     public void run3() {
         runTest("test", 0);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitor_contended01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitor_contended01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -71,7 +71,7 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitor_notowner01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitor_notowner01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -62,7 +62,7 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitorenter01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitorenter01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -41,7 +41,7 @@
         }
     }
 
-    @Test
+    @Test(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitorenter02.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Monitorenter02.java	Tue Apr 22 17:50:13 2014 +0200
@@ -45,7 +45,7 @@
         }
     }
 
-    @Test
+    @Test(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -57,22 +57,22 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test", 0);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run1() throws Throwable {
         runTest("test", 1);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run2() throws Throwable {
         runTest("test", 3);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run3() throws Throwable {
         runTest("test", 15);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait02.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait02.java	Tue Apr 22 17:50:13 2014 +0200
@@ -57,17 +57,17 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test", 0);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run1() throws Throwable {
         runTest("test", 1);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run2() throws Throwable {
         runTest("test", 2);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait03.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait03.java	Tue Apr 22 17:50:13 2014 +0200
@@ -63,17 +63,17 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test", 0);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run1() throws Throwable {
         runTest("test", 1);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run2() throws Throwable {
         runTest("test", 2);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait04.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Object_wait04.java	Tue Apr 22 17:50:13 2014 +0200
@@ -67,32 +67,32 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test", 0);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run1() throws Throwable {
         runTest("test", 1);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run2() throws Throwable {
         runTest("test", 2);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run3() throws Throwable {
         runTest("test", 3);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run4() throws Throwable {
         runTest("test", 4);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run5() throws Throwable {
         runTest("test", 5);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/SynchronizedLoopExit01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/SynchronizedLoopExit01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -30,9 +30,9 @@
 
 /**
  * Inspired by {@code com.sun.media.sound.DirectAudioDevice$DirectDL.drain()}.
- * 
+ *
  * Two loop exits hold a monitor while merging.
- * 
+ *
  */
 public final class SynchronizedLoopExit01 extends JTTTest {
 
@@ -53,7 +53,7 @@
         return b;
     }
 
-    @Test
+    @Test(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted02.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted02.java	Tue Apr 22 17:50:13 2014 +0200
@@ -85,12 +85,12 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test", 0, 0);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run1() throws Throwable {
         runTest("test", 1, 500);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted03.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted03.java	Tue Apr 22 17:50:13 2014 +0200
@@ -68,7 +68,7 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted04.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted04.java	Tue Apr 22 17:50:13 2014 +0200
@@ -66,7 +66,7 @@
 
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted05.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_isInterrupted05.java	Tue Apr 22 17:50:13 2014 +0200
@@ -66,7 +66,7 @@
         }
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -43,7 +43,7 @@
         cont = false;
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join02.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join02.java	Tue Apr 22 17:50:13 2014 +0200
@@ -50,7 +50,7 @@
         cont = false;
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join03.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_join03.java	Tue Apr 22 17:50:13 2014 +0200
@@ -47,7 +47,7 @@
         cont = false;
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_sleep01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_sleep01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -35,17 +35,17 @@
         return System.currentTimeMillis() - before >= i;
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test", 10);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run1() throws Throwable {
         runTest("test", 20);
     }
 
-    @LongTest
+    @LongTest(timeout = 20000)
     public void run2() throws Throwable {
         runTest("test", 100);
     }
--- a/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_yield01.java	Tue Apr 22 15:12:38 2014 +0200
+++ b/graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/threads/Thread_yield01.java	Tue Apr 22 17:50:13 2014 +0200
@@ -35,7 +35,7 @@
         return true;
     }
 
-    @Test
+    @Test(timeout = 20000)
     public void run0() throws Throwable {
         runTest("test");
     }