test/langtools/tools/javac/api/TestJavacTaskWithWarning.java fails if the src directory is read-only, as it writes a temporary src file in the src tree. Jtreg tests are given a scratch dir where they can create any files needed and that should be used instead.
Stacktrace:
TestJavacTaskWithWarning
----------System.err:(15/1036)----------
java.io.FileNotFoundException: /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+9-924/src.full/open/test/langtools/tools/javac/api/GeneratesWarning.java (Permission denied)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:255)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:210)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at TestJavacTaskWithWarning.warningTest(TestJavacTaskWithWarning.java:55)
at TestJavacTaskWithWarning.main(TestJavacTaskWithWarning.java:83)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1447)
Stacktrace:
TestJavacTaskWithWarning
----------System.err:(15/1036)----------
java.io.FileNotFoundException: /System/Volumes/Data/mesos/work_dir/jib-master/install/jdk-25+9-924/src.full/open/test/langtools/tools/javac/api/GeneratesWarning.java (Permission denied)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:255)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:210)
at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:171)
at TestJavacTaskWithWarning.warningTest(TestJavacTaskWithWarning.java:55)
at TestJavacTaskWithWarning.main(TestJavacTaskWithWarning.java:83)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:333)
at java.base/java.lang.Thread.run(Thread.java:1447)
- caused by
-
JDK-8348212 Need to add warn() step to JavacTaskImpl after JDK-8344148
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/f11a7377
-
Review(master) openjdk/jdk/23527