8006694: temporarily workaround combo tests are causing time out in several platforms
authorvromero
Wed, 23 Jan 2013 20:57:40 +0000
changeset 15384 5a8d00abf076
parent 15383 ee0b5f7f41b1
child 15385 ee1eebe7e210
8006694: temporarily workaround combo tests are causing time out in several platforms Reviewed-by: jjg Contributed-by: maurizio.cimadamore@oracle.com
langtools/test/Makefile
langtools/test/tools/javac/Diagnostics/6769027/T6769027.java
langtools/test/tools/javac/T7093325.java
langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java
langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java
langtools/test/tools/javac/failover/CheckAttributedTree.java
langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java
langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java
langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java
langtools/test/tools/javac/lambda/LambdaParserTest.java
langtools/test/tools/javac/lambda/MethodReferenceParserTest.java
langtools/test/tools/javac/lambda/TestInvokeDynamic.java
langtools/test/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java
langtools/test/tools/javac/lambda/typeInference/combo/TypeInferenceComboTest.java
langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/FDSeparateCompilationTest.java
langtools/test/tools/javac/lib/JavacTestingAbstractThreadedTest.java
langtools/test/tools/javac/multicatch/7030606/DisjunctiveTypeWellFormednessTest.java
langtools/test/tools/javac/varargs/7042566/T7042566.java
langtools/test/tools/javac/varargs/warning/Warn4.java
langtools/test/tools/javac/varargs/warning/Warn5.java
--- a/langtools/test/Makefile	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/Makefile	Wed Jan 23 20:57:40 2013 +0000
@@ -272,6 +272,7 @@
 	@mkdir -p $(JTREG_OUTPUT_DIR)
 	JT_JAVA=$(JT_JAVA) $(JTREG) \
 	  -J-Xmx512m \
+	  -vmoption:-Xmx768m \
 	  -a -ignore:quiet -v:fail,error,nopass \
           -r:$(JTREG_OUTPUT_DIR)/JTreport \
           -w:$(JTREG_OUTPUT_DIR)/JTwork \
