Review request: JDK-7162111 TEST_BUG: change tests run in headless mode [macosx] (original) (raw)

Jim Gish jim.gish at oracle.com
Thu Nov 15 15:24:14 UTC 2012


Alexey -- where's the webrev? This message just appeared in core-libs-dev, but I don't see the previous message(s) it appears to be a follow-up to.

Thanks, Jim On 11/15/2012 10:08 AM, Alexey Utkin wrote: > Let's move forward step by step and be very accurate. > There are ~35 CoreLib tests with AWT/Swing. >> Here they are with short annotation (sub-question: is > [closed/com/sun/jmx] a part of CoreLib? It is not in your list.): > *closed/com/sun/jmx/snmp/B7159066.java : * > test for AppContext - Useless in absence of AWT, headless - ok >> *closed/com/sun/jmx/trace/JmxTraceTest.java : * > test for AppContext - Useless in absence of AWT, headless - ok >> closed/java/net/URLClassLoader/ResExists.java : > Dirty test. Depends from rt.jar entry > ["javax/swing/plaf/metal/icons/Warn.gif"] that is used > for resource URL construction by App Class Loader. > Test fails in absence of AWT, headless - ok. > Easy to fix, but it cuts off test coverage. >> closed/java/lang/ClassLoader/CheckClassName.java : > Covers class loader functionality. > Fails in absence of AWT, headless - ok > Easy to fix, but it cuts off test coverage. >> closed/java/lang/ClassLoader/resource/GetResourceForApplets.java : > Covers class loader functionality. > Manual. "ignore" keyword. Useless without AWT. >> *closed/java/lang/Package/CheckVersions.java, > closed/java/lang/Package/CheckVersionsApplet.java : > *Applet based. "ignore" keyword. Useless without AWT. >> closed/java/lang/Runtime/shutdown/Basic.java : > Has a manual part, that is useless without AWT. >> closed/java/lang/SecurityManager/Default.java : > Fails in absence of AWT, headless - ok, > Easy to fix - choose another class for test access. >> closed/java/net/InetAddress/GetLocalHost.java : > Manual applet based, that is useless without AWT. >> closed/java/util/Properties/GenerifiedUses.java : > Fails in absence of AWT, headless - ok. > Easy to fix, but it cuts off test coverage for bug: > [5061476 Generification conflict: Properties vs. > java.awt.image.ImageConsumer by neal.gafter info] >> *closed/java/util/TimeZone/Bug6351654.java: > *test for AppContext - Useless in absence of AWT, headless - ok . >> closed/java/util/TimeZone/DefaultTimeZoneTest.java : > Manual applet based, that is useless without AWT. >> closed/javax/management/security/ClientNotifForwarderTest.java : > Fixed in webrev. >> closed/javax/management/remote/mandatory/security/MarshalledObjectGetTest2.java, >> *closed/javax/management/remote/mandatory/security/MarshalledObjectGetTest2.sh, >> closed/javax/management/remote/mandatory/security/SwingLazyValueAccessor.java > : > * Applet-based app-context test. Security bug - no description. > Fails in absence of AWT, headless - ok. >> *closed/javax/script/TimeZoneAttackApplet.java, > closed/javax/script/TimeZoneUserApplet.java : > * Manual applet based, that is useless without AWT. >> com/sun/jdi/ClassesByName2Test.java : > Loads Sun Toolkit. > Easy to fix, but it cuts off test coverage for bug. >> java/io/Serializable/resolveClass/deserializeButton/Foo.java, > java/io/Serializable/resolveClass/deserializeButton/run.sh, > java/io/Serializable/resolveClass/deserializeButton/Test.java : > Fixed in webrev. >> java/io/Serializable/resolveProxyClass/NonPublicInterface.java : > Works in absence of AWT, headless - ok. > Loads the AWT and Swing classes as test cases. > The ClassNotFoundException exception does not leads to test fail. >> java/lang/management/CompilationMXBean/Basic.java : > Calls > java.awt.Toolkit.getDefaultToolkit(); > javax.swing.UIManager.getInstalledLookAndFeels(); > are in use. > Test fails in absence of AWT, headless - ok. > Easy to fix, but it cuts off test coverage. >> java/lang/reflect/Proxy/ClassRestrictions.java : > Works in absence of AWT, headless - ok. > Loads the AWT and Swing classes as test cases. > (the same scenario as > [java/io/Serializable/resolveProxyClass/NonPublicInterface.java]) > The ClassNotFoundException exception does not leads to test fail. >> java/lang/reflect/Generics/Probe.java : > Loads "javax.swing.JComboBox$AccessibleJComboBox"class. > Fails in absence of AWT, headless - ok > Easy to fix, but it cuts off test coverage. >> java/lang/Throwable/LegacyChainedExceptionSerialization.java : > Instantiates "java.awt.print.PrinterIOException"class. > Fails in absence of AWT, headless - ok > Easy to fix, but it cuts off test coverage. >> java/net/URLClassLoader/B5077773.java : > Hmm. Seems that is not URLClassLoader test. > Checks an existence of "javax/swing/text/rtf/charsets/mac.txt" entry > inside rt.jar. > Fails in absence of Swing, headless - ok >> java/util/Collections/EmptyIterator.java : > Calls > testEmptyEnumeration(javax.swing.tree.DefaultMutableTreeNode > .EMPTYENUMERATION); > testEmptyEnumeration(javax.swing.text.SimpleAttributeSet > .EMPTY.getAttributeNames()); > as constructed empty entities. > Fails in absence of Swing, headless - ok > Easy to fix. >> java/util/logging/LoggingDeadlock4.java : > Covers interaction between LogManager. and Logger.getLogger(). > Fails in absence of Awt, headless - ok > Easy to fix. >> java/util/ResourceBundle/Control/Bug6530694.java : > Swing specific test. > Useless in absence of Swing, headless - ok >> java/util/ResourceBundle/Bug6287579.java : > Checks local resource loading. > Fails in absence of Awt, headless - ok > Easy to fix, but it cuts off test coverage. >> java/util/ResourceBundle/Bug6299235Test.java : > Awt specific test. Checks local resource loading. > Useless in absence of Awt, headless - ok >> java/util/ResourceBundle/Control/Bug6530694.java : > Checks CoreResourceBundleControl on Swing UIDefaults. > Fails in absence of Awt, headless - ok >> *sun/nio/cs/TestX11CNS.java, > sun/nio/cs/TestX11JIS0201.java : > *headless - ok. The tested subject seems have no relation with AWT or > Swing. >> Questions: > 1] That have I do with tests marked as "Easy to fix, but it cuts off > test coverage"? > 2] Should I remove/move the manual tests and tests that essentially > depends from AWT or Swing? >> It seems that the switch "-Djava.awt.headless=true" is useless in all > CoreLib tests. > AWT uses the property to force running in headless mode. > There are two cases: > - manual or AWT/Swing-action dependent tests. An attempt to run they > in headless mode leads to test fail. > - AWT-class dependent tests. They skip AWT initialization.For these > cases the value of the property does not affect the result. > The only place where the "java.awt.headless" value is essential is the > image coding/decoding. >> All mentioned tests (that are marked as "headless - ok") was tested in > ssh session from Win to Mac OS without > additional switches. >> Regards, > -uta >>

Jim Gish | Consulting Member of Technical Staff | +1.781.442.0304 Oracle Java Platform Group | Core Libraries Team 35 Network Drive Burlington, MA 01803 jim.gish at oracle.com



More information about the core-libs-dev mailing list