Merge "liblog: android_log_isloggable failing apct" into nyc-dev

This commit is contained in:
TreeHugger Robot 2016-04-19 17:05:36 +00:00 committed by Android (Google) Code Review
commit ded0f36822
2 changed files with 15 additions and 21 deletions

View File

@ -63,7 +63,6 @@ static int check_cache(struct cache *cache)
static void refresh_cache(struct cache *cache, const char *key)
{
uint32_t serial;
char buf[PROP_VALUE_MAX];
if (!cache->pinfo) {
@ -71,13 +70,8 @@ static void refresh_cache(struct cache *cache, const char *key)
if (!cache->pinfo) {
return;
}
cache->serial = -1;
}
serial = __system_property_serial(cache->pinfo);
if (serial == cache->serial) {
return;
}
cache->serial = serial;
cache->serial = __system_property_serial(cache->pinfo);
__system_property_read(cache->pinfo, 0, buf);
switch(buf[0]) {
case 't': case 'T':

View File

@ -1277,7 +1277,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, levels[j].level));
}
@ -1286,7 +1286,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, levels[j].level));
}
@ -1318,7 +1318,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1327,7 +1327,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1347,7 +1347,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1356,7 +1356,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1378,7 +1378,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1387,7 +1387,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1407,7 +1407,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1416,7 +1416,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1452,7 +1452,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1461,7 +1461,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1481,7 +1481,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_FALSE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_FALSE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}
@ -1490,7 +1490,7 @@ TEST(liblog, is_loggable) {
fprintf(stderr, "\n");
}
EXPECT_TRUE(android_log_is_loggable);
for(size_t k = 1000; k; --k) {
for(size_t k = 10; k; --k) {
EXPECT_TRUE(__android_log_is_loggable(
levels[i].level, tag, ANDROID_LOG_DEBUG));
}