Fix fcntrl#tee test to use the same expected/actual buffer size.
Previously the test compared /proc/version read into expected[256]
with actual[BUFSIZ]. This CL aligns the both of the buffer sizes to
the same BUFSIZ, so that /proc/version longer than 256 bytes won't
result in a test failure.
Bug: 66872345
Test: fcntl#tee on a device with long /proc/version (Chromebook Plus)
Change-Id: I004dd2189565b0bdde1aa22a2f25fafe74560180
(cherry picked from commit 85a08ae9fead3f24daf108108257e4793a192e5f)
diff --git a/tests/fcntl_test.cpp b/tests/fcntl_test.cpp
index 7e78830..cb00c3a 100644
--- a/tests/fcntl_test.cpp
+++ b/tests/fcntl_test.cpp
@@ -207,7 +207,7 @@
}
TEST(fcntl, tee) {
- char expected[256];
+ char expected[BUFSIZ];
FILE* expected_fp = fopen("/proc/version", "r");
ASSERT_TRUE(expected_fp != NULL);
ASSERT_TRUE(fgets(expected, sizeof(expected), expected_fp) != NULL);