diff options
-rw-r--r-- | luni/src/test/java/libcore/java/lang/ProcessBuilderTest.java | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/luni/src/test/java/libcore/java/lang/ProcessBuilderTest.java b/luni/src/test/java/libcore/java/lang/ProcessBuilderTest.java index bc4fe80f62..4c45567364 100644 --- a/luni/src/test/java/libcore/java/lang/ProcessBuilderTest.java +++ b/luni/src/test/java/libcore/java/lang/ProcessBuilderTest.java @@ -16,11 +16,8 @@ package libcore.java.lang; -import android.system.Os; - import java.io.ByteArrayOutputStream; import java.io.File; -import java.io.FileDescriptor; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; @@ -69,49 +66,6 @@ public class ProcessBuilderTest extends AbstractResourceLeakageDetectorTestCase assertRedirectErrorStream(false, "out\n", "err\n"); } - public void testRedirectErrorStream_outputAndErrorAreMerged() throws Exception { - Process process = new ProcessBuilder(shell()) - .redirectErrorStream(true) - .start(); - try { - long pid = getChildProcessPid(process); - String path = "/proc/" + pid + "/fd/"; - assertEquals("stdout and stderr should point to the same socket", - Os.stat(path + "1").st_ino, Os.stat(path + "2").st_ino); - } finally { - process.destroy(); - } - } - - /** - * Tests that a child process can INHERIT this parent process's - * stdin / stdout / stderr file descriptors. - */ - public void testRedirectInherit() throws Exception { - Process process = new ProcessBuilder() - .command(shell()) - .redirectInput(Redirect.INHERIT) - .redirectOutput(Redirect.INHERIT) - .redirectError(Redirect.INHERIT) - .start(); - try { - List<Long> parentInodes = Arrays.asList( - Os.fstat(FileDescriptor.in).st_ino, - Os.fstat(FileDescriptor.out).st_ino, - Os.fstat(FileDescriptor.err).st_ino); - long childPid = getChildProcessPid(process); - // Get the inode numbers of the ends of the symlink chains - List<Long> childInodes = Arrays.asList( - Os.stat("/proc/" + childPid + "/fd/0").st_ino, - Os.stat("/proc/" + childPid + "/fd/1").st_ino, - Os.stat("/proc/" + childPid + "/fd/2").st_ino); - - assertEquals(parentInodes, childInodes); - } finally { - process.destroy(); - } - } - public void testRedirectFile_input() throws Exception { String inputFileContents = "process input for testing\n" + TAG; File file = File.createTempFile(TAG, "in"); |