8069343: Improve gc/g1/TestHumongousCodeCacheRoots.java to use jtreg @requires
Summary: Remove client test entirely and clean up test
Reviewed-by: tschatzl, iignatyev
--- 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);
}
}