From 9ce327200c014b2e37dd1543c599324db55fdaa1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 26 Feb 2016 16:57:54 -0800 Subject: [PATCH] Remove a test for an API I'm removing. Change-Id: I44ee84b92fdbf561551e5cf90e0c44df535de83f --- liblog/tests/libc_test.cpp | 60 -------------------------------------- 1 file changed, 60 deletions(-) diff --git a/liblog/tests/libc_test.cpp b/liblog/tests/libc_test.cpp index 9dd6f0340..0badbd950 100644 --- a/liblog/tests/libc_test.cpp +++ b/liblog/tests/libc_test.cpp @@ -31,66 +31,6 @@ typedef unsigned char log_id_t; // log_id_t missing as a result #include #include -TEST(libc, __libc_android_log_event_int) { - struct logger_list *logger_list; - - pid_t pid = getpid(); - - ASSERT_TRUE(NULL != (logger_list = android_logger_list_open( - LOG_ID_EVENTS, ANDROID_LOG_RDONLY | ANDROID_LOG_NONBLOCK, 1000, pid))); - - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - int value = ts.tv_nsec; - - __libc_android_log_event_int(0, value); - usleep(1000000); - - int count = 0; - - for (;;) { - log_msg log_msg; - if (android_logger_list_read(logger_list, &log_msg) <= 0) { - break; - } - - ASSERT_EQ(log_msg.entry.pid, pid); - - if ((log_msg.entry.len != (4 + 1 + 4)) - || ((int)log_msg.id() != LOG_ID_EVENTS)) { - continue; - } - - char *eventData = log_msg.msg(); - - int incoming = (eventData[0] & 0xFF) | - ((eventData[1] & 0xFF) << 8) | - ((eventData[2] & 0xFF) << 16) | - ((eventData[3] & 0xFF) << 24); - - if (incoming != 0) { - continue; - } - - if (eventData[4] != EVENT_TYPE_INT) { - continue; - } - - incoming = (eventData[4 + 1 + 0] & 0xFF) | - ((eventData[4 + 1 + 1] & 0xFF) << 8) | - ((eventData[4 + 1 + 2] & 0xFF) << 16) | - ((eventData[4 + 1 + 3] & 0xFF) << 24); - - if (incoming == value) { - ++count; - } - } - - EXPECT_EQ(1, count); - - android_logger_list_close(logger_list); -} - TEST(libc, __libc_fatal_no_abort) { struct logger_list *logger_list;