Skip to content
Snippets Groups Projects
  1. Aug 14, 2017
    • Dan Cashman's avatar
      Move compatibility files out of prebuilts dir. · 78b3d573
      Dan Cashman authored
      The treble compatibility tests check for policy differences between old
      and new policy.  To do this correctly, we must not modify the policy which
      represents the older policies.  Move the files meant to be changed to a
      different location from the ones that are not meant to be touched to avoid
      any undesired changes to old policy, e.g. commit:
      2bdefd65078d890889672938c6f0d2accdd25bc5
      
      Bug: 36899958
      Test: Build-time tests build.
      Change-Id: I8fa3947cfae756f37556fb34e1654382e2e48372
      78b3d573
  2. Aug 09, 2017
  3. Aug 08, 2017
    • Dan Cashman's avatar
      Add 26.0 api compatibility check infrastructure. · 7f7c3b82
      Dan Cashman authored
      Add support to the treble_sepolicy_tests suite that explicitly look at
      the old and current policy versions, as well as the compatibility file,
      to determine if any new types have been added without a compatibility
      entry.  This first test catches the most common and likely changes that
      could change the type label of an object for which vendor policy may have
      needed access.  It also should prove the basis for additional compatibility
      checks between old and new policies.
      
      Bug: 36899958
      Test: Policy builds and tests pass.
      Change-Id: I609c913e6354eb10a04cc1a029ddd9fa0e592a4c
      7f7c3b82
  4. Jul 31, 2017
  5. Jun 13, 2017
  6. Jun 05, 2017
    • Jeff Vander Stoep's avatar
      Run Treble sepolicy tests at build time · 1fc0682e
      Jeff Vander Stoep authored
      Bug: 37008075
      Test: build policy on Marlin
      Change-Id: I53748f94c5df66fa17a53e7d0bed1be6b8603544
      (cherry picked from commit e1ddc6df)
      1fc0682e
    • Jeff Vander Stoep's avatar
      Verify correct application of labels and attributes · bdfc0301
      Jeff Vander Stoep authored
      With project Treble, we're relying heavily on attributes for
      permission inheritance and enforcement of separation between
      platform and vendor components.
      
      We neead tests that verify those attributes are correctly applied.
      This change adds the framework for those tests including a wrapper
      around libsepol for loading and querying policy, and a python module
      for running tests on policy and file_contexts.
      
      Included with the testing framework is a test asserting that the
      coredomain attribute is only applied to core processes. This
      verification is done using the following rules:
      1. Domain's entrypoint is on /system - coredomain
      2. Domain's entrypoint is on /vendor - not coredomain
      3. Domain belongs to a whitelist of known coredomains - coredomain
      
      In a subsequent commit these tests will be applied at build time.
      However, I first need to fix existing Treble violations exposed by
      this test. These tests will also be applied during CTS.
      
      Test: LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libsepolwrap.so python \
          treble.py -p $OUT/vendor/etc/selinux/precompiled_sepolicy \
          -f $OUT/vendor/etc/selinux/nonplat_file_contexts \
          -f $OUT/system/etc/selinux/plat_file_contexts
      Bug: 37008075
      Change-Id: I7825f5c2909a5801deaccf2bef2bfd227adb0ae9
      (cherry picked from commit 0366afdf)
      bdfc0301
  7. Jun 04, 2017
  8. Jun 02, 2017
  9. May 31, 2017
    • Jeff Vander Stoep's avatar
      Verify correct application of labels and attributes · 0366afdf
      Jeff Vander Stoep authored
      With project Treble, we're relying heavily on attributes for
      permission inheritance and enforcement of separation between
      platform and vendor components.
      
      We neead tests that verify those attributes are correctly applied.
      This change adds the framework for those tests including a wrapper
      around libsepol for loading and querying policy, and a python module
      for running tests on policy and file_contexts.
      
      Included with the testing framework is a test asserting that the
      coredomain attribute is only applied to core processes. This
      verification is done using the following rules:
      1. Domain's entrypoint is on /system - coredomain
      2. Domain's entrypoint is on /vendor - not coredomain
      3. Domain belongs to a whitelist of known coredomains - coredomain
      
      In a subsequent commit these tests will be applied at build time.
      However, I first need to fix existing Treble violations exposed by
      this test. These tests will also be applied during CTS.
      
      Test: LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libsepolwrap.so python \
          treble.py -p $OUT/vendor/etc/selinux/precompiled_sepolicy \
          -f $OUT/vendor/etc/selinux/nonplat_file_contexts \
          -f $OUT/system/etc/selinux/plat_file_contexts
      Bug: 37008075
      Change-Id: I7825f5c2909a5801deaccf2bef2bfd227adb0ae9
      0366afdf
Loading