--- a/langtools/test/tools/javac/Diagnostics/6769027/T6769027.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/Diagnostics/6769027/T6769027.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,14 +23,18 @@
 
 /**
  * @test
- * @bug     6769027
+ * @bug     6769027 8006694
  * @summary Source line should be displayed immediately after the first diagnostic line
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @author  Maurizio Cimadamore
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
  * @run main/othervm T6769027
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.regex.Matcher;
 import javax.tools.*;
@@ -488,7 +492,7 @@
         }
 
         if (!msg.equals(errorLine)) {
-            printInfo(msg, errorLine);
+//            printInfo(msg, errorLine);
             errCount.incrementAndGet();
         }
     }
--- a/langtools/test/tools/javac/T7093325.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/T7093325.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,17 @@
 
 /*
  * @test
- * @bug 7093325
+ * @bug 7093325 8006694
  * @summary Redundant entry in bytecode exception table
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library lib
  * @build JavacTestingAbstractThreadedTest
- * @run main T7093325
+ * @run main/othervm T7093325
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.io.File;
 import java.net.URI;
 import java.util.Arrays;
@@ -171,8 +175,6 @@
             gapsCount++;
         }
 
-        //System.out.printf("gaps %d \n %s \n", gapsCount, source.toString());
-
         File compiledTest = new File(String.format("Test%s.class", id));
         try {
             ClassFile cf = ClassFile.read(compiledTest);
--- a/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,17 @@
 
 /*
  * @test
- * @bug 8002099
+ * @bug 8002099 8006694
  * @summary Add support for intersection types in cast expression
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main/timeout=360 IntersectionTypeCastTest
+ * @run main/othervm/timeout=360 IntersectionTypeCastTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
--- a/langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/defaultMethods/super/TestDefaultSuperCall.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,17 +23,21 @@
 
 /*
  * @test
+ * @bug 8006694
  * @summary Automatic test for checking correctness of default super/this resolution
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main TestDefaultSuperCall
+ * @run main/othervm TestDefaultSuperCall
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Locale;
 import javax.tools.Diagnostic;
 import javax.tools.JavaFileObject;
 import javax.tools.SimpleJavaFileObject;
@@ -212,7 +216,6 @@
         List<String> elementsWithMethod;
 
         Shape(ElementKind... elements) {
-            errWriter.println("elements = " + Arrays.toString(elements));
             enclosingElements = new ArrayList<>();
             enclosingNames = new ArrayList<>();
             elementsWithMethod = new ArrayList<>();
@@ -406,7 +409,6 @@
 
         public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
             if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {
-                errWriter.println(diagnostic.getMessage(Locale.getDefault()));
                 errorFound = true;
             }
         }
--- a/langtools/test/tools/javac/failover/CheckAttributedTree.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,17 @@
 
 /*
  * @test
- * @bug 6970584
+ * @bug 6970584 8006694
  * @summary assorted position errors in compiler syntax trees
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main CheckAttributedTree -q -r -et ERRONEOUS .
+ * @run main/othervm CheckAttributedTree -q -r -et ERRONEOUS .
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -505,7 +509,7 @@
         }
 
         public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
-            out.println(diagnostic);
+            //out.println(diagnostic);
             switch (diagnostic.getKind()) {
                 case ERROR:
                     errors++;
--- a/langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/generics/diamond/7046778/DiamondAndInnerClassTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,17 @@
 
 /*
  * @test
- * @bug 7046778
+ * @bug 7046778 8006694
  * @summary Project Coin: problem with diamond and member inner classes
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main DiamondAndInnerClassTest
+ * @run main/othervm DiamondAndInnerClassTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import com.sun.source.util.JavacTask;
 import java.net.URI;
 import java.util.Arrays;
--- a/langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/generics/rawOverride/7062745/GenericOverrideTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,14 +23,18 @@
 
 /*
  * @test
- * @bug 7062745
+ * @bug 7062745 8006694
  * @summary  Regression: difference in overload resolution when two methods
- * are maximally specific
+ *  are maximally specific
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main GenericOverrideTest
+ * @run main/othervm GenericOverrideTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
--- a/langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambda/FunctionalInterfaceConversionTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,15 +23,19 @@
 
 /**
  * @test
- * @bug 8003280 8004102
+ * @bug 8003280 8004102 8006694
  * @summary Add lambda tests
  *  perform several automated checks in lambda conversion, esp. around accessibility
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @author  Maurizio Cimadamore
  * @library ../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main FunctionalInterfaceConversionTest
+ * @run main/othervm FunctionalInterfaceConversionTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.io.IOException;
 import java.net.URI;
 import java.util.Arrays;
--- a/langtools/test/tools/javac/lambda/LambdaParserTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambda/LambdaParserTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,14 +23,18 @@
 
 /*
  * @test
- * @bug 7115050 8003280 8005852
+ * @bug 7115050 8003280 8005852 8006694
  * @summary Add lambda tests
  *  Add parser support for lambda expressions
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main LambdaParserTest
+ * @run main/othervm LambdaParserTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
--- a/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -24,14 +24,18 @@
 /*
  * @test
  * @bug 7115052
- * @bug 8003280
+ * @bug 8003280 8006694
  * @summary Add lambda tests
  *  Add parser support for method references
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main MethodReferenceParserTest
+ * @run main/othervm MethodReferenceParserTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
--- a/langtools/test/tools/javac/lambda/TestInvokeDynamic.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambda/TestInvokeDynamic.java	Wed Jan 23 20:57:40 2013 +0000
@@ -24,15 +24,18 @@
 /*
  * @test
  * @bug 7194586
- *
- * @bug 8003280
+ * @bug 8003280 8006694
  * @summary Add lambda tests
  *  Add back-end support for invokedynamic
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main TestInvokeDynamic
+ * @run main/othervm TestInvokeDynamic
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import com.sun.source.tree.MethodInvocationTree;
 import com.sun.source.tree.MethodTree;
 import com.sun.source.util.TaskEvent;
@@ -48,7 +51,6 @@
 import com.sun.tools.classfile.Method;
 
 import com.sun.tools.javac.api.JavacTaskImpl;
-import com.sun.tools.javac.api.JavacTool;
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Symbol.MethodSymbol;
 import com.sun.tools.javac.code.Symtab;
@@ -67,11 +69,8 @@
 import java.util.Locale;
 
 import javax.tools.Diagnostic;
-import javax.tools.JavaCompiler;
 import javax.tools.JavaFileObject;
 import javax.tools.SimpleJavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
 
 import static com.sun.tools.javac.jvm.ClassFile.*;
 
--- a/langtools/test/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambda/mostSpecific/StructuralMostSpecificTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,14 +23,18 @@
 
 /*
  * @test
- * @bug 8003280
+ * @bug 8003280 8006694
  * @summary Add lambda tests
  *  Automatic test for checking correctness of structural most specific test routine
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main/timeout=600 StructuralMostSpecificTest
+ * @run main/othervm/timeout=600 StructuralMostSpecificTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
--- a/langtools/test/tools/javac/lambda/typeInference/combo/TypeInferenceComboTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambda/typeInference/combo/TypeInferenceComboTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,16 +23,20 @@
 
 /**
  * @test
- * @bug 8003280
+ * @bug 8003280 8006694
  * @summary Add lambda tests
  *  perform automated checks in type inference in lambda expressions
  *  in different contexts
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../../lib
  * @build JavacTestingAbstractThreadedTest
  * @compile  TypeInferenceComboTest.java
- * @run main/timeout=360 TypeInferenceComboTest
+ * @run main/othervm/timeout=360 TypeInferenceComboTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
@@ -256,16 +260,6 @@
     };
 
     public void run() {
-        outWriter.println("kk:");
-        StringBuilder sb = new StringBuilder("SamKind:");
-        sb.append(samKind).append(" SamTargetType:")
-            .append(samTargetType).append(" ParameterType:").append(parameterType)
-            .append(" ReturnType:").append(returnType).append(" Context:")
-            .append(context).append(" LambdaKind:").append(lambdaKind)
-            .append(" LambdaBodyType:").append(lambdaBodyType)
-            .append(" ParameterKind:").append(parameterKind).append(" Keyword:")
-            .append(keyword);
-        outWriter.println(sb);
         DiagnosticChecker dc = new DiagnosticChecker();
         JavacTask ct = (JavacTask)comp.getTask(null, fm.get(), dc,
                 null, null, Arrays.asList(samSourceFile, clientSourceFile));
--- a/langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/FDSeparateCompilationTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lambdaShapes/org/openjdk/tests/vm/FDSeparateCompilationTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,9 @@
  * questions.
  */
 
