mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-11 19:08:23 +00:00
8317316: G1: Make TestG1PercentageOptions use createTestJvm
Reviewed-by: mli, tschatzl
This commit is contained in:
parent
8f79d88960
commit
d8cd60588a
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,7 @@ package gc.arguments;
|
||||
/*
|
||||
* @test TestG1PercentageOptions
|
||||
* @bug 8068942
|
||||
* @requires vm.gc.G1
|
||||
* @requires vm.gc.G1 & vm.opt.G1ConfidencePercent == null
|
||||
* @summary Test argument processing of various percentage options
|
||||
* @library /test/lib
|
||||
* @library /
|
||||
@ -63,8 +63,7 @@ public class TestG1PercentageOptions {
|
||||
};
|
||||
|
||||
private static void check(String flag, boolean is_valid) throws Exception {
|
||||
ProcessBuilder pb = GCArguments.createJavaProcessBuilder(
|
||||
"-XX:+UseG1GC", flag, "-version");
|
||||
ProcessBuilder pb = GCArguments.createTestJvm("-XX:+UseG1GC", flag, "-version");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
if (is_valid) {
|
||||
output.shouldHaveExitValue(0);
|
||||
@ -73,8 +72,7 @@ public class TestG1PercentageOptions {
|
||||
}
|
||||
}
|
||||
|
||||
private static
|
||||
void check(String name, String value, boolean is_valid) throws Exception {
|
||||
private static void check(String name, String value, boolean is_valid) throws Exception {
|
||||
check("-XX:" + name + "=" + value, is_valid);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user