RFR: 7903519 : jtreg/jtharness is missing features for basic crash testing
Jiří Vaněk
jvanek at openjdk.org
Wed Dec 13 13:19:59 UTC 2023
On Wed, 13 Dec 2023 12:04:43 GMT, Vladimir Sitnikov <vsitnikov 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.
>
> src/com/sun/javatest/exec/ResultModifierInterface.java line 38:
>
>> 36: */
>> 37: public interface ResultModifierInterface {
>> 38: Status modifyStatus(Status originalStatus, TestDescription td);
>
> The interface name does not seem to be related with the method it has.
>
> a) If you want `ResultModifier` interface, then the method should probably be `void modify(TestResult result)` rather than passing "status and test description" separately
> b) An alternative option could be `TestResultTransfomer extends Function<TestResult, TestResult>`
IIRC, the `originalStatus` on input is necessary, because the original idea @andrlos had, that it was changing only failed tests.
Otherwise I agree with your comments. ty!
-------------
PR Review Comment: https://git.openjdk.org/jtharness/pull/57#discussion_r1425342378
More information about the jtharness-dev
mailing list