8028711: TEST_BUG: Shell tests should pass through VM options
authoralanb
Thu, 13 Feb 2014 15:59:04 +0000
changeset 22965 78610fb00fff
parent 22964 59c522d83ed9
child 22966 b76a460d4246
8028711: TEST_BUG: Shell tests should pass through VM options Reviewed-by: alanb Contributed-by: michael.cui@oracle.com
jdk/test/com/sun/corba/5036554/TestCorbaBug.sh
jdk/test/java/awt/FontClass/CreateFont/DeleteFont.sh
jdk/test/java/awt/JAWT/JAWT.sh
jdk/test/java/awt/PrintJob/Text/stringwidth.sh
jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh
jdk/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh
jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh
jdk/test/java/net/URLPermission/nstest/lookup.sh
jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh
jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh
jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh
jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh
jdk/test/javax/print/PrintSE/PrintSE.sh
jdk/test/sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh
jdk/test/sun/security/krb5/config/dns.sh
jdk/test/sun/security/tools/keytool/autotest.sh
jdk/test/sun/tools/jconsole/ResourceCheckTest.sh
jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh
--- a/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/com/sun/corba/5036554/TestCorbaBug.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -83,7 +83,7 @@
 
 ${TESTJAVA}${FS}bin${FS}javac -d . bug${FS}*.java
 
-${TESTJAVA}${FS}bin${FS}java -cp . bug/JavaBug > test.out 2>&1 
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -cp . bug/JavaBug > test.out 2>&1 
 
 grep "NullPointerException" test.out
 
--- a/jdk/test/java/awt/FontClass/CreateFont/DeleteFont.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/awt/FontClass/CreateFont/DeleteFont.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -47,7 +47,7 @@
 cd ${TESTCLASSES}
 
 numfiles0=`ls ${TESTCLASSES} | wc -l`
-${TESTJAVA}/bin/java -Djava.io.tmpdir=${TESTCLASSES} DeleteFont
+${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.io.tmpdir=${TESTCLASSES} DeleteFont
 
 if [ $? -ne 0 ]
     then
--- a/jdk/test/java/awt/JAWT/JAWT.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/awt/JAWT/JAWT.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -165,7 +165,7 @@
 ${JAVAC} -d . ${TESTSRC}${FS}MyCanvas.java
 ${JAVAH} -jni -classpath . -d . MyCanvas
 ${MAKE} -f ${MAKEFILE}
-${JAVA} -classpath . MyCanvas
+${JAVA} ${TESTVMOPTS} -classpath . MyCanvas
 
 exit $?
 
--- a/jdk/test/java/awt/PrintJob/Text/stringwidth.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/awt/PrintJob/Text/stringwidth.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -58,7 +58,7 @@
    JAVA_HOME=$TESTJAVA
 fi
 
-    $JAVA_HOME/bin/java -cp "${CP}" StringWidth
+    $JAVA_HOME/bin/java ${TESTVMOPTS} -cp "${CP}" StringWidth
     checkstatus
 
 exit 0
--- a/jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/awt/Toolkit/AutoShutdown/ShowExitTest/ShowExitTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -175,7 +175,7 @@
 # pass, you should be able to cut and paste it into here and it will
 # run with the test harness.
 
-${TESTJAVA}/bin/java ShowExitTest
+${TESTJAVA}/bin/java ${TESTVMOPTS} ShowExitTest
 
 ###############  END YOUR TEST CODE !!!!! ############
 #Be sure the last command executed above this line returns 0 for success,
--- a/jdk/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/awt/Toolkit/BadDisplayTest/BadDisplayTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -28,10 +28,10 @@
 OS=`uname -s`
 case "$OS" in
   SunOS )
-    ${TESTJAVA}/bin/java BadDisplayTest
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
     ;;
   Linux )
-    ${TESTJAVA}/bin/java BadDisplayTest
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} BadDisplayTest
      ;;
   * )
     echo "Unsupported System: ${OS}"
--- a/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/awt/Toolkit/Headless/WrappedToolkitTest/WrappedToolkitTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -146,13 +146,13 @@
 
 case "$OS" in
   Windows* | CYGWIN* )
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          TestWrapped sun.awt.windows.WToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.windows.WToolkit";
     fi
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          -Dawt.toolkit=sun.awt.windows.WToolkit \
                          TestWrapped sun.awt.windows.WToolkit
     status=$?
@@ -162,14 +162,15 @@
     ;;
 
   SunOS | Linux )
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          -Dawt.toolkit=sun.awt.X11.XToolkit \
                          TestWrapped sun.awt.X11.XToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.awt.xawt.XToolkit";
     fi
-    AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    AWT_TOOLKIT=XToolkit ${TESTJAVA}/bin/java ${TESTVMOPTS} \
+                                              -Djava.awt.headless=true \
                                               TestWrapped sun.awt.X11.XToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
@@ -178,13 +179,13 @@
     ;;
 
   Darwin)
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          TestWrapped sun.lwawt.macosx.LWCToolkit
     status=$?
     if [ ! $status -eq "0" ]; then
       fail "Test FAILED: toolkit wrapped into HeadlessToolkit is not an instance of sun.lwawt.macosx.LWCToolkit";
     fi
-    ${TESTJAVA}/bin/java -Djava.awt.headless=true \
+    ${TESTJAVA}/bin/java ${TESTVMOPTS} -Djava.awt.headless=true \
                          -Dawt.toolkit=sun.lwawt.macosx.LWCToolkit \
                          TestWrapped sun.lwawt.macosx.LWCToolkit
     status=$?
--- a/jdk/test/java/net/URLPermission/nstest/lookup.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/net/URLPermission/nstest/lookup.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -56,4 +56,7 @@
 };
 POLICY
 
