am 001edd36: am 98460f26: am c77d5998: am bb96809c: Ensure SELinux is not in enforcing mode.
* commit '001edd362ea56a016d65a5c51785ad0c9ad4238b':
Ensure SELinux is not in enforcing mode.
diff --git a/tests/tests/security/src/android/security/cts/KernelSettingsTest.java b/tests/tests/security/src/android/security/cts/KernelSettingsTest.java
index cc4b6a6..e660009 100644
--- a/tests/tests/security/src/android/security/cts/KernelSettingsTest.java
+++ b/tests/tests/security/src/android/security/cts/KernelSettingsTest.java
@@ -30,6 +30,17 @@
public class KernelSettingsTest extends TestCase {
/**
+ * Ensure that SELinux is not in enforcing mode.
+ */
+ public void testSELinuxEnforcing() throws IOException {
+ try {
+ assertEquals("0", getFile("/sys/fs/selinux/enforce"));
+ } catch (FileNotFoundException e) {
+ // SELinux is not compiled into the kernel. Ignore exception.
+ }
+ }
+
+ /**
* Protect against kernel based NULL pointer attacks by enforcing a
* minimum (and maximum!) value of mmap_min_addr.
*