Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8206456: [TESTBUG] docker jtreg tests fail on systems without cpuset.…
…effective_cpus / cpuset.effective_mems

The changes to MetricsTester.java in the original commit were merged in "8223147: JFR Backport".

Reviewed-by: sgehwolf
Backport-of: 6fc4db4799599df66a2cf5207068336ce68136ff
  • Loading branch information
Jonathan Dowland committed Oct 21, 2022
1 parent 6093077 commit 1f8eafd
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions jdk/test/jdk/internal/platform/docker/MetricsCpuTester.java
Expand Up @@ -95,10 +95,13 @@ private static void testCpuSets(String cpuset) {
+ Arrays.toString(ipCpuSet) + ", got : " + Arrays.toString(cpuSets));
}

if (!Arrays.equals(ipCpuSet, effectiveCpus)) {
throw new RuntimeException("Effective Cpusets not equal, expected : "
+ Arrays.toString(ipCpuSet) + ", got : "
+ Arrays.toString(effectiveCpus));
// Check to see if this metric is supported on this platform
if (effectiveCpus.length != 0) {
if (!Arrays.equals(ipCpuSet, effectiveCpus)) {
throw new RuntimeException("Effective Cpusets not equal, expected : "
+ Arrays.toString(ipCpuSet) + ", got : "
+ Arrays.toString(effectiveCpus));
}
}
System.out.println("TEST PASSED!!!");
}
Expand Down Expand Up @@ -127,10 +130,13 @@ private static void testCpuSetMemNodes(String cpusetMems) {
+ Arrays.toString(cpuSets));
}

if (!Arrays.equals(ipCpuSet, effectiveMems)) {
throw new RuntimeException("Effective mem nodes not equal, expected : "
+ Arrays.toString(ipCpuSet) + ", got : "
+ Arrays.toString(effectiveMems));
// Check to see if this metric is supported on this platform
if (effectiveMems.length != 0) {
if (!Arrays.equals(ipCpuSet, effectiveMems)) {
throw new RuntimeException("Effective mem nodes not equal, expected : "
+ Arrays.toString(ipCpuSet) + ", got : "
+ Arrays.toString(effectiveMems));
}
}
System.out.println("TEST PASSED!!!");
}
Expand Down

1 comment on commit 1f8eafd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.