summaryrefslogtreecommitdiff
path: root/trusty/coverage/coverage.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-12-16 07:36:09 -0800
committerTom Cherry <tomcherry@google.com>2020-03-23 13:15:05 -0700
commit986bd0c7c81a441aa5c19f663aa05d3363aace26 (patch)
treece20d7ff090013796928b2d6067f1b3797202c0c /trusty/coverage/coverage.cpp
parent447a1ead217d7993c2a97cdf516b21756bdea1e5 (diff)
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
Diffstat (limited to 'trusty/coverage/coverage.cpp')
0 files changed, 0 insertions, 0 deletions