From 07320dc0a37ab7cb0b4b742e8c4b7767bc3fe997 Mon Sep 17 00:00:00 2001 From: Yao Chen Date: Wed, 25 Oct 2017 11:35:05 -0700 Subject: [PATCH] Allow stats buffer to be empty in liblog CTS. Bug: 68205209 Test: CtsLiblogTestCases Change-Id: I846c7cf72c54b02c2bc67c9c9e37b5cf4ae3da2b --- liblog/tests/log_read_test.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/liblog/tests/log_read_test.cpp b/liblog/tests/log_read_test.cpp index 6ed568aa4..444a5ac64 100644 --- a/liblog/tests/log_read_test.cpp +++ b/liblog/tests/log_read_test.cpp @@ -100,9 +100,13 @@ TEST(liblog, android_logger_get_) { EXPECT_LT(0, get_log_size); // crash buffer is allowed to be empty, that is actually healthy! // kernel buffer is allowed to be empty on "user" builds + // stats buffer is allowed to be empty TEMPORARILY. + // TODO: remove stats buffer from here once we start to use it in + // framework (b/68266385). EXPECT_LE( // boolean 1 or 0 depending on expected content or empty !!((strcmp("crash", name) != 0) && - ((strcmp("kernel", name) != 0) || __android_log_is_debuggable())), + ((strcmp("kernel", name) != 0) || __android_log_is_debuggable()) && + (strcmp("stats", name) != 0)), android_logger_get_log_readable_size(logger)); } else { EXPECT_NE(0, get_log_size);