[XXS] RFR tier1 testbug JDK-8211180: SourceLauncherTest.java fails in JDK12 CI on Win*
joe darcy
joe.darcy at oracle.com
Wed Sep 26 21:48:54 UTC 2018
+1
-Joe
On 9/26/2018 2:18 PM, Jonathan Gibbons wrote:
> Please review a small urgent fix for a tier1 testbug issue.
>
> It is a perennial problem, comparing golden text on Windows. This
> time, with that in mind, I was too clever by half, and proactively
> converted platform newlines in the generated output to \n, not
> realizing that the method being used for the comparison was doing the
> opposite, and converting \n in the golden string to platform newlines!
>
> The fix is just to avoid converting newlines to \n.
>
> $ hg diff
> diff -r 76a3e8be46e6
> test/langtools/tools/javac/launcher/SourceLauncherTest.java
> --- a/test/langtools/tools/javac/launcher/SourceLauncherTest.java Wed
> Sep 26 12:47:38 2018 -0700
> +++ b/test/langtools/tools/javac/launcher/SourceLauncherTest.java Wed
> Sep 26 14:16:45 2018 -0700
> @@ -244,7 +244,7 @@
> .className(sourceFile.toString())
> .run(Task.Expect.SUCCESS)
> .getOutput(Task.OutputKind.STDOUT);
> - checkEqual("stdout", log.trim().replace(tb.lineSeparator, "\n"),
> + checkEqual("stdout", log.trim(),
> "user.dir=" + System.getProperty("user.dir") + "\n" +
> "exception: java.security.AccessControlException: " +
> "access denied (\"java.util.PropertyPermission\"
> \"user.dir\" \"write\")");
>
>
>
> JBS: https://bugs.openjdk.java.net/browse/JDK-8211180
> Webrev: http://cr.openjdk.java.net/~jjg/8211180/webrev.00/
>
> -- Jon
More information about the compiler-dev
mailing list