6203816: Can not run test/java/security/Security/ClassLoaderDeadlock.sh from the command line
authorvaleriep
Fri, 19 Nov 2010 16:59:48 -0800
changeset 7285 18435d88d6dd
parent 7284 0e3ea546be45
child 7286 4e48fc5922c6
6203816: Can not run test/java/security/Security/ClassLoaderDeadlock.sh from the command line Summary: Fixed the script to not delete the provider sub-directory Reviewed-by: weijun
jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh
jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh
--- a/jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh	Fri Nov 19 17:18:31 2010 -0500
+++ b/jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh	Fri Nov 19 16:59:48 2010 -0800
@@ -68,11 +68,10 @@
     ;;
 esac
 
-# remove old class files
 cd ${TESTCLASSES}${FILESEP}
-rm -f ClassLoaderDeadlock.class
-rm -rf provider
-mkdir provider
+if [ ! -d provider ] ; then
+    mkdir provider
+fi
 
 # compile the test program
 ${TESTJAVA}${FILESEP}bin${FILESEP}javac \
@@ -88,4 +87,11 @@
 	-classpath "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" \
 	ClassLoaderDeadlock
 
-exit $?
+STATUS=$?
+
+# clean up
+rm -f 'ClassLoaderDeadlock.class' 'ClassLoaderDeadlock$1.class' \
+'ClassLoaderDeadlock$DelayClassLoader.class' \
+provider${FILESEP}HashProvider.class
+
+exit $STATUS
--- a/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh	Fri Nov 19 17:18:31 2010 -0500
+++ b/jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh	Fri Nov 19 16:59:48 2010 -0800
@@ -26,7 +26,6 @@
 
 # @test
 # @bug 6440846
-# @ignore until 6203816 is dealt with.
 # @summary make sure we do not deadlock between ExtClassLoader and AppClassLoader
 # @author Valerie Peng
 # @run shell/timeout=20 Deadlock2.sh
@@ -71,11 +70,14 @@
 
 # remove old class files
 cd ${TESTCLASSES}
-rm -f Deadlock2*.class
 if [ -d testlib ] ; then
     rm -rf testlib
 fi
-cp -r ${TESTJAVA}${FILESEP}lib${FILESEP}ext testlib
+if [ -d ${TESTJAVA}${FILESEP}lib${FILESEP}ext ] ; then
+    cp -r ${TESTJAVA}${FILESEP}lib${FILESEP}ext testlib
+else
+    cp -r ${TESTJAVA}${FILESEP}jre${FILESEP}lib${FILESEP}ext testlib
+fi
 
 # compile and package the test program
 ${TESTJAVA}${FILESEP}bin${FILESEP}javac \