Commit graph

3 commits

Author SHA1 Message Date
Mark Salyzyn
ce32539cf3 lmkd: test: access /sys/module/lowmemorykiller/ as u:r:shell:s0
lmkd_unit_test gets an selinux violation when run unprivileged:

lmkd_unit_test: type=1400 audit(0.0:???): avc: denied { search } for
    name="lowmemorykiller" dev="sysfs" ino=??? scontext=u:r:shell:s0
    tcontext=u:object_r:sysfs_lowmemorykiller:s0 tclass=dir
    permissive=0

resulting in log noise.  Check for INKERNEL_MINFREE_PATH existence
after known to be escalated as root user to suppress noise.

Test: lmkd_unit_test as unprivileged user, there should be no audits.
Change-Id: Ia5c7824e7070c98ee6eea20ca53097e4e56d61b6
2018-04-03 14:41:11 +00:00
Suren Baghdasaryan
b453066e20 lmkd: Fix lmkd-test to work with relative paths
This change allows lmkd-test to work correctly when it's started
using absolute as well as relative path.

Change-Id: Ida58d13d66a224119a363f59cc59289f0167d3c9
2018-03-13 12:34:18 -07:00
Suren Baghdasaryan
e708b6fc68 lmkd: Implement lmkd-test
(cherry pick from commit 5f5b30e58b)

lmkd-test executes alloc-stress native application and monitors kernel
logs for OOM kills.

Bug: 63631020

Change-Id: Ia9441cc5f8e283131f0bc839cb808a911bcdb168
Merged-In: Ia9441cc5f8e283131f0bc839cb808a911bcdb168
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2018-03-09 11:19:24 -08:00