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}" = "" ]
|
if [ "${TESTSRC}" = "" ]
|
||||||
then
|
then
|
||||||
echo "TESTSRC not set. Test cannot execute. Failed."
|
echo "TESTSRC not set. Test cannot execute. Failed."
|
||||||
@ -50,6 +65,7 @@ echo "CLASSPATH=${CLASSPATH}"
|
|||||||
cp ${TESTSRC}/Assert.java .
|
cp ${TESTSRC}/Assert.java .
|
||||||
cp -R ${TESTSRC}/package1 .
|
cp -R ${TESTSRC}/package1 .
|
||||||
cp -R ${TESTSRC}/package2 .
|
cp -R ${TESTSRC}/package2 .
|
||||||
|
${CHMOD} -R u+w *
|
||||||
|
|
||||||
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} Assert.java
|
${COMPILEJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} Assert.java
|
||||||
|
|
||||||
|
@ -37,11 +37,13 @@ case "$OS" in
|
|||||||
SunOS | Linux | Darwin | AIX )
|
SunOS | Linux | Darwin | AIX )
|
||||||
PS=":"
|
PS=":"
|
||||||
FS="/"
|
FS="/"
|
||||||
|
CHMOD="${FS}bin${FS}chmod"
|
||||||
FILEURL="file:"
|
FILEURL="file:"
|
||||||
;;
|
;;
|
||||||
Windows* )
|
Windows* )
|
||||||
PS=";"
|
PS=";"
|
||||||
FS="\\"
|
FS="\\"
|
||||||
|
CHMOD="chmod"
|
||||||
FILEURL="file:/"
|
FILEURL="file:/"
|
||||||
if [ "$VER" -eq "5" ]; then
|
if [ "$VER" -eq "5" ]; then
|
||||||
ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000"
|
ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000"
|
||||||
@ -51,6 +53,7 @@ case "$OS" in
|
|||||||
CYGWIN* )
|
CYGWIN* )
|
||||||
PS=";"
|
PS=";"
|
||||||
FS="/"
|
FS="/"
|
||||||
|
CHMOD="chmod"
|
||||||
FILEURL="file:/"
|
FILEURL="file:/"
|
||||||
if [ "$VER" -eq "5" ]; then
|
if [ "$VER" -eq "5" ]; then
|
||||||
ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000"
|
ARGS="-Djdk.net.ephemeralPortRange.low=1024 -Djdk.net.ephemeralPortRange.high=65000"
|
||||||
@ -65,6 +68,7 @@ esac
|
|||||||
|
|
||||||
TEST_CLASSPATH=.$PS${TESTCLASSPATH:-$TESTCLASSES}
|
TEST_CLASSPATH=.$PS${TESTCLASSPATH:-$TESTCLASSES}
|
||||||
cp -r ${TESTSRC}${FS}* .
|
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} testPkg${FS}*java
|
||||||
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -cp $TEST_CLASSPATH readTest.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"),
|
Files.copy(Paths.get(System.getProperty("test.src", ""), "input.zip"),
|
||||||
newZip.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
newZip.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
|
||||||
|
newZip.setWritable(true);
|
||||||
|
|
||||||
// pad some bytes
|
// pad some bytes
|
||||||
try (OutputStream os = Files.newOutputStream(newZip.toPath(),
|
try (OutputStream os = Files.newOutputStream(newZip.toPath(),
|
||||||
StandardOpenOption.APPEND)) {
|
StandardOpenOption.APPEND)) {
|
||||||
|
@ -34,14 +34,17 @@ case "$OS" in
|
|||||||
SunOS | Linux | Darwin | AIX )
|
SunOS | Linux | Darwin | AIX )
|
||||||
PS=":"
|
PS=":"
|
||||||
FS="/"
|
FS="/"
|
||||||
|
CHMOD="${FS}bin${FS}chmod"
|
||||||
;;
|
;;
|
||||||
Windows* )
|
Windows* )
|
||||||
PS=";"
|
PS=";"
|
||||||
FS="\\"
|
FS="\\"
|
||||||
|
CHMOD="chmod"
|
||||||
;;
|
;;
|
||||||
CYGWIN* )
|
CYGWIN* )
|
||||||
PS=";"
|
PS=";"
|
||||||
FS="/"
|
FS="/"
|
||||||
|
CHMOD="chmod"
|
||||||
#
|
#
|
||||||
# javac does not like /cygdrive produced by `pwd`.
|
# javac does not like /cygdrive produced by `pwd`.
|
||||||
#
|
#
|
||||||
@ -59,6 +62,7 @@ esac
|
|||||||
mkdir -p ${DEST}${FS}jar1
|
mkdir -p ${DEST}${FS}jar1
|
||||||
cd ${TESTSRC}${FS}etc${FS}jar1
|
cd ${TESTSRC}${FS}etc${FS}jar1
|
||||||
cp -r . ${DEST}${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 \
|
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
|
||||||
${TESTSRC}${FS}src${FS}jar1${FS}LoadResourceBundle.java
|
${TESTSRC}${FS}src${FS}jar1${FS}LoadResourceBundle.java
|
||||||
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
|
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${DEST}${FS}jar1 \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user