8247741: Test test/hotspot/jtreg/runtime/7162488/TestUnrecognizedVmOption.java fails when -XX:+IgnoreUnrecognizedVMOptions is set
Use createJavaProcessBuilder() to prevent JTreg flags from being passed to the new process created by the test Reviewed-by: lfoltan, dholmes
This commit is contained in:
parent
13b7c2e131
commit
eb78035d05
@ -35,8 +35,8 @@ public class TestUnrecognizedVmOption {
|
||||
static final String OPTION="this_is_not_an_option";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
ProcessBuilder pb =
|
||||
ProcessTools.createTestJvm("-showversion", "-XX:" + OPTION);
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-showversion", "-XX:" + OPTION);
|
||||
new OutputAnalyzer(pb.start())
|
||||
.shouldNotHaveExitValue(0)
|
||||
.shouldContain("Unrecognized VM option")
|
||||
|
Loading…
x
Reference in New Issue
Block a user