Commit graph

3 commits

Author SHA1 Message Date
Tom Cherry
57ef66b6fa ueventd: add test to ensure selabel_lookup() is thread safe
selabel_lookup() must be threadsafe, but had failed in the past.

Bug: 63861738
Test: this newly added test
Change-Id: I78bdb8e555433e8217ac6d4be112ba91de9f03bb
2017-08-08 13:11:44 -07:00
Tom Cherry
2ef572be30 ueventd: fixup ueventd_test.cpp
Use ASSERT_EQ() instead of EXPECT_EQ() to prevent segfaults after
failed API calls.

Do not run setfscreatecon_IsPerThread unless we're in permissive mode
as it will not pass otherwise.

Test: init unit tests
Change-Id: I70525d438e89f1ec036255890169a50b5007b4c4
2017-07-19 15:29:20 -07:00
Tom Cherry
c2e181cf1d ueventd: add tests for setegid()/setfscreatecon() and threads
setegid() and setfscreatecon() on Android both operate on a per-thread
basis, not a per-process basis.

Ueventd may take advantage of this in the future, so this CL
introduces tests that ensure that this functionality remains
consistent.

Bug: 63441941
Test: newly added unit tests
Change-Id: I8b1c62cc322b6fe44b748550a4cea8658d9efd88
2017-07-17 11:08:41 -07:00