android_system_core/liblog/tests
Tom Cherry 986bd0c7c8 Skip pmsg related tests if /dev/pmsg0 is not found
These test use fopen() with append which includes O_CREAT.  If these
tests are run in the 'su' SELinux domain (aka through `adb root`) then
they'll create a blank text file when opening /dev/pmsg0 if it does
not exist.  Other tests and processes will attempt to write to this
file, either succeeding (for 'su' domain processes) and wasting memory,
or failing due to SELinux and generating audits (for typical
processes).

This isn't a problem for user builds, since without `adb root`, the
tests simply fail when pmsg0 does not exist.

Test: no excess denials or /dev/pmsg0 creation when running
      liblog-unit-tests as root
Change-Id: I06e0f308c72db5a53c5f9e4a29bd23f56352c7e2
2020-03-23 13:15:05 -07:00
..
Android.bp liblog: fix host tests 2020-01-28 13:07:11 -08:00
AndroidTest.xml CtsLiblogTestCases secondary_user 2020-01-06 09:58:07 -08:00
libc_test.cpp Skip pmsg related tests if /dev/pmsg0 is not found 2020-03-23 13:15:05 -07:00
liblog_benchmark.cpp liblog: add benchmark tests for not-printed message 2020-02-21 16:38:31 -08:00
liblog_default_tag.cpp liblog: fix host tests 2020-01-28 13:07:11 -08:00
liblog_global_state.cpp liblog: fix host tests 2020-01-28 13:07:11 -08:00
liblog_host_test.cpp liblog: fix host tests 2020-01-28 13:07:11 -08:00
liblog_test.cpp Skip pmsg related tests if /dev/pmsg0 is not found 2020-03-23 13:15:05 -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