-
Bug
-
Resolution: Fixed
-
P5
-
unknown
-
tiger
-
generic
-
linux
-
Verified
Name: vsR10238 Date: 05/13/2003
Filed By : J2SE-SQA [###@###.###
JDK : JDK1.4.2-b22
Testbase : Regression-test
Falling test[s]:
com/sun/security/auth/module/Sample.sh
javax/security/auth/PrivateCredentialPermission/Subset.sh
javax/security/auth/Subject/doAs/Test.sh
java/security/UnresolvedPermission/Serial.java
sun/security/provider/PolicyFile/getinstance/getinstance.sh
5 Regression-test tests from regression test suite for JDK1.4.2-b22 fail because they try to write
to test source directory which should be read-only. These tests should better use
the TESTCLASSES variable to write class files and the scratch subdirectory
to perform output as other tests do.
Below are excerpts from the tests:
---- com/sun/security/auth/module/Sample.sh: ----
cd ${TESTSRC}${FS}
rm Sample.class
#rm sample.config
${TESTJAVA}${FS}bin${FS}javac -d ${TESTSRC}${FS} ${TESTSRC}${FS}Sample.java
WD=`pwd`
cd ${TESTSRC}${FS}
cd $WD
echo $WD
echo "JDK is ${TESTJAVA}"
CreateConfig
---- javax/security/auth/PrivateCredentialPermission/Subset.sh: ----
cd ${TESTSRC}${FS}
rm Subset.class
${TESTJAVA}${FS}bin${FS}javac -d ${TESTSRC}${FS} ${TESTSRC}${FS}Subset.java
---- javax/security/auth/Subject/doAs/Test.sh: ----
cd ${TESTSRC}${FS}
rm Test.class
${TESTJAVA}${FS}bin${FS}javac -d ${TESTSRC}${FS} ${TESTSRC}${FS}Test.java
---- java/security/UnresolvedPermission/Serial.java: ----
f = new File(System.getProperty("test.src", "."), "serialized");
FileOutputStream fos = new FileOutputStream(f);
---- sun/security/provider/PolicyFile/getinstance/getinstance.sh: ----
cd ${TESTSRC}${FS}
${TESTJAVA}${FS}bin${FS}javac ${TESTSRC}${FS}NoArgPermission.java
${TESTJAVA}${FS}bin${FS}javac ${TESTSRC}${FS}OneArgPermission.java
${TESTJAVA}${FS}bin${FS}javac ${TESTSRC}${FS}TwoArgPermission.java
${TESTJAVA}${FS}bin${FS}javac ${TESTSRC}${FS}TwoArgNullActionsPermission.java
${TESTJAVA}${FS}bin${FS}javac ${TESTSRC}${FS}GetInstance.java
if [ ! -d ${TESTSRC}${FS}tmp ]; then
mkdir -p ${TESTSRC}${FS}tmp
fi
cp ${TESTSRC}${FS}*Permission*.class ${TESTSRC}${FS}tmp${FS}
Test source location:
=====================
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/com/sun/security/auth/module/Sample.sh
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/javax/security/auth/PrivateCredentialPermission/Subset.sh
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/javax/security/auth/Subject/doAs/Test.sh
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/java/security/UnresolvedPermission/Serial.java
/java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh
How to reproduce:
=================
Run the following script (you may need to change its variables)
--- script start ---
#!/bin/sh
RESULT_DIR=`pwd`
WORK_DIR=$RESULT_DIR/workDir/test
REPORT_DIR=$RESULT_DIR/reportDir
JT_HOME="/net/jtgb4u4c/export/sail16/jct-tools/3.1.2"
JAVA_HOME="/java/re/jdk/1.4.2/promoted/rc/b22/binaries/solaris-sparc"
TEST_BASE_PATH="/java/re/jdk/1.4.2/promoted/rc/b22/ws/j2se/test"
TESTWITH=$JAVA_HOME
TESTJAVA=$JAVA_HOME
JTOPTS="-server"
TESTVMOPTS="-server"
CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar:$JT_HOME/jemmy/jemmy.jar"
export JAVA_HOME
export JT_HOME
export TESTWITH
export CLASSPATH
mkdir -p $WORK_DIR/scratch 2>&1
mkdir -p $WORK_DIR/jtData 2>&1
mkdir -p $REPORT_DIR 2>&1
#rm $WORK_DIR/jtData/ResultCache.jtw 2>&1
cd $WORK_DIR/scratch
$JAVA_HOME/bin/java -cp $CLASSPATH $JTOPTS \
-DenvVars=TESTJAVAHOME=$JAVA_HOME,TESTVMOPTS=$TESTVMOPTS,DISPLAY=:0,\
HOME=$HOME/.regtest,PATH=/bin:/usr/bin,CPAPPEND=$JT_HOME/jemmy/jemmy.jar,\
TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= \
-DDISPLAY=:0 -DlocalHost="JCC-ITANIUM-01" -Dprogram=jtreg \
com.sun.javatest.regtest.Main \
-a -v default -batch \
-params \
-w "$WORK_DIR" -r "$REPORT_DIR" -t "$TEST_BASE_PATH" "$TEST_BASE_PATH/com/sun/security/auth/module/Sample.sh"
--- script end ---
Test output (jtr part):
=======================
----------System.out:(3/166)----------
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module
JDK is /net/jdk/export/disk8/local.java/jdk1.4.2/linux-ia64
Generating config file ...
----------System.err:(14/1384)----------
rm: cannot remove `Sample.class': No such file or directory
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.java:27: error while writing Sample: /net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.class (Permission denied)
public class Sample {
^
1 error
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
/net/jtgb4u4c/export/sail16/Regression/test/1.4.2/com/sun/security/auth/module/Sample.sh: sample.config: Permission denied
Exception in thread "main" java.lang.NoClassDefFoundError: Sample
result: Failed. Execution failed: exit code 1
test result: Failed. Execution failed: exit code 1
Specific machine info:
======================
Hostname: JCC-ITANIUM-01
OS: RedHat Linux 2.1 Adv. Server
Hostname: JCC-ITANIUM-02
OS: Windows 2003 Enterprise
======================================================================
- relates to
-
JDK-4938077 TEST_BUG: 2 Regression-test tests write to test source directory
- Closed
-
JDK-4941615 TEST_BUG: Regression-test .../ResponseCacheTest.java writes to test.src
- Closed