Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 986bd0c7 authored by Tom Cherry's avatar Tom Cherry
Browse files

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
parent 447a1ead
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment