RFR: 7903526: jtreg should handle all exceptions [v2]
Jaikiran Pai
jpai at openjdk.org
Wed Nov 1 00:26:29 UTC 2023
On Tue, 31 Oct 2023 20:15:19 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
>> src/share/classes/com/sun/javatest/regtest/agent/MainWrapper.java line 84:
>>
>>> 82: globalUncaughtThrowable = e;
>>> 83: }
>>> 84: AStatus.failed(MAIN_THREW_EXCEPT + e).exit();
>>
>> I think we shouldn't be failing and exiting here because the uncaught exception might have been thrown when the test is still in progress. Just keeping track of the uncaught exception(s) I think should be enough, so that that state can then be used after the test completes, to decide whether to fail the test. This is then similar to what we do in the case where no test thread factory is set.
>
> I copied the handler from MainThreadGroup::uncaughtException. I want to keep them consistent. (Eventually, we are going to get rid of MainGroup.) Probably, it is needed to file a bug not to fail in the MainThreadGroup::uncaughtException and check exceptions after the test passes.
Hello Leonid,
> I copied the handler from MainThreadGroup::uncaughtException. I want to keep them consistent.
I hadn't noticed MainThreadGroup does it this way. Having it consistent then sounds good to me.
-------------
PR Review Comment: https://git.openjdk.org/jtreg/pull/172#discussion_r1378277837
More information about the jtreg-dev
mailing list