diff options
author | Maciej Żenczykowski <maze@google.com> | 2022-06-17 03:46:45 -0700 |
---|---|---|
committer | Maciej Żenczykowski <maze@google.com> | 2022-06-22 14:51:06 -0700 |
commit | eebd22cfc67a6cd746ff5fb40b755b289172bd72 (patch) | |
tree | 9e39ce84c298d9e9bd4ab704e600943e61d453c6 | |
parent | 3165da4756e117224f37dc5d9c31485025aeaf78 (diff) | |
download | cts-eebd22cfc67a6cd746ff5fb40b755b289172bd72.tar.gz |
Enforce that all types in /sys/fs/bpf have the bpffs_type attribute.
Cherrypick to tm-dev of reviewed/approved but unsubmitted
https://android-review.googlesource.com/c/platform/cts/+/2130352
Ignore-AOSP-First: will be cherrypicked from tm-dev to aosp/master
Bug: 218408035
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I1398e1cc48044ec192946d7a421ed5ed8343ef06
-rw-r--r-- | hostsidetests/security/src/android/security/cts/SELinuxHostTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java b/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java index 039867bbc85..573035c2de3 100644 --- a/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java +++ b/hostsidetests/security/src/android/security/cts/SELinuxHostTest.java @@ -983,6 +983,17 @@ public class SELinuxHostTest extends BaseHostJUnit4Test { } /** + * Tests that all types in /sys/fs/bpf have the bpffs_type attribute. + * + * @throws Exception + */ + @Test + public void testBpffsTypeViolators() throws Exception { + assertSepolicyTests("TestBpffsTypeViolations", "/sepolicy_tests", + PropertyUtil.isVendorApiLevelNewerThan(mDevice, 33) /* includeVendorSepolicy */); + } + + /** * Tests that all types in /proc have the proc_type attribute. * * @throws Exception |