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

java/nio/file/Files/CopyAndMove.java fails when using second test directory

XMLWordPrintable

    • b03
    • linux

        Sun Yaqi reported the issue:

        The test case (java/nio/file/Files/CopyAndMove.java) fail with java.nio.file.NoSuchFileException: ./name1692782213124882428/link when it is a different volume/file system.
        The createSymbolicLink(link, source) failed to create a symbolic link because a relative path was used.

        STDERR:
        dir1: /tmp/name7460415070033184926 (xfs)
        dir2: ./name3202546005695331436 (ext4)
        java.nio.file.NoSuchFileException: ./name3202546005695331436/link
            at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
            at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
            at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
            at java.base/sun.nio.fs.UnixFileSystem.copy(UnixFileSystem.java:1005)
            at java.base/sun.nio.fs.UnixFileSystemProvider.copy(UnixFileSystemProvider.java:300)
            at java.base/java.nio.file.Files.copy(Files.java:1303)
            at CopyAndMove.copyAndVerify(CopyAndMove.java:662)
            at CopyAndMove.testCopyFileToFile(CopyAndMove.java:914)
            at CopyAndMove.main(CopyAndMove.java:74)
            at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
            at java.base/java.lang.reflect.Method.invoke(Method.java:578)
            at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
            at java.base/java.lang.Thread.run(Thread.java:1583)

              syaqi Sun Yaqi
              lzhai Leslie Zhai
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: