From a899004d4eb5e7700b36c0ef0414905eecc373c7 Mon Sep 17 00:00:00 2001 From: Igor Ignatyev Date: Tue, 5 May 2020 09:27:24 -0700 Subject: [PATCH] 8244384: @requires-related clean up in gc/metaspace/ tests Reviewed-by: kbarrett, stefank --- .../CompressedClassSpaceSizeInJmapHeap.java | 6 ------ .../TestCapacityUntilGCWrapAround.java | 20 +++++++++---------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java b/test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java index b9e808601d6..92c4bb93806 100644 --- a/test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java +++ b/test/hotspot/jtreg/gc/metaspace/CompressedClassSpaceSizeInJmapHeap.java @@ -36,7 +36,6 @@ package gc.metaspace; */ import jdk.test.lib.JDKToolLauncher; -import jdk.test.lib.Platform; import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.process.ProcessTools; import jdk.test.lib.SA.SATestUtils; @@ -50,11 +49,6 @@ public class CompressedClassSpaceSizeInJmapHeap { public static void main(String[] args) throws Exception { SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work. - if (!Platform.is64bit()) { - // Compressed Class Space is only available on 64-bit JVMs - return; - } - String pid = Long.toString(ProcessTools.getProcessId()); JDKToolLauncher jmap = JDKToolLauncher.create("jhsdb") diff --git a/test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java b/test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java index 6438503e62a..737b11c5d9d 100644 --- a/test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java +++ b/test/hotspot/jtreg/gc/metaspace/TestCapacityUntilGCWrapAround.java @@ -30,6 +30,7 @@ package gc.metaspace; * @library /test/lib * @modules java.base/jdk.internal.misc * java.management + * @requires vm.bits == 32 * @build sun.hotspot.WhiteBox * @run driver ClassFileInstaller sun.hotspot.WhiteBox * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI gc.metaspace.TestCapacityUntilGCWrapAround @@ -38,7 +39,6 @@ package gc.metaspace; import sun.hotspot.WhiteBox; import jdk.test.lib.Asserts; -import jdk.test.lib.Platform; public class TestCapacityUntilGCWrapAround { private static long MB = 1024 * 1024; @@ -46,17 +46,15 @@ public class TestCapacityUntilGCWrapAround { private static long MAX_UINT = 4 * GB - 1; // On 32-bit platforms public static void main(String[] args) { - if (Platform.is32bit()) { - WhiteBox wb = WhiteBox.getWhiteBox(); + WhiteBox wb = WhiteBox.getWhiteBox(); - long before = wb.metaspaceCapacityUntilGC(); - // Now force possible overflow of capacity_until_GC. - long after = wb.incMetaspaceCapacityUntilGC(MAX_UINT); + long before = wb.metaspaceCapacityUntilGC(); + // Now force possible overflow of capacity_until_GC. + long after = wb.incMetaspaceCapacityUntilGC(MAX_UINT); - Asserts.assertGTE(after, before, - "Increasing with MAX_UINT should not cause wrap around: " + after + " < " + before); - Asserts.assertLTE(after, MAX_UINT, - "Increasing with MAX_UINT should not cause value larger than MAX_UINT:" + after); - } + Asserts.assertGTE(after, before, + "Increasing with MAX_UINT should not cause wrap around: " + after + " < " + before); + Asserts.assertLTE(after, MAX_UINT, + "Increasing with MAX_UINT should not cause value larger than MAX_UINT:" + after); } }