Review request: JDK-7162111 TEST_BUG: change tests run in headless mode [macosx] (open part)
Alexey Utkin
alexey.utkin at oracle.com
Mon Nov 19 09:57:48 UTC 2012
Bug description:
https://jbs.oracle.com/bugs/browse/JDK-7162111
Here is the suggested fix:
http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-7162111/
Summary:
Tests that are not changed and pass successfully (all tests run for jdk8):
---------------------------------------------------------------------------------------------------
java/io/Serializable/serialver/classpath/run.sh
java/io/Serializable/serialver/nested/run.sh
java/util/ResourceBundle/Control/Bug6530694.java
javax/script/CauseExceptionTest.java
javax/script/GetInterfaceTest.java
javax/script/JavaScriptScopeTest.java
javax/script/NullUndefinedVarTest.java
javax/script/PluggableContextTest.java
javax/script/ProviderTest.sh
javax/script/RhinoExceptionTest.java
javax/script/StringWriterPrintTest.java
javax/script/Test1.java
javax/script/Test2.java
javax/script/Test3.java
javax/script/Test4.java
javax/script/Test5.java
javax/script/Test6.java
javax/script/Test7.java
javax/script/Test8.java
javax/script/UnescapedBracketRegExTest.java
javax/script/VersionTest.java
sun/tools/jrunscript/jrunscript-argsTest.sh
sun/tools/jrunscript/jrunscript-cpTest.sh
sun/tools/jrunscript/jrunscript-DTest.sh
sun/tools/jrunscript/jrunscript-eTest.sh
sun/tools/jrunscript/jrunscript-fTest.sh
sun/tools/jrunscript/jrunscriptTest.sh
demo/jvmti/mtrace/TraceJFrame.java:
-----------------------------------------------------
Inapplicable in headless mode: JFrame creation time is under investigation.
Test was changed to pass successfully if headless mode was detected.
java/io/Serializable/resolveClass/deserializeButton/run.sh:
---------------------------------------------------------------------------------
The file [java/io/Serializable/resolveClass/deserializeButton/Foo.java]
was changed.
The pure Vector collection substitutes the AWT Button class in mixed
ClassLoader objects serialization.
The problem verification procedure was conserved.
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.
If the test fails with headless exception that is a good signal: test in
not a pure CoreLib algorithm and code reach GUI initialization stage.
Borderline case is the testing scripts. Script engine can preliminary
instantiate GUI sub-system, but for that case inability to execute
GUI-less scenario could be interpreted as bug.
Currently all mentioned tests with suggested changes pass on Mac OS in
ssh session from Windows machine (no chance for X11).
Regards,
-uta
More information about the core-libs-dev
mailing list