summaryrefslogtreecommitdiffstats
path: root/logcat
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2015-03-09 12:42:56 -0700
committerMark Salyzyn <salyzyn@google.com>2015-03-12 20:11:36 +0000
commit9c51243d8bbcc5ee65dd6f7adc031e410ba5e86b (patch)
treed42b0a46a5ea70d252a0a6be23dea7bfe0894b3e /logcat
parent332c2881305549450b162d854b139611d7bdc42f (diff)
downloadsystem_core-9c51243d8bbcc5ee65dd6f7adc031e410ba5e86b.zip
system_core-9c51243d8bbcc5ee65dd6f7adc031e410ba5e86b.tar.gz
system_core-9c51243d8bbcc5ee65dd6f7adc031e410ba5e86b.tar.bz2
logcat: test: logcat.logrotate fails
Test did not handle all possible multiples of block sizes. Bug: 19604106 Change-Id: I693358be9598926389631baf21c5883e0f2fd735
Diffstat (limited to 'logcat')
-rw-r--r--logcat/tests/logcat_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/logcat/tests/logcat_test.cpp b/logcat/tests/logcat_test.cpp
index b358485..de2db67 100644
--- a/logcat/tests/logcat_test.cpp
+++ b/logcat/tests/logcat_test.cpp
@@ -505,12 +505,14 @@ TEST(logcat, logrotate) {
while (fgets(buffer, sizeof(buffer), fp)) {
static const char match_1[] = "4 log.txt";
static const char match_2[] = "8 log.txt";
- static const char match_3[] = "16 log.txt";
+ static const char match_3[] = "12 log.txt";
+ static const char match_4[] = "16 log.txt";
static const char total[] = "total ";
if (!strncmp(buffer, match_1, sizeof(match_1) - 1)
|| !strncmp(buffer, match_2, sizeof(match_2) - 1)
- || !strncmp(buffer, match_3, sizeof(match_3) - 1)) {
+ || !strncmp(buffer, match_3, sizeof(match_3) - 1)
+ || !strncmp(buffer, match_4, sizeof(match_4) - 1)) {
++count;
} else if (strncmp(buffer, total, sizeof(total) - 1)) {
fprintf(stderr, "WARNING: Parse error: %s", buffer);