diff options
author | Kazuhiro Inaba <kinaba@google.com> | 2017-09-25 15:18:29 +0900 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2017-09-25 23:33:59 +0000 |
commit | 78d71dddba82ba3f9d4bc631f4adfdffc7b611f1 (patch) | |
tree | 1e78f52e58cd31318c444d6ebb31ce5785e72cf9 | |
parent | c2c36b661cf80f88305fc15907a6df16a0342862 (diff) | |
download | bionic-78d71dddba82ba3f9d4bc631f4adfdffc7b611f1.tar.gz |
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)
-rw-r--r-- | tests/fcntl_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/fcntl_test.cpp b/tests/fcntl_test.cpp index 74d367564..c7a4d9d86 100644 --- a/tests/fcntl_test.cpp +++ b/tests/fcntl_test.cpp @@ -205,7 +205,7 @@ TEST(fcntl, vmsplice) { } 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); |