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

RegTest-test sun/nio/cs/LatinCharReplacementTWTest.java fails

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b46
    • CPU:
      x86
    • OS:
      linux_redhat_3.0, windows_2000, windows_xp
    • Verification:
      Verified

      Description

      Name: iaR10016 Date: 06/17/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b26, JDK1.4.2-b25, JDK1.4.2-b24, JDK1.5.0-b08
      Testbase : RegTest-test
      Platform[s] : Windows 2000, Windows XP, Windows 98, Suse Linux 8.1.
      switch/Mode : -client, -server
      Falling tests : sun/nio/cs/LatinCharReplacementTWTest.java

      RegTest-test sun/nio/cs/LatinCharReplacementTWTest.java test fails intermittantly on Windows 2000 Pro with JDK1.4.2, JDKJ1.5.0.

      I modified the test source to get additional information about the failure by the following way:

      --------- LatinCharReplacementTWTest.java ---------
      ...
      048> if (numChars != expected.length) {
                   // !!!!!!!!!
                   System.out.println("numChars=" + numChars + ", length=" + expected.length);
      049> throw new Exception("failure of test for bug " + bugID);
      050> }
      051>
      052> for (int i = 0 ; i < numChars; i++) {
      053> if (decoded[i] != expected[i])
                       // !!!!!!!!!
               System.out.println("i=" + i + ", decoded=" + decoded[i] + ", expected=" + expected[i]);
      054> throw new Exception("failure of test for bug " + bugID);
      055 }
      ...
      ---------------------------------------------------

      I got the following output of the modified testcase:

      ...
      H:\store\users\ira\bugs\4658679>java -showversion LatinCharReplacementTWTest
      java version "1.5.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b08)
      Java HotSpot(TM) Client VM (build 1.5.0-beta-b08, mixed mode)

      i=4, decoded=9, expected=?
      Exception in thread "main" java.lang.Exception: failure of test for bug 4658679 at
      LatinCharReplacementTWTest.main(LatinCharReplacementTWTest.java:56)

      H:\store\users\ira\bugs\4658679>
      ...

      The test stable fails with JDK1.4.1, JDK1.4.0 on all platforms with another output:
      ...
      bugs/4658679> /net/linux-15/export/home/java/jdk1.4.1/linux/bin/java -showversion LatinCharReplacementTWTest
      java version "1.4.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b21)
      Java HotSpot(TM) Client VM (build 1.4.1-b21, mixed mode)

      Exception in thread "main" java.io.UnsupportedEncodingException: x-EUC-TW
           at sun.io.Converters.getConverterClass(Converters.java:125)
           at sun.io.Converters.newConverter(Converters.java:156)
           at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:64)
           at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:221)
           at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:207)
           at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:74)
           at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
           at LatinCharReplacementTWTest.main(LatinCharReplacementTWTest.java:43)
      bugs/4658679>
      ...

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

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b24/regtest/win32/win2000_-server_smp_linux-2/workDir/test/sun/nio/cs/LatinCharReplacementTWTest.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change it's JDK and JCK variables):
      --- script start ---
      #!/bin/sh
      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir
      JT_HOME="h:/java/jct"
      JAVA_HOME="h:/java/jdk1.4.2/win32"
      TEST_BASE_PATH="h:/java/regtest/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"

      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,windir=$windir,PATH=${SHELL%/*},TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -DDISPLAY=:0 -DlocalHost="linux-2" -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/LatinCharReplacementTWTest.java"
      --- script end ---

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(13/769)----------
      java.lang.Exception: failure of test for bug 4658679
           at LatinCharReplacementTWTest.main(LatinCharReplacementTWTest.java:54)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:324)
           at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:82)
           at java.lang.Thread.run(Thread.java:534)

      JavaTest Message: Test threw exception: java.lang.Exception: failure of test for bug 4658679
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.Exception: failure of test for bug 4658679
      result: Failed. Execution failed: `main' threw exception: java.lang.Exception: failure of test for bug 4658679

      test result: Failed. Execution failed: `main' threw exception: java.lang.Exception: failure of test for bug 4658679

      Specific machine info:
      ======================
      Hostname: linux-2
      OS: Windows 2000 Pro

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

        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: