Skip to content

Commit 0bbfda5

Browse files
committed
8287011: Improve container information
Reviewed-by: lucy, mdoerr Backport-of: d51f4f471f3941294a987dcb68ee264fe27f018a
1 parent 406b72d commit 0bbfda5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/hotspot/jtreg/containers/docker/TestMisc.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,19 @@ private static void checkContainerInfo(OutputAnalyzer out) throws Exception {
123123
for (String s : expectedToContain) {
124124
out.shouldContain(s);
125125
}
126+
String str = out.getOutput();
127+
if (str.contains("cgroupv1")) {
128+
out.shouldContain("kernel_memory_usage_in_bytes");
129+
out.shouldContain("kernel_memory_max_usage_in_bytes");
130+
out.shouldContain("kernel_memory_limit_in_bytes");
131+
} else {
132+
if (str.contains("cgroupv2")) {
133+
out.shouldContain("memory_swap_current_in_bytes");
134+
out.shouldContain("memory_swap_max_limit_in_bytes");
135+
} else {
136+
throw new RuntimeException("Output has to contain information about cgroupv1 or cgroupv2");
137+
}
138+
}
126139
}
127140

128141
}

0 commit comments

Comments
 (0)