8331708: jdk/internal/jline/RedirectedStdOut.java times-out on macosx-aarch64
Reviewed-by: asotona
This commit is contained in:
parent
4bbd972cbb
commit
15862a2f11
@ -29,9 +29,11 @@
|
|||||||
* @modules jdk.internal.le
|
* @modules jdk.internal.le
|
||||||
* @library /test/lib
|
* @library /test/lib
|
||||||
* @run main RedirectedStdOut runRedirectAllTest
|
* @run main RedirectedStdOut runRedirectAllTest
|
||||||
* @run main/othervm RedirectedStdOut runRedirectOutOnly
|
* @run main/othervm --enable-native-access=ALL-UNNAMED RedirectedStdOut runRedirectOutOnly
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.io.ByteArrayOutputStream;
|
||||||
|
import java.io.PrintStream;
|
||||||
import java.lang.foreign.Arena;
|
import java.lang.foreign.Arena;
|
||||||
import java.lang.foreign.FunctionDescriptor;
|
import java.lang.foreign.FunctionDescriptor;
|
||||||
import java.lang.foreign.Linker;
|
import java.lang.foreign.Linker;
|
||||||
@ -58,7 +60,6 @@ public class RedirectedStdOut {
|
|||||||
//verify the case where neither stdin/out/err is attached to a terminal,
|
//verify the case where neither stdin/out/err is attached to a terminal,
|
||||||
//this test is weaker, but more reliable:
|
//this test is weaker, but more reliable:
|
||||||
void runRedirectAllTest() throws Exception {
|
void runRedirectAllTest() throws Exception {
|
||||||
if (true) return ;
|
|
||||||
ProcessBuilder builder =
|
ProcessBuilder builder =
|
||||||
ProcessTools.createTestJavaProcessBuilder(ConsoleTest.class.getName());
|
ProcessTools.createTestJavaProcessBuilder(ConsoleTest.class.getName());
|
||||||
OutputAnalyzer output = ProcessTools.executeProcess(builder);
|
OutputAnalyzer output = ProcessTools.executeProcess(builder);
|
||||||
@ -147,6 +148,10 @@ public class RedirectedStdOut {
|
|||||||
loginttyDescriptor);
|
loginttyDescriptor);
|
||||||
logintty.invoke(child.get(ValueLayout.JAVA_INT, 0));
|
logintty.invoke(child.get(ValueLayout.JAVA_INT, 0));
|
||||||
|
|
||||||
|
//createTestJavaProcessBuilder logs to (current process') System.out, but
|
||||||
|
//that may not work since the redirect. Setting System.out to a scratch value:
|
||||||
|
System.setOut(new PrintStream(new ByteArrayOutputStream()));
|
||||||
|
|
||||||
ProcessBuilder builder =
|
ProcessBuilder builder =
|
||||||
ProcessTools.createTestJavaProcessBuilder(ConsoleTest.class.getName());
|
ProcessTools.createTestJavaProcessBuilder(ConsoleTest.class.getName());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user