Skip to content
Permalink
Browse files

8252773: [TESTBUG] serviceability/jvmti/GetObjectSizeOverflow fails d…

…ue to OOM conditions

Reviewed-by: cjplummer, lmesnik
  • Loading branch information
mychris authored and lmesnik committed Sep 8, 2020
1 parent e20004d commit 26c7218ab9ce4e26a25f98ee6c72da48b83be471
@@ -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 static void main(String[] args) throws Exception {
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");
}
}

1 comment on commit 26c7218

@bridgekeeper

This comment has been minimized.

Copy link

@bridgekeeper bridgekeeper bot commented on 26c7218 Sep 8, 2020

Review

Issues

Please sign in to comment.
You can’t perform that action at this time.