Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4805326

TEST_BUG RegTest-test sun/nio/cs/EUCTWBufferBoundaryDecodeTest.java fails

    Details

    • Subcomponent:
    • Resolved In Build:
      b16
    • CPU:
      generic, x86, sparc
    • OS:
      generic, linux, solaris_8, windows_2000
    • Verification:
      Verified

      Backports

        Description

        Name: iaR10016 Date: 01/19/2003


        Filed By : J2SE-SQA [###@###.###
        JDK : JDK1.4.2-b12, JDK1.4.1, JDK1.4.0
        Testbase : RegTest-test
        Platform[s] : all
        Falling test: sun/nio/cs/EUCTWBufferBoundaryDecodeTest.java

        Regtest-test test sun/nio/cs/EUCTWBufferBoundaryDecodeTest.java fails with error when
        running with harness. The test passes if it is executed manually.

        The problem is that class EUCTWBufferBoundaryDecodeTest is not declared as "public",
        so harness can not get access to it.

        Here is a code fragment of EUCTWBufferBoundaryDecodeTest.java:

        --------- EUCTWBufferBoundaryDecodeTest.java ---------
        ...
        015> class EUCTWBufferBoundaryDecodeTest {
        016> public static void main(String[] argv) throws Exception {
        ...
        ------------------------------------------------------

        If I change line 15 to "public class EUCTWBufferBoundaryDecodeTest {"
        the test works fine.

        Test source location:
        =====================
        /java/re/jdk/1.4.2/promoted/latest/ws/j2se/test/sun/nio/cs/EUCTWBufferBoundaryDecodeTest.java

        jtr file location:
        ==================
        /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b12/regtest/win32/winXP_linux-16/workDir/test/sun/nio/cs/EUCTWBufferBoundaryDecodeTest.jtr

        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/linux-15/export/home/java/jct"
        JAVA_HOME="/net/linux-15/export/home/java/jdk1.4.2/linux"
        TEST_BASE_PATH="/net/linux-15/export/home/java/regtest/test"
        export CLASSPATH="$JT_HOME/classes:$JT_HOME/lib/javatest.jar:$JT_HOME/lib/jtreg.jar"

        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 -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/sun/nio/cs/EUCTWBufferBoundaryDecodeTest.java"
        --- script end ---

        Test output (jtr part):
        =======================
        ----------System.err:(10/742)----------
        java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class EUCTWBufferBoundaryDecodeTest with modifiers "public static"
                at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
                at java.lang.reflect.Method.invoke(Method.java:317)
                at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
                at java.lang.Thread.run(Thread.java:536)

        JavaTest Message: Verify that the class defining the test is
        JavaTest Message: declared public (test invoked via reflection)

        STATUS:Error.java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class EUCTWBufferBoundaryDecodeTest with modifiers "public static"
        result: Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class EUCTWBufferBoundaryDecodeTest with modifiers "public static"

        test result: Error. java.lang.IllegalAccessException: Class com.sun.javatest.regtest.MainWrapper$MainThread can not access a member of class EUCTWBufferBoundaryDecodeTest with modifiers "public
        static"

        ======================================================================

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ilittlesunw Ian Little (Inactive)
                  Reporter:
                  irasunw Ira Ira (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: