RFR: 7903519 : jtreg/jtharness is missing features for basic crash testing [v8]
Vladimir Sitnikov
vsitnikov at openjdk.org
Thu Dec 21 07:49:02 UTC 2023
On Tue, 19 Dec 2023 21:24:13 GMT, andrlos <duke at openjdk.org> wrote:
>> this does not exactly add a crash testing option, however it allows users to define their own resultModifiers that they can force jtharness to use via advertising their resultModifier service in META-INF. I tested it with basic crashOnlyModificator and it works as intended - allows me to correctly skip and pass all the regular failures and only leaves me with crash tests as failures. Perfect for corner cases like JVM testing and such.
>> Also checked correct behavior in the logs, where the regular failure is still being reported and only the justification of the result modification is added at the bottom.
>
> andrlos has updated the pull request incrementally with one additional commit since the last revision:
>
> simple unit tests for generic Script behaviour with new StatusTransformer enhancement
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).
-------------
PR Review Comment: https://git.openjdk.org/jtharness/pull/57#discussion_r1433669160
More information about the jtharness-dev
mailing list