+// this test has been disabled because of timeout issues.
+// see JDK-8006746
+
 package org.openjdk.tests.vm;
 
 import java.util.*;
@@ -91,7 +94,7 @@
     private static final ConcreteMethod canonicalMethod = new ConcreteMethod(
             "String", "m", "returns " + EMPTY + ";", AccessFlag.PUBLIC);
 
-    @Test(groups = "vm", dataProvider = "allShapes")
+    @Test(enabled = false, groups = "vm", dataProvider = "allShapes")
     public void separateCompilationTest(Hierarchy hs) {
         ClassCase cc = hs.root;
         Type type = sourceTypeFrom(hs.root);
--- a/langtools/test/tools/javac/lib/JavacTestingAbstractThreadedTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/lib/JavacTestingAbstractThreadedTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -26,6 +26,7 @@
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import javax.tools.JavaCompiler;
 import javax.tools.StandardJavaFileManager;
@@ -67,9 +68,7 @@
     protected static void checkAfterExec(boolean printCheckCount)
             throws InterruptedException {
         pool.shutdown();
-        while (!pool.isTerminated()) {
-            Thread.sleep(10);
-        }
+        pool.awaitTermination(15, TimeUnit.MINUTES);
         if (errCount.get() > 0) {
             if (throwAssertionOnError) {
                 closePrinters();
--- a/langtools/test/tools/javac/multicatch/7030606/DisjunctiveTypeWellFormednessTest.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/multicatch/7030606/DisjunctiveTypeWellFormednessTest.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,17 @@
 
 /*
  * @test
- * @bug 7030606
+ * @bug 7030606 8006694
  * @summary Project-coin: multi-catch types should be pairwise disjoint
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main DisjunctiveTypeWellFormednessTest
+ * @run main/othervm DisjunctiveTypeWellFormednessTest
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import javax.tools.Diagnostic;
--- a/langtools/test/tools/javac/varargs/7042566/T7042566.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/varargs/7042566/T7042566.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,17 @@
 
 /*
  * @test
- * @bug 7042566
+ * @bug 7042566 8006694
  * @summary Unambiguous varargs method calls flagged as ambiguous
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main T7042566
+ * @run main/othervm T7042566
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.io.File;
 import java.net.URI;
 import java.util.Arrays;
--- a/langtools/test/tools/javac/varargs/warning/Warn4.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/varargs/warning/Warn4.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,14 +23,18 @@
 
 /**
  * @test
- * @bug     6945418 6993978
+ * @bug     6945418 6993978 8006694
  * @summary Project Coin: Simplified Varargs Method Invocation
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @author  mcimadamore
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main Warn4
+ * @run main/othervm Warn4
  */
 
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import java.util.Set;
@@ -238,7 +242,6 @@
         for (Warning wkind : Warning.values()) {
             boolean isSuppressed = wkind.isSuppressed(trustMe, sourceLevel,
                     suppressLevelClient, suppressLevelDecl, modKind);
-            System.out.println("SUPPRESSED = " + isSuppressed);
             badOutput |= (warnArr[wkind.ordinal()] && !isSuppressed) !=
                     diagChecker.warnings.contains(wkind);
         }
--- a/langtools/test/tools/javac/varargs/warning/Warn5.java	Wed Jan 23 15:08:03 2013 +0000
+++ b/langtools/test/tools/javac/varargs/warning/Warn5.java	Wed Jan 23 20:57:40 2013 +0000
@@ -23,13 +23,18 @@
 
 /**
  * @test
- * @bug     6993978 7097436
+ * @bug     6993978 7097436 8006694
  * @summary Project Coin: Annotation to reduce varargs warnings
+ *  temporarily workaround combo tests are causing time out in several platforms
  * @author  mcimadamore
  * @library ../../lib
  * @build JavacTestingAbstractThreadedTest
- * @run main Warn5
+ * @run main/othervm Warn5
  */
+
+// use /othervm to avoid jtreg timeout issues (CODETOOLS-7900047)
+// see JDK-8006746
+
 import java.net.URI;
 import java.util.Arrays;
 import java.util.EnumSet;