8252773: [TESTBUG] serviceability/jvmti/GetObjectSizeOverflow fails due to OOM conditions

Reviewed-by: cjplummer, lmesnik
This commit is contained in:
Christoph Göttschkes 2020-09-08 22:59:41 +00:00 committed by Leonid Mesnik
parent e20004d7c1
commit 26c7218ab9
2 changed files with 1 additions and 6 deletions

View File

@ -34,6 +34,7 @@
* jdk.internal.jvmstat/sun.jvmstat.monitor
* @requires vm.bits == 64
* @requires vm.jvmti
* @requires os.maxMemory > 6G
* @build GetObjectSizeOverflowAgent
* @run driver ClassFileInstaller GetObjectSizeOverflowAgent
* @run main GetObjectSizeOverflow
@ -61,12 +62,6 @@ public class GetObjectSizeOverflow {
ProcessBuilder pt = ProcessTools.createTestJvm("-Xmx4000m", "-javaagent:agent.jar", "GetObjectSizeOverflowAgent");
OutputAnalyzer output = new OutputAnalyzer(pt.start());
if (output.getStdout().contains("Could not reserve enough space") || output.getStderr().contains("java.lang.OutOfMemoryError")) {
System.out.println("stdout: " + output.getStdout());
System.out.println("stderr: " + output.getStderr());
throw new SkippedException("Test could not reserve or allocate enough space");
}
output.stdoutShouldContain("GetObjectSizeOverflow passed");
}
}