From 7d35a3d0f26426b8e36c4b91df25fab58d8a55f4 Mon Sep 17 00:00:00 2001 From: Tri Vo Date: Tue, 17 Oct 2017 11:07:29 -0700 Subject: [PATCH] Set pipe size to >1MB for debugDump test cases. Test: VtsHalAudioV2_0Target Change-Id: I2dd43851a43609ad2953030303edaeb684b63096 --- audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp index c88c6344b4..838aca2316 100644 --- a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp +++ b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp @@ -535,6 +535,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);