summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2014-12-18 00:32:00 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-12-18 00:32:01 +0000
commit93241de734c3b9cf20e8e8956e6f6ccacc5b5ef2 (patch)
treeae046ca02ee4509cd095cd8e6a080c5f6a2a01fe
parentf62877d305d2da4876707137cefe0eaa1b2953c3 (diff)
parent988fd73499492d5826754ca85acac1e64357121c (diff)
Merge "Remove a bitrotted test."
-rw-r--r--core/tests/coretests/src/android/os/SELinuxTest.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/core/tests/coretests/src/android/os/SELinuxTest.java b/core/tests/coretests/src/android/os/SELinuxTest.java
deleted file mode 100644
index 9b63a6b1adfe..000000000000
--- a/core/tests/coretests/src/android/os/SELinuxTest.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package android.os;
-
-import android.os.Process;
-import android.os.SELinux;
-import android.test.AndroidTestCase;
-import static junit.framework.Assert.assertEquals;
-
-public class SELinuxTest extends AndroidTestCase {
-
- public void testgetFileCon() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String ctx = SELinux.getFileContext("/system/bin/toolbox");
- assertEquals(ctx, "u:object_r:system_file:s0");
- }
-
- public void testgetCon() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String mycon = SELinux.getContext();
- assertEquals(mycon, "u:r:untrusted_app:s0:c33");
- }
-
- public void testgetPidCon() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String mycon = SELinux.getPidContext(Process.myPid());
- assertEquals(mycon, "u:r:untrusted_app:s0:c33");
- }
-
- public void testcheckSELinuxAccess() {
- if(SELinux.isSELinuxEnabled() == false)
- return;
-
- String mycon = SELinux.getContext();
- boolean ret;
- ret = SELinux.checkSELinuxAccess(mycon, mycon, "process", "fork");
- assertEquals(ret,"true");
- ret = SELinux.checkSELinuxAccess(mycon, mycon, "memprotect", "mmap_zero");
- assertEquals(ret,"true");
- }
-}