8196768: RootLoggerHandlers fails when source tree is read-only
Reviewed-by: dfuchs
--- a/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/BadRootLoggerHandlers.java Thu Feb 08 06:19:24 2018 -0800
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/BadRootLoggerHandlers.java Mon Feb 05 20:20:35 2018 -0800
@@ -132,6 +132,7 @@
}
Files.copy(initialProps, loggingProps, StandardCopyOption.REPLACE_EXISTING);
+ loggingProps.toFile().setWritable(true);
SystemErr err = new SystemErr(System.err);
System.setErr(new PrintStream(err));
--- a/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java Thu Feb 08 06:19:24 2018 -0800
+++ b/test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/RootLoggerHandlers.java Mon Feb 05 20:20:35 2018 -0800
@@ -63,6 +63,7 @@
Path loggingProps = USER_DIR.resolve(CONFIG_FILE);
System.setProperty("java.util.logging.config.file", loggingProps.toString());
Files.copy(initialProps, loggingProps, StandardCopyOption.REPLACE_EXISTING);
+ loggingProps.toFile().setWritable(true);
System.out.println("Root level is: " + Logger.getLogger("").getLevel());
if (Logger.getLogger("").getLevel() != Level.INFO) {
throw new RuntimeException("Expected root level INFO, got: "