Run MicrodroidHostTestCase with selinux enforced
We have sepolicy rules added so that we can run microdroid tests without
turning off selinux.
Bug: 168588769
Test: atest MicrodroidHostTestCases
Change-Id: I13997ce4332193674c70d65a2615bf2b00fd1fc9
diff --git a/tests/hostside/AndroidTest.xml b/tests/hostside/AndroidTest.xml
index eda733a..e8aced6 100644
--- a/tests/hostside/AndroidTest.xml
+++ b/tests/hostside/AndroidTest.xml
@@ -14,14 +14,6 @@
limitations under the License.
-->
<configuration description="Tests for microdroid">
- <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
- <option name="force-root" value="true" />
- </target_preparer>
-
- <!-- virtualizationservice doesn't have access to shell_data_file. Instead of giving it
- a test-only permission, run it without selinux -->
- <target_preparer class="com.android.tradefed.targetprep.DisableSELinuxTargetPreparer"/>
-
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
<option name="jar" value="MicrodroidHostTestCases.jar" />
</test>
diff --git a/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java b/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java
index 988b1ad..40debba 100644
--- a/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java
+++ b/tests/hostside/helper/java/android/virt/test/VirtualizationTestCaseBase.java
@@ -84,7 +84,7 @@
// don't run the test (instead of failing)
android.assumeSuccess("ls /dev/kvm");
android.assumeSuccess("ls /dev/vhost-vsock");
- android.assumeSuccess("ls /apex/com.android.virt/bin/crosvm");
+ android.assumeSuccess("ls /apex/com.android.virt");
}
// Run an arbitrary command in the host side and returns the result
@@ -181,7 +181,6 @@
final String debugFlag = debug ? "--debug " : "";
// Run the VM
- android.run("start", "virtualizationservice");
String ret =
android.run(
VIRT_APEX + "bin/vm",