diff options
author | Kazuhiro Inaba <kinaba@google.com> | 2017-09-25 15:18:29 +0900 |
---|---|---|
committer | Kazuhiro Inaba <kinaba@google.com> | 2017-09-25 15:23:20 +0900 |
commit | 85a08ae9fead3f24daf108108257e4793a192e5f (patch) | |
tree | 167d5d853920462cb6f958ded6a4415fb4c581fe | |
parent | b2b0460c5b2ba48eb2fa4aedf6ae4ef61c0c70bf (diff) | |
download | bionic-85a08ae9fead3f24daf108108257e4793a192e5f.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
-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 3fd0a8cfb..b62b670d3 100644 --- a/tests/fcntl_test.cpp +++ b/tests/fcntl_test.cpp @@ -196,7 +196,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); |