liblog: enable tests accidentally disabled

Some tests were meant to be run with logd only and were ifdef'ed based
on USING_LOGGER_DEFAULT.  Unfortunately a previous change removed the
appropriate #define, so these tests weren't being run at all.  They
passed multiple times on CF, so they should still be stable.

Except for one test for __android_log_event_list.  We removed that
struct, so this change removes the test as well.

Test: liblog-unit-tests on CF (5 runs)

Change-Id: Ifaf3dbfdc5c714aead3f26c333e9cf19a1ed86c6
This commit is contained in:
Tom Cherry 2019-08-23 14:43:44 -07:00
parent 3bd09415a3
commit 1bc130184c
2 changed files with 1 additions and 15 deletions

View file

@ -3004,21 +3004,6 @@ TEST(liblog, create_android_logger_overflow) {
EXPECT_LE(0, android_log_destroy(&ctx));
ASSERT_TRUE(NULL == ctx);
}
TEST(liblog, android_log_write_list_buffer) {
__android_log_event_list ctx(1005);
ctx << 1005 << "tag_def"
<< "(tag|1),(name|3),(format|3)";
std::string buffer(ctx);
ctx.close();
char msgBuf[1024];
memset(msgBuf, 0, sizeof(msgBuf));
EXPECT_EQ(android_log_buffer_to_string(buffer.data(), buffer.length(), msgBuf,
sizeof(msgBuf)),
0);
EXPECT_STREQ(msgBuf, "[1005,tag_def,(tag|1),(name|3),(format|3)]");
}
#endif // USING_LOGGER_DEFAULT
#ifdef USING_LOGGER_DEFAULT // Do not retest pmsg functionality

View file

@ -2,4 +2,5 @@
#include <log/log_transport.h>
#define TEST_LOGGER LOGGER_DEFAULT
#endif
#define USING_LOGGER_DEFAULT
#include "liblog_test.cpp"