mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 10:23:28 +00:00
8314840: 3 gc/epsilon tests ignore external vm options
Reviewed-by: tschatzl
This commit is contained in:
parent
63e0fc4331
commit
799ac5288e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2017, 2025, Red Hat, Inc. 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
|
||||
@ -37,13 +37,13 @@ import jdk.test.lib.process.ProcessTools;
|
||||
public class TestDieDefault {
|
||||
|
||||
public static void passWith(String... args) throws Exception {
|
||||
OutputAnalyzer out = ProcessTools.executeLimitedTestJava(args);
|
||||
OutputAnalyzer out = ProcessTools.executeTestJava(args);
|
||||
out.shouldNotContain("OutOfMemoryError");
|
||||
out.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
public static void failWith(String... args) throws Exception {
|
||||
OutputAnalyzer out = ProcessTools.executeLimitedTestJava(args);
|
||||
OutputAnalyzer out = ProcessTools.executeTestJava(args);
|
||||
out.shouldContain("OutOfMemoryError");
|
||||
if (out.getExitValue() == 0) {
|
||||
throw new IllegalStateException("Should have failed with non-zero exit code");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2017, 2025, Red Hat, Inc. 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
|
||||
@ -38,13 +38,13 @@ import jdk.test.lib.process.ProcessTools;
|
||||
public class TestDieWithHeapDump {
|
||||
|
||||
public static void passWith(String... args) throws Exception {
|
||||
OutputAnalyzer out = ProcessTools.executeLimitedTestJava(args);
|
||||
OutputAnalyzer out = ProcessTools.executeTestJava(args);
|
||||
out.shouldNotContain("OutOfMemoryError");
|
||||
out.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
public static void failWith(String... args) throws Exception {
|
||||
ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(args);
|
||||
ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(args);
|
||||
Process p = pb.start();
|
||||
OutputAnalyzer out = new OutputAnalyzer(p);
|
||||
out.shouldContain("OutOfMemoryError");
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
|
||||
* Copyright (c) 2017, 2025, Red Hat, Inc. 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
|
||||
@ -39,14 +39,14 @@ public class TestDieWithOnError {
|
||||
static String ON_ERR_MSG = "Epsilon error handler message";
|
||||
|
||||
public static void passWith(String... args) throws Exception {
|
||||
OutputAnalyzer out = ProcessTools.executeLimitedTestJava(args);
|
||||
OutputAnalyzer out = ProcessTools.executeTestJava(args);
|
||||
out.shouldNotContain("OutOfMemoryError");
|
||||
out.stdoutShouldNotMatch("^" + ON_ERR_MSG);
|
||||
out.shouldHaveExitValue(0);
|
||||
}
|
||||
|
||||
public static void failWith(String... args) throws Exception {
|
||||
OutputAnalyzer out = ProcessTools.executeLimitedTestJava(args);
|
||||
OutputAnalyzer out = ProcessTools.executeTestJava(args);
|
||||
out.shouldContain("OutOfMemoryError");
|
||||
if (out.getExitValue() == 0) {
|
||||
throw new IllegalStateException("Should have failed with non-zero exit code");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user