Merge "Set pipe size to >1MB for debugDump test cases." am: d928053397

am: 04fcc83578

Change-Id: I268c1f1fd16732ffce1569a19d8efa47897fc329
This commit is contained in:
Tri Vo
2017-10-18 02:28:01 +00:00
committed by android-build-merger

View File

@@ -481,6 +481,10 @@ static void testDebugDump(DebugDump debugDump) {
int fds[2];
ASSERT_EQ(0, pipe2(fds, O_NONBLOCK)) << errno;
// Make sure that the pipe is at least 1 MB in size. The test process runs
// in su domain, so it should be safe to make this call.
fcntl(fds[0], F_SETPIPE_SZ, 1 << 20);
// Wrap the temporary file file descriptor in a native handle
auto* nativeHandle = native_handle_create(1, 0);
ASSERT_NE(nullptr, nativeHandle);