13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25
26 /*
27 * @test
28 * @bug 8220786
29 * @summary Test ErrorFileToStderr and ErrorFileToStdout
30 * @library /test/lib
31 * @modules java.base/jdk.internal.misc
32 * @requires (vm.debug == true)
33 */
34
35 import jdk.test.lib.process.OutputAnalyzer;
36 import jdk.test.lib.process.ProcessTools;
37
38 import java.io.BufferedReader;
39 import java.io.File;
40 import java.io.FileInputStream;
41 import java.io.InputStreamReader;
42 import java.util.Map;
43 import java.util.regex.Pattern;
44
45 public class ErrorFileRedirectTest {
46
47 public static void do_test(boolean redirectStdout, boolean redirectStderr) throws Exception {
48
49 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
50 "-Xmx64M",
51 "-XX:-CreateCoredumpOnCrash",
52 "-XX:ErrorHandlerTest=14",
|
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24
25
26 /*
27 * @test
28 * @bug 8220786
29 * @summary Test ErrorFileToStderr and ErrorFileToStdout
30 * @library /test/lib
31 * @modules java.base/jdk.internal.misc
32 * @requires (vm.debug == true)
33 * @run driver ErrorFileRedirectTest
34 */
35
36 import jdk.test.lib.process.OutputAnalyzer;
37 import jdk.test.lib.process.ProcessTools;
38
39 import java.io.BufferedReader;
40 import java.io.File;
41 import java.io.FileInputStream;
42 import java.io.InputStreamReader;
43 import java.util.Map;
44 import java.util.regex.Pattern;
45
46 public class ErrorFileRedirectTest {
47
48 public static void do_test(boolean redirectStdout, boolean redirectStderr) throws Exception {
49
50 ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
51 "-Xmx64M",
52 "-XX:-CreateCoredumpOnCrash",
53 "-XX:ErrorHandlerTest=14",
|