[crac] RFR: 8362837: [CRaC] jdk/crac/MXBean.java can fail on macOS [v2]

Jan Kratochvil jkratochvil at openjdk.org
Sun Jul 20 19:46:00 UTC 2025


On Sun, 20 Jul 2025 16:15:52 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:

>> Jan Kratochvil has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update copyright year
>
> test/jdk/jdk/crac/MXBean.java line 79:
> 
>> 77:             long restoreTimePassed = System.currentTimeMillis() - restoreStart;
>> 78:             System.err.println("restoreTimePassed="+restoreTimePassed);
>> 79:             if (restoreTimePassed < 0 || TIME_TOLERANCE < restoreTimePassed) {
> 
> What is the purpose of this check? As I understand it, it checks that restore + restored code execution takes time close to zero which I don't think is a reasonable expectation (it passes because the tolerance is high).
> 
> Also the test is supposed to be about `CRaCMXBean` which is not involved here.

This check is implemented your words:

> For platforms that have engines with restore time passing (only Linux currently, I think pauseengine is enough here) — this will be almost the same test as it is now, but it will do an actual restore call and measure the restore start time from that call.

Regarding `CRaCMXBean` - I do not see any need for it to implement your words above. Although maybe I did not understand it as I do not see why/how to use `pauseengine` when you want `actual restore call`.

-------------

PR Review Comment: https://git.openjdk.org/crac/pull/246#discussion_r2217933689


More information about the crac-dev mailing list