changeset 7641:715d00c95fb2

8010734: NPG: The test MemoryTest.java needs to be updated to support metaspace Reviewed-by: alanb
author ehelin
date Mon, 08 Jul 2013 11:30:44 +0200
parents 11c15607e43f
children 52454985425d 869bfa39d923
files test/ProblemList.txt test/java/lang/management/MemoryMXBean/MemoryTest.java
diffstat 2 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/test/ProblemList.txt	Fri Jul 05 18:22:58 2013 -0700
+++ b/test/ProblemList.txt	Mon Jul 08 11:30:44 2013 +0200
@@ -137,10 +137,6 @@
 # 8015780
 java/lang/reflect/Method/GenericStringTest.java			generic-all
 
-# 8019500
-java/lang/management/MemoryMXBean/MemoryTestAllGC.sh            generic-all
-java/lang/management/MemoryMXBean/MemoryTest.java               generic-all
-
 ############################################################################
 
 # jdk_management
--- a/test/java/lang/management/MemoryMXBean/MemoryTest.java	Fri Jul 05 18:22:58 2013 -0700
+++ b/test/java/lang/management/MemoryMXBean/MemoryTest.java	Mon Jul 08 11:30:44 2013 +0200
@@ -59,18 +59,21 @@
     // (or equivalent for other collectors)
     // Number of GC memory managers = 2
 
-    // Hotspot VM 1.8+ after perm gen removal is expected to have only
-    // one non-heap memory pool
-    private static int[] expectedMinNumPools = {3, 1};
-    private static int[] expectedMaxNumPools = {3, 1};
+    // Hotspot VM 1.8+ after perm gen removal is expected to have two or
+    // three non-heap memory pools:
+    // - Code cache
+    // - Metaspace
+    // - Compressed Class Space (if compressed class pointers are used)
+    private static int[] expectedMinNumPools = {3, 2};
+    private static int[] expectedMaxNumPools = {3, 3};
     private static int expectedNumGCMgrs = 2;
-    private static int expectedNumMgrs = expectedNumGCMgrs + 1;
+    private static int expectedNumMgrs = expectedNumGCMgrs + 2;
     private static String[] types = { "heap", "non-heap" };
 
     public static void main(String args[]) throws Exception {
         Integer value = new Integer(args[0]);
         expectedNumGCMgrs = value.intValue();
-        expectedNumMgrs = expectedNumGCMgrs + 1;
+        expectedNumMgrs = expectedNumGCMgrs + 2;
 
         checkMemoryPools();
         checkMemoryManagers();