RFR: 7903519 : jtreg/jtharness is missing features for basic crash testing [v5]
Vladimir Sitnikov
vsitnikov at openjdk.org
Thu Dec 14 13:58:15 UTC 2023
On Thu, 14 Dec 2023 13:14:14 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 two additional commits since the last revision:
>
> - missing part of a comment
> - addressing more of PR remarks, mostly renaming and StatusTransformer is now initialized with Script instance initialization
src/com/sun/javatest/Script.java line 502:
> 500: Status newStatus = statusTransformer.transform(originalStatus, td);
> 501: newStatus = new Status(newStatus.getType(), newStatus.getReason() +
> 502: " - The status of this test result has been modified by external code.");
What do you think of mentioning the transformer name?
Suggestion:
" - The status of this test result has been modified by " + statusTransfomer.getClass().getName());
src/com/sun/javatest/Script.java line 521:
> 519: if (service != null) {
> 520: // Found more than one implementation, throw an exception
> 521: throw new IllegalStateException("Multiple implementations of the StatusTransformer found!");
An alternative option could be to transform the status in sequence. Then a transformer could ignore the status and let other transformers to decide.
-------------
PR Review Comment: https://git.openjdk.org/jtharness/pull/57#discussion_r1426706062
PR Review Comment: https://git.openjdk.org/jtharness/pull/57#discussion_r1426705128
More information about the jtharness-dev
mailing list