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

TEST_BUG: RegTest-cte CTE_REGTEST/Generic/4778561/Test4778561.java fails

XMLWordPrintable

    • rc
    • x86
    • windows_98, windows_2000
    • Verified



      Name: iaR10016 Date: 03/04/2003


      Filed By : J2SE-SQA [###@###.###
      JDK : JDK1.4.2-b17
      Testbase : RegTest-cte
      Platform[s] : Windows 98
      switch/Mode : -client
      Falling test[s]: CTE_REGTEST/Generic/4778561/Test4778561.java

      RegTest-cte CTE_REGTEST/Generic/4778561/Test4778561.java test fails with JDK1.4.2-b17 on
      Windows 98. I am not able to reproduce the failure on Windows XP, Windows 2000,
      Windows NT systems.

      Here is the code fragment from the test source:

      --------- General.java ----------
      ...
      212> cpath = f.getCanonicalPath();
      ...
      224> if (cpath.equals(ans)) {
      225> System.err.println(ans + " <== " + path);
      226> } else {
      227> System.err.println(ans + " <-- " + path + " ==> " + cpath + " MISMATCH");
      228> if (!debug) {
      229> throw new RuntimeException("Mismatch: " + path + " ==> " + cpath +
      230> ", should be " + ans);
      231> }
      232> }
      ...
      ---------------------------------

      The test compares two paths and passes if they are equals.

      Problem is that cpath is a cannonical path name of the tested file path (see line 212)
      whereas ans is a result of FILE.getPath() function. But under Windows 98 path and canonical
      path of the same file can be different. The test fails due to this reason. The test passes
      if I change General.java by the following way:

      --------- General.java ----------
      ...
      224> if (cpath.equals( (new File(ans)).getCanonicalPath() )) {
      ...
      ---------------------------------

      Test source location:
      =====================
      /net/jdk/export/jpse04/Regression/1.4.2/test/CTE_REGTEST/Generic/4778561/Test4778561.java

      jtr file location:
      ==================
      /net/jtgb4u4c.sfbay/export/sail15/results/mantis/b17/regtest/win32/win98_-client_linux-17/workDir/cte/CTE_REGTEST/Generic/4778561/Test4778561.jtr

      How to reproduce:
      =================
      Run the following script (you may need to change its variables)

      --- script start ---
      #!/bin/sh

      JT_HOME="h:/java/jct"
      TESTJAVA="h:/java/jdk1.4.2/win32"
      TEST_BASE_PATH="h:/java/regtest/cte"
      RESULT_DIR=`pwd`
      WORK_DIR=$RESULT_DIR/workDir/test
      REPORT_DIR=$RESULT_DIR/reportDir

      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

      cd $WORK_DIR/scratch

      $TESTJAVA/bin/java -DenvVars=TESTJAVAHOME=$TESTJAVA,windir=$windir,TZ=,LC_ALL=en_US,LC_CTYPE=en_US,LANG=en_US,LPDEST= -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/CTE_REGTEST/Generic/4778561/Test4778561.java"
      --- script end ---

      Test output (jtr part):
      =======================
      ----------System.out:(0/0)----------
      ----------System.err:(0/0)----------
      result: Passed. Compilation successful

      #section:build
      ----------messages:(3/99)----------
      command: build Test4778561
      reason: Named class compiled on demand
      elapsed time (seconds): 0.05
      result: Passed. No need to compile: Test4778561.java

      #section:main
      ----------messages:(3/123)----------
      command: main Test4778561
      reason: User specified action: run main/timeout=600 Test4778561
      elapsed time (seconds): 0.55
      ----------System.out:(0/0)----------
      ----------System.err:(17/2014)*----------
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workdir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified <-- XyZzY0123\FOO_bar_BAZ\GLORPified ==>
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workDir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified MISMATCH
      java.lang.RuntimeException: Mismatch: XyZzY0123\FOO_bar_BAZ\GLORPified ==> H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workDir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified, should be
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workdir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified
              at General.check(General.java:229)
              at Test4778561.checkCaseLookup(Test4778561.java:57)
              at Test4778561.checkRelativePaths(Test4778561.java:80)
              at Test4778561.main(Test4778561.java:148)
              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.RuntimeException: Mismatch: XyZzY0123\FOO_bar_BAZ\GLORPified ==>
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workDir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified, should be
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workdir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified
      JavaTest Message: shutting down test


      STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Mismatch: XyZzY0123\\FOO_bar_BAZ\\GLORPified ==>
      H:\\results_full\\mantis\\b17\\regtest\\win32\\win98_linux-17\\workDir\\cte\\scratch\\XyZzY0123\\FOO_bar_BAZ\\GLORPified, should be
      H:\\results_full\\mantis\\b17\\regtest\\win32\\win98_linux-17\\workdir\\cte\\scratch\\XyZzY0123\\FOO_bar_BAZ\\GLORPified

      result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Mismatch: XyZzY0123\FOO_bar_BAZ\GLORPified ==>
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workDir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified, should be
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workdir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified

      test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Mismatch: XyZzY0123\FOO_bar_BAZ\GLORPified ==>
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workDir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified, should be
      H:\results_full\mantis\b17\regtest\win32\win98_linux-17\workdir\cte\scratch\XyZzY0123\FOO_bar_BAZ\GLORPified

      Specific machine info:
      ======================
      Hostname: linux-17
      OS: Windows 98

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

            asaha Abhijit Saha
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: