platform_system_core/liblog/tests
Tom Cherry 2a6811b4d1 liblog: use a rwlock for writer initialization
The current system of using atomics isn't thread safe and may result
in doubly closing FDs or closing actively used FDs.  The safest way to
do this is to use a rwlock, which should not have a much higher
overhead than the atomics do, as a vast majority of the time, there
will not be writers.

This moves us further away from using the transport interface, which
will be removed.  Each writer should be self contained, without a
separate open or available function.

Also, keep the pmsg fd open if it is opened by
__android_log_pmsg_file_write().  This fd was closed due to issues
with zygote, but it looks like it is only called by recovery now, so
there is no reason to close this fd at the end of that function.

Test: logging works, liblog-unit-tests
Change-Id: I345c9a5d18c55b11a280c8362df854784abf46fd
2019-12-12 16:19:08 -08:00
..
Android.bp liblog: use a rwlock for writer initialization 2019-12-12 16:19:08 -08: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: simplify logd 'command' functions and struct logger 2019-11-18 07:16:40 -08:00
liblog_host_test.cpp liblog: add a test for liblog on host 2019-12-10 15:35:19 -08:00
liblog_test.cpp Remove old logger_entry_v* formats 2019-10-24 10:53:14 -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: use RunLogTests() for more tests 2019-10-14 13:11:26 -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
rwlock_test.cpp liblog: use a rwlock for writer initialization 2019-12-12 16:19:08 -08:00