Use checkfc -t for testAospFileContexts
Instead of comparing the AOSP file_contexts with the device /system
file_contexts, apply the AOSP test data to make sure that the device
resolve the same security context than AOSP.
Split tryRunCommand to capture the exit code of checkfc.
Throw a specific error if a resource file is not found.
Bug: 347112668
Test: atest CtsSecurityHostTestCases:android.security.cts.SELinuxHostTest#testAospFileContexts
Flag: TEST_ONLY
Change-Id: I635639e82dd0c1009378f1475e5335c18172f537
2 files changed