RFR: 8374364: TestCgroupMetrics.java fails when cpuset unmounted [v4]

SendaoYan syan at openjdk.org
Tue Jan 6 03:04:21 UTC 2026


On Tue, 6 Jan 2026 02:19:32 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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
>
> 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.

The `getCpuPeriod` call `getLongValue` to read property value from file /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service/cpu.cfs_period_us. The `getLongValue` will return CgroupSubsystem.LONG_RETVAL_UNLIMITED if it can not open the file. So I think it's better to skip this sub-test when there is no /sys/fs/cgroup/cpu,cpuacct/system.slice/sshd.service/cpu.cfs_period_us file.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28996#discussion_r2663425108


More information about the hotspot-runtime-dev mailing list