-${TESTJAVA}/bin/java -Djava.security.policy=file:./policy -Dsun.net.spi.nameservice.provider.1=simple,sun -cp ${TESTCLASSES}${PS}${TESTSRC} LookupTest -runtest ${port}
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -Djava.security.policy=file:./policy \
+    -Dsun.net.spi.nameservice.provider.1=simple,sun \
+    -cp ${TESTCLASSES}${PS}${TESTSRC} LookupTest -runtest ${port}
--- a/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -109,7 +109,7 @@
 
 go() {
     echo ''
-    sh -xc "$JAVA $DFLAG $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
+    sh -xc "$JAVA ${TESTVMOPTS} $DFLAG $1 $2 $3 $4 $5 $6 $7 $8" 2>&1
     if [ $? != 0 ]; then failures=`expr $failures + 1`; fi
 }
 
--- a/jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -211,7 +211,8 @@
 # split application classes and test plugin classes
 mv ./UserPluginMetadataFormatTest*.class ./test_classes
 
-$TESTJAVA/bin/java MetadataFormatTest test_classes UserPluginMetadataFormatTest
+$TESTJAVA/bin/java ${TESTVMOPTS} \
+    MetadataFormatTest test_classes UserPluginMetadataFormatTest
 
 ###############  END YOUR TEST CODE !!!!! ############
 status=$?
--- a/jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/javax/imageio/metadata/IIOMetadataFormat/runMetadataFormatThreadTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -212,7 +212,8 @@
 # split application classes and test plugin classes
 mv ./UserPluginMetadataFormatTest*.class ./test_classes
 
-$TESTJAVA/bin/java MetadataFormatThreadTest test_classes UserPluginMetadataFormatTest
+$TESTJAVA/bin/java ${TESTVMOPTS} \
+    MetadataFormatThreadTest test_classes UserPluginMetadataFormatTest
 
 ###############  END YOUR TEST CODE !!!!! ############
 status=$?
--- a/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -198,14 +198,15 @@
 fi
 
 # Verify that all classoladers are destroyed
-${TESTJAVA}/bin/java -cp Test.jar test.Main
+${TESTJAVA}/bin/java ${TESTVMOPTS} -cp Test.jar test.Main
 if [ $? -ne 0 ] ; then
     fail "Test FAILED: some classloaders weren't destroyed."
 fi
 
 
 # Verify that ImageIO shutdown hook works correcly
-${TESTJAVA}/bin/java -cp Test.jar -DforgetSomeStreams=true test.Main
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -cp Test.jar -DforgetSomeStreams=true test.Main
 if [ $? -ne 0 ] ; then
     fail "Test FAILED: some classloaders weren't destroyed of shutdown hook failed."
 fi
--- a/jdk/test/javax/print/PrintSE/PrintSE.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/javax/print/PrintSE/PrintSE.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -46,6 +46,9 @@
 
 createJavaPolicyFile
 
-${TESTJAVA}/bin/java -Djava.security.manager -Djava.security.policy=${TESTCLASSES}/print.policy -cp ${TESTCLASSES} PrintSE
+${TESTJAVA}/bin/java ${TESTVMOPTS} \
+    -Djava.security.manager \
+    -Djava.security.policy=${TESTCLASSES}/print.policy \
+    -cp ${TESTCLASSES} PrintSE
 
 exit $?
--- a/jdk/test/sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/sun/java2d/X11SurfaceData/SharedMemoryPixmapsTest/SharedMemoryPixmapsTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -41,7 +41,7 @@
 J2D_PIXMAPS=shared
 export NO_J2D_DGA J2D_PIXMAPS
 
-${TESTJAVA}/bin/java SharedMemoryPixmapsTest
+${TESTJAVA}/bin/java ${TESTVMOPTS} SharedMemoryPixmapsTest
 
 if [ $? -ne 0 ]; then
   echo "Test failed!"
--- a/jdk/test/sun/security/krb5/config/dns.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/sun/security/krb5/config/dns.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -40,5 +40,5 @@
 
 $COMPILEJAVA/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \
    ${TESTSRC}/NamingManager.java ${TESTSRC}/DNS.java
-$TESTJAVA/bin/java -Xbootclasspath/p:. DNS
+$TESTJAVA/bin/java ${TESTVMOPTS} -Xbootclasspath/p:. DNS
 
--- a/jdk/test/sun/security/tools/keytool/autotest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -106,7 +106,7 @@
 chmod u+w key3.db
 chmod u+w cert8.db
 
-echo | ${TESTJAVA}${FS}bin${FS}java -Dnss \
+echo | ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dnss \
    -Dnss.lib=${LIBNAME} \
    KeyToolTest
 status=$?
--- a/jdk/test/sun/tools/jconsole/ResourceCheckTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/sun/tools/jconsole/ResourceCheckTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -102,7 +102,7 @@
                          "${TESTSRC}"/"${TARGETCLASS}".java
 #
 #Run the test class, again with the classpath we need:
-${TESTJAVA}/bin/java ${CP} ${TARGETCLASS}
+${TESTJAVA}/bin/java ${TESTVMOPTS} ${CP} ${TARGETCLASS}
 status=$?
 echo "test status was: $status"
 if [ $status -eq "0" ];
--- a/jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh	Thu Feb 13 14:08:12 2014 +0000
+++ b/jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh	Thu Feb 13 15:59:04 2014 +0000
@@ -104,7 +104,7 @@
                          "${TESTSRC}"/"${TARGETCLASS}".java
 #
 #Run the test class, again with the classpath we need:
-${TESTJAVA}/bin/java ${CP} ${TARGETCLASS}
+${TESTJAVA}/bin/java ${TESTVMOPTS} ${CP} ${TARGETCLASS}
 status=$?
 echo "test status was: $status"
 if [ $status -eq "0" ];