7152892: some jtreg tests fail with permission denied
Reviewed-by: coffeys
This commit is contained in:
parent
1cf765b9e8
commit
77bcb60eee
@ -23,6 +23,21 @@
|
||||
|
||||
#
|
||||
|
||||
OS=`uname -s`
|
||||
case "$OS" in
|
||||
SunOS | Linux | Darwin )
|
||||
FS="/"
|
||||
CHMOD="${FS}bin${FS}chmod"
|
||||
;;
|
||||
Windows* | CYGWIN* )
|
||||
CHMOD="chmod"
|
||||
;;
|
||||
* )
|
||||
echo "Unrecognized system!"
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ "${TESTSRC}" = "" ]
|
||||
then
|
||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
||||
@ -50,6 +65,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
||||
cp ${TESTSRC}/Assert.java .
|
||||
cp -R ${TESTSRC}/package1 .
|
||||
cp -R ${TESTSRC}/package2 .
|
||||
${CHMOD} -R u+w *
|
||||
|
||||
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} Assert.java
|
||||
|
||||
|
@ -37,11 +37,13 @@ case "$OS" in
|
||||
SunOS | Linux | Darwin | AIX )
|
||||
PS=":"
|
||||
FS="/"
|
||||
CHMOD="${FS}bin${FS}chmod"
|
||||
FILEURL="file:"
|
||||
;;
|
||||
Windows* )
|
||||
PS=";"
|
||||
FS="\\"
|
||||
CHMOD="chmod"
|
||||
FILEURL="file:/"
|
||||
if [ "$VER" -eq "5" ]; then
|
||||
ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000"
|
||||
@ -51,6 +53,7 @@ case "$OS" in
|
||||
CYGWIN* )
|
||||
PS=";"
|
||||
FS="/"
|
||||
CHMOD="chmod"
|
||||
FILEURL="file:/"
|
||||
if [ "$VER" -eq "5" ]; then
|
||||
ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000"
|
||||
@ -65,6 +68,7 @@ esac
|
||||
|
||||
TEST_CLASSPATH=.$PS${TESTCLASSPATH:-$TESTCLASSES}
|
||||
cp -r ${TESTSRC}${FS}* .
|
||||
${CHMOD} -R u+w *
|
||||
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} testPkg${FS}*java
|
||||
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -cp $TEST_CLASSPATH readTest.java
|
||||
|
||||
|
@ -63,6 +63,8 @@ public class ReadZip {
|
||||
Files.copy(Paths.get(System.getProperty("test.src", ""), "input.zip"),
|
||||
newZip.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
||||
newZip.setWritable(true);
|
||||
|
||||
// pad some bytes
|
||||
try (OutputStream os = Files.newOutputStream(newZip.toPath(),
|
||||
StandardOpenOption.APPEND)) {
|
||||
|
@ -34,14 +34,17 @@ case "$OS" in
|
||||
SunOS | Linux | Darwin | AIX )
|
||||
PS=":"
|
||||
FS="/"
|
||||
CHMOD="${FS}bin${FS}chmod"
|
||||
;;
|
||||
Windows* )
|
||||
PS=";"
|
||||
FS="\\"
|
||||
CHMOD="chmod"
|
||||
;;
|
||||
CYGWIN* )
|
||||
PS=";"
|
||||
FS="/"
|
||||
CHMOD="chmod"
|
||||
#
|
||||
# javac does not like /cygdrive produced by `pwd`.
|
||||
#
|
||||
@ -59,6 +62,7 @@ esac
|
||||
mkdir -p ${DEST}${FS}jar1
|
||||
cd ${TESTSRC}${FS}etc${FS}jar1
|
||||
cp -r . ${DEST}${FS}jar1
|
||||
${CHMOD} -R u+w ${DEST}${FS}jar1
|
||||
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
|
||||
${TESTSRC}${FS}src${FS}jar1${FS}LoadResourceBundle.java
|
||||
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
|
||||
|
Loading…
Reference in New Issue
Block a user