selabel_lookup() must be threadsafe, but had failed in the past.
Bug: 63861738
Test: this newly added test
Change-Id: I78bdb8e555433e8217ac6d4be112ba91de9f03bb
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
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