Hi All,

I've attached a patch for awt category test fix.
The fix is related to openjdk8 (also to openjdk7).

test/java/awt/FontClass/CreateFont/BigFont.java

The failure is a showstopper, it causes a hang of test execution when launched using 
"make jdk_awt".

The reason of failure is known and has been fixed already in jdk6.

It has a corresponding CR 6868690 in the Bugster.

I am requesting a sponsor to review and to integrate the fix.

Regards,
Valerii


diff -r cfd7602f5c52 test/java/awt/FontClass/CreateFont/BigFont.java
--- a/test/java/awt/FontClass/CreateFont/BigFont.java   Wed Jun 22 10:11:19 
2011 -0700
+++ b/test/java/awt/FontClass/CreateFont/BigFont.java   Tue Dec 06 14:51:31 
2011 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, 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
@@ -21,6 +21,12 @@
  * questions.
  */
 
+/*
+  @test  
+  @bug 6522586
+  @summary Enforce limits on font creation
+  @run main BigFont
+*/
 import java.applet.*;
 import java.awt.*;
 import java.io.*;
@@ -28,8 +34,12 @@
 
 public class BigFont extends Applet {
 
+   public static void main(String args[]) {
+        System.setSecurityManager(new SecurityManager());
+        (new BigFont()).runTest1();
+   }
+
    static private class SizedInputStream extends InputStream {
-
        int size;
        int cnt = 0;
 
@@ -57,9 +67,12 @@
     public void init() {
         id = getParameter("number");
         fileName = getParameter("font");
-
         System.out.println("Applet " + id + " "+
                            Thread.currentThread().getThreadGroup());
+        runTest1();
+        runTest2();
+    }
+    void runTest1() {
         // Larger than size for a single font.
         int fontSize = 64 * 1000 * 1000;
         SizedInputStream sis = new SizedInputStream(fontSize);
@@ -74,6 +87,8 @@
                 throw new RuntimeException("Allowed file to be too large.");
             }
         }
+     }
+     void runTest2() {
         // The following part of the test was verified manually but
         // is impractical to enable  because it requires a fairly large
         // valid font to be part of the test, and we can't easily include
diff -r cfd7602f5c52 test/java/awt/FontClass/CreateFont/bigfont.html
--- a/test/java/awt/FontClass/CreateFont/bigfont.html   Wed Jun 22 10:11:19 
2011 -0700
+++ b/test/java/awt/FontClass/CreateFont/bigfont.html   Tue Dec 06 14:51:31 
2011 +0000
@@ -1,6 +1,6 @@
 <!--
 
- Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2008, 2011, 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
@@ -21,11 +21,6 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
 
-  @test
-  @bug 6522586
-  @run applet bigfont.html
-  @summary Enforce limits on font creation
-
 -->
 
 <html>
@@ -45,4 +40,3 @@
 <hr>
   </body>
 </html>
-

Reply via email to