platform_system_core/liblog/tests
Tom Cherry 5398021b9e liblog: remove alarm in logd_reader.cpp
There is an alarm() call that provides a 30 second timeout in case
logd is unavailable.  The main reason for this is in the case that logd
is crashing, debuggerd is ptrace'ing logd, and tombstoned is
attempting to dump log messages.  In this case, with no other checks
and without this alarm, tombstoned will deadlock when dumping log
messages.

However, tombstoned already has two mechanisms to prevent the above
situation from happening:
1) It checks that the thread name that is is dumping is either logd or
   starts with "logd." and skips dumping logs in this case.
2) It does not dump logs if it is running in process for any process.

Calling alarm() or modifying signal handlers from general purpose
libraries is not recommended either, so without a strong reason to
keep this, this change removes it.

This also shortens the liblog.wrap_mode_blocks test time, since the 30
second issue that it ensures does not happen has been fundamentally
removed.

Test: `kill -8 `pidof logd`` succeeds without delay
Test: liblog, logd unit tests
Change-Id: Id8a40544645d220e49f7ba299201af80a0c44de9
2019-10-08 13:05:55 -07:00
..
Android.bp liblog: run in isolated mode, disable flaky tests 2019-10-04 13:05:50 -07:00
AndroidTest.xml Actually add right instant app boilerplate. 2019-01-29 17:12:35 -08:00
libc_test.cpp liblog: simplify socket_local_client() and always use CLOEXEC 2019-02-12 12:53:19 -08:00
liblog_benchmark.cpp liblog: remove log/log_transport.h 2019-10-01 08:14:40 -07:00
liblog_test.cpp liblog: run in isolated mode, disable flaky tests 2019-10-04 13:05:50 -07:00
log_id_test.cpp Small liblog test fixes & readability improvements. 2017-08-25 14:53:21 +01:00
log_radio_test.cpp liblog: simplify socket_local_client() and always use CLOEXEC 2019-02-12 12:53:19 -08:00
log_read_test.cpp liblog: expect content only if ro.logd.kernel is enabled 2018-06-05 07:43:15 -07:00
log_system_test.cpp liblog: simplify socket_local_client() and always use CLOEXEC 2019-02-12 12:53:19 -08:00
log_time_test.cpp Use #pragma one for all liblog includes 2019-01-16 10:49:45 -08:00
log_wrap_test.cpp liblog: remove alarm in logd_reader.cpp 2019-10-08 13:05:55 -07:00
logprint_test.cpp liblog: display valid utf8 characters with 'printable' log format 2019-04-29 09:14:37 -07:00