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

RootLoggerHandlers fails when source tree is read-only

XMLWordPrintable

      RootLoggerHandlers falls into the classic trap of copying a file out of the source tree and then not ensuring it's writable, causing a test failure.

      $ cd test/jdk/java/util/logging/LogManager/Configuration
      $ chmod -w logging.properties
      $ jtreg RootLoggerHandlers.java
      ...
      java.nio.file.AccessDeniedException: /usr/local/google/home/martinrb/ws/up/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/JTwork/scratch/logging.properties
      at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
      at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
      at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:215)
      at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
      at java.base/java.nio.file.Files.newOutputStream(Files.java:218)
      at java.base/java.nio.file.Files.write(Files.java:3404)
      at java.base/java.nio.file.Files.write(Files.java:3455)
      at RootLoggerHandlers.main(RootLoggerHandlers.java:94)

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: