RFR: 8265225: jdk/jfr/tool/TestConfigure.java fails to cleanup the output files after the testing
Erik Gahlin
egahlin at openjdk.java.net
Wed Apr 14 17:12:44 UTC 2021
On Wed, 14 Apr 2021 15:43:46 GMT, Jie Fu <jiefu at openjdk.org> wrote:
> Hi all,
>
> jdk/jfr/tool/TestConfigure.java fails to remove the following output files after testing.
>
> I found this bug by runing jdk/jfr/tool/TestConfigure.java and then executing `git status` in the source repo.
>
> test/jdk/jdk/jfr/tool/1618403178745test-selection.jfc
> test/jdk/jdk/jfr/tool/1618403180406test-text.jfc
> test/jdk/jdk/jfr/tool/1618403181283test-flag.jfc
> test/jdk/jdk/jfr/tool/1618403182099test-condition-1.jfc
> test/jdk/jdk/jfr/tool/1618403182885test-condition-2.jfc
> test/jdk/jdk/jfr/tool/1618403183598test-and-true.jfc
> test/jdk/jdk/jfr/tool/1618403184320test-and-false.jfc
> test/jdk/jdk/jfr/tool/1618403185068test-or-true.jfc
> test/jdk/jdk/jfr/tool/1618403185738test-or-false.jfc
> test/jdk/jdk/jfr/tool/1618403186440new.jfc
> test/jdk/jdk/jfr/tool/1618403187198missed.jfc
> test/jdk/jdk/jfr/tool/1618403187911fresh.jfc
> test/jdk/jdk/jfr/tool/1618403188568new.jfc
> test/jdk/jdk/jfr/tool/1618403189200test-superfluous.jfc
> test/jdk/jdk/jfr/tool/1618403190777test-modify-succeed.jfc
> test/jdk/jdk/jfr/tool/1618403191304test-adding-succeed-1.jfc
> test/jdk/jdk/jfr/tool/1618403191787test-adding-succeed-2.jfc
> test/jdk/jdk/jfr/tool/1618403192284combined.jfc
> test/jdk/jdk/jfr/tool/1618403192834quoted-timespan.jfc
> test/jdk/jdk/jfr/tool/1618403193319compact-timespan.jfc
> test/jdk/jdk/jfr/tool/1618403193816threshold-period-timespan.jfc
> test/jdk/jdk/jfr/tool/1618403194331verbose-1.jfc
> test/jdk/jdk/jfr/tool/1618403194791verbose-2.jfc
>
>
> It would be better to fix it.
>
> Thanks.
> Best regards,
> Jie
I think problem is here:
private static String newOutputFile(String filename) {
return Path.of(**DIR**, System.currentTimeMillis() + filename).toAbsolutePath().toString();
}
The test src directory should not be used, but instead ".", like in other JFR tests.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3493
More information about the hotspot-jfr-dev
mailing list