Deadlock2.sh revision 4638
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
ae871ebb28959bed920cc96cd9e91063b6625b78Mark Andrews# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# This code is free software; you can redistribute it and/or modify it
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# under the terms of the GNU General Public License version 2 only, as
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# published by the Free Software Foundation.
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# This code is distributed in the hope that it will be useful, but WITHOUT
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# version 2 for more details (a copy is included in the LICENSE file that
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# accompanied this code).
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# You should have received a copy of the GNU General Public License version
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# 2 along with this work; if not, write to the Free Software Foundation,
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# or visit www.oracle.com if you need additional information or have any
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# @bug 6440846
6d100ee72e4a47dd9855d7a7d7d4509c5cd88c65Bob Halley# @summary make sure we do not deadlock between ExtClassLoader and AppClassLoader
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# @author Valerie Peng
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# set a few environment variables so that the shell-script can run stand-alone
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# in the source directory
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley echo "TESTJAVA not set. Test cannot execute."
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley echo "FAILED!!!"
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# set platform-dependent variables
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington echo "Unrecognized system!"
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington# remove old class files
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellingtonif [ -d testlib ] ; then
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellingtonif [ -d ${TESTJAVA}${FILESEP}lib${FILESEP}ext ] ; then
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington cp -r ${TESTJAVA}${FILESEP}lib${FILESEP}ext testlib
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews cp -r ${TESTJAVA}${FILESEP}jre${FILESEP}lib${FILESEP}ext testlib
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington# compile and package the test program
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington ${TESTSRC}${FILESEP}CreateSerialized.java \
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington# create serialized object and run the test
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews${TESTJAVA}${FILESEP}bin${FILESEP}java CreateSerialized