Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-2270

[classlib][unit] tests.api.java.io.FileTest@test_mkdir failes on win XP

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Classlib
    • None
    • win XP

    Description

      tests.api.java.io.FileTest@test_mkdir failes on win XP:

      mkdir 257 failed
      junit.framework.AssertionFailedError: mkdir 257 failed at tests.api.java.io.FileTest.test_mkdir(FileTest.java:1811) at java.lang.reflect.VMReflection.invokeMethod(Native Method)

      To get more information run stand alone test:

      import java.io.*;
      public class Test2 {
      public static void main(String[] args) throws IOException {
      // Test for method boolean java.io.File.mkdir()
      String base = System.getProperty("user.dir");
      int dirNumber = 1;
      boolean dirExists = true;
      File dir = new File(base, String.valueOf(dirNumber));
      while (dirExists) {
      if (dir.exists())

      { dirNumber++; dir = new File(base, String.valueOf(dirNumber)); }

      else

      { dirExists = false; }

      }
      if (!dir.mkdir() && dir.exists()) System.out.println("mkdir failed");
      else System.out.println("PASSED_1");

      dir.deleteOnExit();

      StringBuilder sb = new StringBuilder(dir + File.separator);
      while (dir.getCanonicalPath().length() < 256)

      { sb.append(0); dir = new File(sb.toString()); if (!dir.mkdir() && dir.exists()) System.out.println("mkdir " + dir.getCanonicalPath().length() + " failed"); else System.out.println("PASSED_2"); dir.deleteOnExit(); }

      }
      }

      $ /cygdrive/<path to jre>/win_ia32_msvc_debug/deploy/jre/bin/java Test2 -showversion
      PASSED_1
      PASSED_2
      ...........
      PASSED_2
      PASSED_2

      An unhandled error (4) has occurred.
      HyGeneric_Signal_Number=00000004
      ExceptionCode=c0000005
      ExceptionAddress=7C911E5A
      ContextFlags=0001003f
      Handler1=00401010
      Handler2=11105D80
      InaccessibleAddress=00000004
      EDI=00164B58
      ESI=001634B0
      EAX=001634B8
      EBX=00150000
      ECX=001634CC
      EDX=00000000
      EIP=7C911E5A
      ESP=0013F638
      EBP=0013F644
      Module=C:\WINDOWS\system32\ntdll.dll
      Module_base_address=7C900000
      Offset_in_DLL=00011e5a

      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.
      $

      The debug shows the problem is in nt_exception_filter.cpp

      While iterative run of luni module with -Dhy.test.forkmode=perTest tests.api.java.io.FileTest@test_mkdir fails 50 times out of 50.
      The stand alone code fails from time to time on win XP

      Attachments

        1. harmony-2270.diff
          0.7 kB
          Tony Wu
        2. harmony-2270-28Nov.diff
          2 kB
          Tony Wu
        3. harmony-2270-test.diff
          1 kB
          Tony Wu

        Issue Links

          Activity

            People

              paulex Paulex Yang
              tatyana.v.doubtsova@intel.com tatyana doubtsova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: