Skip to content
Snippets Groups Projects
Commit 1f0ec1d3 authored by Andrew Lu's avatar Andrew Lu
Browse files

8317316: G1: Make TestG1PercentageOptions use createTestJvm

Backport-of: d8cd60588aef6abcbfedbe3262d9a094c9bbcb8c
parent 00b764c9
Branches
Tags
No related merge requests found
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,7 +26,7 @@ package gc.arguments; ...@@ -26,7 +26,7 @@ package gc.arguments;
/* /*
* @test TestG1PercentageOptions * @test TestG1PercentageOptions
* @bug 8068942 * @bug 8068942
* @requires vm.gc.G1 * @requires vm.gc.G1 & vm.opt.G1ConfidencePercent == null
* @summary Test argument processing of various percentage options * @summary Test argument processing of various percentage options
* @library /test/lib * @library /test/lib
* @library / * @library /
...@@ -63,8 +63,7 @@ public class TestG1PercentageOptions { ...@@ -63,8 +63,7 @@ public class TestG1PercentageOptions {
}; };
private static void check(String flag, boolean is_valid) throws Exception { private static void check(String flag, boolean is_valid) throws Exception {
ProcessBuilder pb = GCArguments.createJavaProcessBuilder( ProcessBuilder pb = GCArguments.createTestJvm("-XX:+UseG1GC", flag, "-version");
"-XX:+UseG1GC", flag, "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start()); OutputAnalyzer output = new OutputAnalyzer(pb.start());
if (is_valid) { if (is_valid) {
output.shouldHaveExitValue(0); output.shouldHaveExitValue(0);
...@@ -73,8 +72,7 @@ public class TestG1PercentageOptions { ...@@ -73,8 +72,7 @@ public class TestG1PercentageOptions {
} }
} }
private static private static void check(String name, String value, boolean is_valid) throws Exception {
void check(String name, String value, boolean is_valid) throws Exception {
check("-XX:" + name + "=" + value, is_valid); check("-XX:" + name + "=" + value, is_valid);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment