No need to disable SELinux for tests now that policy is fixed.
Root is needed for now though, to allow test to open vsock.
Bug: 192256642
Test: atest VirtualizationTestCases
Change-Id: Ied8464fc83b80f1e15e9b14c5665a139d15bfd91
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index b56c0e8..5e7faf9 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -15,10 +15,6 @@
-->
<configuration description="Config for Virtualization tests">
- <!-- 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"/>
-
<!-- Push test binaries to the device. -->
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
@@ -28,6 +24,10 @@
<option name="push-file" key="virt_test_initramfs.img" value="/data/local/tmp/virt-test/initramfs" />
</target_preparer>
+ <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer">
+ <option name="force-root" value="true" />
+ </target_preparer>
+
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp/virt-test" />
<option name="module-name" value="VirtualizationTestCases" />