changeset 51974:1c8cdf3d4c9e

8069343: Improve gc/g1/TestHumongousCodeCacheRoots.java to use jtreg @requires Summary: Remove client test entirely and clean up test Reviewed-by: tschatzl, iignatyev
author jcbeyler
date Wed, 01 Aug 2018 09:23:24 -0700
parents 3bd8d0a0e28c
children ac4f5ef0edd9
files test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java
diffstat 1 files changed, 4 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java	Tue Jul 31 10:20:10 2018 -0700
+++ b/test/hotspot/jtreg/gc/g1/TestHumongousCodeCacheRoots.java	Wed Aug 01 09:23:24 2018 -0700
@@ -119,26 +119,10 @@
 
     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(finalargs.toArray(new String[0]));
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    try {
-        output.shouldHaveExitValue(0);
-    } catch (RuntimeException e) {
-        // It's ok if there is no client vm in the jdk.
-        if (output.firstMatch("Unrecognized option: -client") == null) {
-            throw e;
-        }
-    }
-
+    output.shouldHaveExitValue(0);
     return output;
   }
 
-  public static void runTest(String compiler, String[] other) throws Exception {
-    ArrayList<String> joined = new ArrayList<String>();
-    joined.add(compiler);
-    joined.addAll(Arrays.asList(other));
-    runWhiteBoxTest(joined.toArray(new String[0]), TestHumongousCodeCacheRootsHelper.class.getName(),
-      new String[] {}, false);
-  }
-
   public static void main(String[] args) throws Exception {
     final String[] baseArguments = new String[] {
       "-XX:+UseG1GC", "-XX:G1HeapRegionSize=1M", "-Xmx100M", // make sure we get a humongous region
@@ -146,8 +130,9 @@
       "-XX:InitiatingHeapOccupancyPercent=1", // strong code root marking
       "-XX:+G1VerifyHeapRegionCodeRoots", "-XX:+VerifyAfterGC", // make sure that verification is run
     };
-    runTest("-client", baseArguments);
-    runTest("-server", baseArguments);
+
+    runWhiteBoxTest(baseArguments, TestHumongousCodeCacheRootsHelper.class.getName(),
+      new String[] {}, false);
   }
 }