[crac] RFR: 8364538: [CRaC] Test CRaCIgnoreRestoreIfUnavailable [v2]
Radim Vansa
rvansa at openjdk.org
Mon Aug 4 15:21:23 UTC 2025
On Fri, 1 Aug 2025 18:50:03 GMT, Timofei Pushkin <tpushkin at openjdk.org> wrote:
>> Adds tests for `CRaCIgnoreRestoreIfUnavailable`.
>>
>> The case for incompatible CPU features is not tested, although I believe it should work. Such test would be more complex (to the best of my knowledge, emulation is needed to be able to reduce the set of available features between checkpoint and restore) so it deserves a separate task. It would be something like what `test/jdk/jdk/crac/CPUFeatures/CPUFeatures.sh` does (have never run it, not sure if it works).
>
> Timofei Pushkin has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix EngineFailureTest on linux-x86
test/jdk/jdk/crac/ignoreRestore/EngineFailureTest.java line 51:
> 49: // Create an empty image which will pass VM's own checks. It may contain
> 50: // CPU features, for example.
> 51: new CracBuilder().engine(CracEngine.SIMULATE)
OK, this creates the empty directory (or rather one with just features), but what's the point? Just making the 'restore' below fail at a different point of time? If there are two ways of failure, both should be tested.
test/jdk/jdk/crac/ignoreRestore/EngineFailureTest.java line 55:
> 53: .startCheckpoint().waitForSuccess();
> 54:
> 55: new CracBuilder()
The `crexec` option for `CRaCEngine` is weird; looks like a leftover from times when we had `CREngineLibrary` as well. Is it supposed to execute CRIU, or completely fail the restore, leading to 'unavailable'?
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/255#discussion_r2251814642
PR Review Comment: https://git.openjdk.org/crac/pull/255#discussion_r2251808490
More information about the crac-dev
mailing list