RFR: 7903519 : jtreg/jtharness is missing features for basic crash testing [v8]
andrlos
duke at openjdk.org
Thu Dec 21 12:54:22 UTC 2023
On Thu, 21 Dec 2023 11:22:38 GMT, andrlos <duke at openjdk.org> wrote:
>> unit-tests/com/sun/javatest/ScriptTest.java line 76:
>>
>>> 74: }
>>> 75: }
>>> 76: return success && file.delete();
>>
>> I would suggest using JUnit's [TemporaryFolder](https://junit.org/junit4/javadoc/4.12/org/junit/rules/TemporaryFolder.html) or an alternative solution if it is already present in jtharness. Rolling "create and delete tempdir" has issues when it comes to different operating systems (e.g. Windows can't delete directory if there's open file), and it has security issues (e.g. someone might spy on the created files or something like that).
>
> @vlsi and what are your other thoughts about the test? is it enough? or should I go with the approach to make the loadTransformer method non static and protected so I can override it in the test or should I stick with this test and we can call it a day?
I added the TemporaryFolder part and got rid of the cleanup method
-------------
PR Review Comment: https://git.openjdk.org/jtharness/pull/57#discussion_r1434038555
More information about the jtharness-dev
mailing list