From 26c7218ab9ce4e26a25f98ee6c72da48b83be471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20G=C3=B6ttschkes?= Date: Tue, 8 Sep 2020 22:59:41 +0000 Subject: [PATCH] 8252773: [TESTBUG] serviceability/jvmti/GetObjectSizeOverflow fails due to OOM conditions Reviewed-by: cjplummer, lmesnik --- .../serviceability/jvmti/GetObjectSizeOverflow.java | 7 +------ .../serviceability/jvmti/GetObjectSizeOverflowAgent.java | 0 2 files changed, 1 insertion(+), 6 deletions(-) rename test/hotspot/jtreg/{ => resourcehogs}/serviceability/jvmti/GetObjectSizeOverflow.java (87%) rename test/hotspot/jtreg/{ => resourcehogs}/serviceability/jvmti/GetObjectSizeOverflowAgent.java (100%) diff --git a/test/hotspot/jtreg/serviceability/jvmti/GetObjectSizeOverflow.java b/test/hotspot/jtreg/resourcehogs/serviceability/jvmti/GetObjectSizeOverflow.java similarity index 87% rename from test/hotspot/jtreg/serviceability/jvmti/GetObjectSizeOverflow.java rename to test/hotspot/jtreg/resourcehogs/serviceability/jvmti/GetObjectSizeOverflow.java index 34dbd9cc86a..4676c609b0d 100644 --- a/test/hotspot/jtreg/serviceability/jvmti/GetObjectSizeOverflow.java +++ b/test/hotspot/jtreg/resourcehogs/serviceability/jvmti/GetObjectSizeOverflow.java @@ -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"); } } diff --git a/test/hotspot/jtreg/serviceability/jvmti/GetObjectSizeOverflowAgent.java b/test/hotspot/jtreg/resourcehogs/serviceability/jvmti/GetObjectSizeOverflowAgent.java similarity index 100% rename from test/hotspot/jtreg/serviceability/jvmti/GetObjectSizeOverflowAgent.java rename to test/hotspot/jtreg/resourcehogs/serviceability/jvmti/GetObjectSizeOverflowAgent.java