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

tools/jar/ChangeDir.java fails if /tmp/a exists

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 8
    • 7u40, 8
    • tools
    • jar
    • b110

    Description


      I see this test fail periodically in my local environment, it's a shared system and it turns out the reason is that someone else has created /tmp/a which the test also attempts to create. It would great if the test could be changed to not use a fixed file name. Attached is a sample failure when this happens (sudo rm -rf /tmp/a fixes the issue until someone else creates it again).


      java.lang.Exception: Stack trace
      at java.lang.Thread.dumpStack(Thread.java:1308)
      at ChangeDir.fail(ChangeDir.java:118)
      at ChangeDir.check(ChangeDir.java:121)
      at ChangeDir.doTest(ChangeDir.java:73)
      at ChangeDir.realMain(ChangeDir.java:51)
      at ChangeDir.main(ChangeDir.java:126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:728)
      at java.lang.Thread.run(Thread.java:724)
      java.io.IOException: No such file or directory
      at java.io.UnixFileSystem.createFileExclusively(Native Method)
      at java.io.File.createNewFile(File.java:1012)
      at ChangeDir.doTest(ChangeDir.java:77)
      at ChangeDir.realMain(ChangeDir.java:51)
      at ChangeDir.main(ChangeDir.java:126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:728)
      at java.lang.Thread.run(Thread.java:724)
      java.lang.AssertionError: Some tests failed
      at ChangeDir.main(ChangeDir.java:128)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:491)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:728)
      at java.lang.Thread.run(Thread.java:724)

      JavaTest Message: Test threw exception: java.lang.AssertionError
      JavaTest Message: shutting down test

      Attachments

        Activity

          People

            sherman Xueming Shen
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: