On Mon, 29 Dec 2025 08:48:15 GMT, SendaoYan <[email protected]> wrote:
>> Hi all,
>>
>> Test jdk/internal/platform/cgroup/TestCgroupMetrics.java report fails when
>> the cpuset unmounted. The details shows in jbs issue. I think it's better to
>> check the 'cpu period' or 'cpuset' available or not before run the releated
>> tests.
>>
>> Change has been verified locally. Test-fix only, no risk.
>
> SendaoYan has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Update copyright year for
> test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java
A couple of comments but I'm not sure what the right approach is here. Seems
inconsistent to use SkippedException in one place, but not others.
test/lib/jdk/test/lib/containers/cgroup/MetricsTester.java line 87:
> 85: public static void main(String[] args) throws Exception {
> 86: Metrics m = Metrics.systemMetrics();
> 87: // If cgroups is not configured, report success
Suggestion:
// If cgroups is not configured, the test is skipped.
test/lib/jdk/test/lib/containers/cgroup/MetricsTesterCgroupV1.java line 373:
> 371: long oldVal = metrics.getCpuPeriod();
> 372: if (oldVal == CgroupSubsystem.LONG_RETVAL_UNLIMITED) {
> 373: System.out.println("Get cpu period fails, test skipped.");
Note sure this indicates a "fail" as such.
-------------
PR Review: https://git.openjdk.org/jdk/pull/28996#pullrequestreview-3629079111
PR Review Comment: https://git.openjdk.org/jdk/pull/28996#discussion_r2663353307
PR Review Comment: https://git.openjdk.org/jdk/pull/28996#discussion_r2663359000