Run VirtualizationTestCases with selinux disabled
When run with selinux enabled, the following selinux denial occurs:
avc: denied { read } for path="/data/local/tmp/virt-test/kernel"
dev="dm-8" ino=2789 scontext=u:r:virtualizationservice:s0
tcontext=u:object_r:shell_data_file:s0 tclass=file permissive=0
Instead of granting the service access to the shell data file which is
only for testing, running the test with selinux off.
Bug: 181615964
Test: atest VirtualizationTestCases on aosp_cf_x86_64-phone
Change-Id: I8c9664216b94e75bca9b6d8408965bf339f986df
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index a8fdf19..a58c08c 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -15,6 +15,9 @@
-->
<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"/>
<!-- Basic checks that the device has all the prerequisites. -->
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">