JDK-7159120 : [TEST]test/com/sun/org/apache/xerces/internal/impl/Bug4693341Test.java not working properly
  • Type: Bug
  • Component: other-libs
  • Sub-Component: other
  • Affected Version: 6,6u32
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-04-04
  • Updated: 2012-10-01
  • Resolved: 2012-05-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u33 b02Fixed
Related Reports
Duplicate :  
Relates :  
Description
test/com/sun/org/apache/xerces/internal/impl/Bug4693341Test.java
is not running corrctly with JTREG. 

Error. Parse Exception: Unexpected length for bugid: 7145458,

Even after fixing the JTREG tag, testcase need supporting file in current dir
dir for JTREG or pointer back to source which testcase does not have.

Comments
SUGGESTED FIX diff --git a/test/com/sun/org/apache/xerces/internal/impl/Bug4693341.sh b/test/com/sun/org/apache/xerces/internal/impl/Bug4693341.sh new file mode 100644 --- /dev/null +++ b/test/com/sun/org/apache/xerces/internal/impl/Bug4693341.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +if [ "${TESTSRC}" = "" ] +then TESTSRC=. +fi + +if [ "${TESTJAVA}" = "" ] +then + PARENT=`dirname \`which java\`` + TESTJAVA=`dirname ${PARENT}` + echo "TESTJAVA not set, selecting " ${TESTJAVA} + echo "If this is incorrect, try setting the variable manually." +fi + +if [ "${TESTCLASSES}" = "" ] +then + echo "TESTCLASSES not set. Test cannot execute. Failed." + exit 1 +fi + +BIT_FLAG="" + +# set platform-dependent variables +OS=`uname -s` +case "$OS" in + SunOS | Linux ) + NULL=/dev/null + PS=":" + FS="/" + ## for solaris, linux it's HOME + FILE_LOCATION=$HOME + if [ -f ${FILE_LOCATION}${FS}JDK64BIT -a ${OS} = "SunOS" ] + then + BIT_FLAG=`cat ${FILE_LOCATION}${FS}JDK64BIT | grep -v '^#'` + fi + ;; + Windows_* ) + NULL=NUL + PS=";" + FS="\\" + ;; + * ) + echo "Unrecognized system!" + exit 1; + ;; +esac + +JEMMYPATH=${CPAPPEND} +CLASSPATH=.${PS}${TESTCLASSES}${PS}${JEMMYPATH} ; export CLASSPATH + +THIS_DIR=`pwd` + +cp ${TESTSRC}${FS}Bug4693341*.* ${THIS_DIR} + +${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} -version + +${TESTJAVA}${FS}bin${FS}javac *.java + +${TESTJAVA}${FS}bin${FS}java ${BIT_FLAG} Bug4693341Test > test.out 2>&1 + +STATUS=$? + +cat test.out + +exit $STATUS
04-04-2012

SUGGESTED FIX diff --git a/test/com/sun/org/apache/xerces/internal/impl/Bug4693341Test.java b/test/com/sun/org/apache/xerces/internal/impl/Bug4693341Test.java --- a/test/com/sun/org/apache/xerces/internal/impl/Bug4693341Test.java +++ b/test/com/sun/org/apache/xerces/internal/impl/Bug4693341Test.java @@ -1,11 +1,12 @@ /* * @test - * @bug 7145458, 4693341 + * @bug 7145458 4693341 * @summary Patch for CR6435319 caused regression to the above * Test Bug4693341 uses JDOM which takes a URL with relative file path * The java.net.URI lacks the ability to absolutize file path as * Xerces URI does - * @run main Bug4693341Test + * run main Bug4693341Test + * @run shell Bug4693341.sh * @author ###@###.### */ Run the testcase via shell script and get the necessary files in current working dir.
04-04-2012

EVALUATION JTREG @bug tag need to space separated, not with comma. Need a fix. Also run the testcase via shell scipt so that other resource files can be copied to working dir for execution.
04-04-2012