Annotate tests accordingly
* More tests were annotated as CddTest
* Most of the CddTests don't have associated CDD requirement # because
they test the documented behavior of AVF System APIs
* Some tests were newly annotated as GmsTest
Bug: 384863546
Test: build the tests
Change-Id: Ie802adddd75f7adbe2d0658f66ca923fae250fb2
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index 01ac6a1..4f9806a 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -36,6 +36,7 @@
import android.cts.statsdatom.lib.ReportUtils;
import com.android.compatibility.common.util.CddTest;
+import com.android.compatibility.common.util.GmsTest;
import com.android.compatibility.common.util.PropertyUtil;
import com.android.compatibility.common.util.VsrTest;
import com.android.microdroid.test.common.ProcessUtil;
@@ -415,7 +416,8 @@
@Test
@CddTest
- @VsrTest(requirements = {"VSR-7.1-001.008"})
+ @GmsTest(requirements = {"GMS-3-7.1-002", "GMS-VSR-7.1-001.006"})
+ @VsrTest(requirements = {"VSR-7.1-001.007"})
public void UpgradedPackageIsAcceptedWithSecretkeeper() throws Exception {
// Preconditions
assumeVmTypeSupported("microdroid", true); // Non-protected VMs may not support upgrades
@@ -433,7 +435,8 @@
@Test
@CddTest
- @VsrTest(requirements = {"VSR-7.1-001.008"})
+ @GmsTest(requirements = {"GMS-3-7.1-002", "GMS-VSR-7.1-001.006"})
+ @VsrTest(requirements = {"VSR-7.1-001.007"})
public void DowngradedPackageIsRejectedProtectedVm() throws Exception {
// Preconditions: Rollback protection is provided only for protected VM.
assumeVmTypeSupported("microdroid", true);
@@ -482,7 +485,7 @@
@Test
@Parameters(method = "osVersions")
@TestCaseName("{method}_os_{0}")
- @CddTest(requirements = {"9.17/C-2-1", "9.17/C-2-2", "9.17/C-2-6"})
+ @GmsTest(requirements = {"GMS-3-7.1-010"})
public void protectedVmRunsPvmfw(String os) throws Exception {
// Arrange
assumeKernelSupported(os);
@@ -515,7 +518,7 @@
@Test
@Parameters(method = "osVersions")
@TestCaseName("{method}_os_{0}")
- @CddTest(requirements = {"9.17/C-2-1", "9.17/C-2-2", "9.17/C-2-5", "9.17/C-2-6"})
+ @GmsTest(requirements = {"GMS-3-7.1-003", "GMS-3-7.1-010"})
public void protectedVmWithImageSignedWithDifferentKeyFailsToVerifyPayload(String os)
throws Exception {
assumeKernelSupported(os);
@@ -544,7 +547,7 @@
@Test
@Parameters(method = "osVersions")
@TestCaseName("{method}_os_{0}")
- @CddTest(requirements = {"9.17/C-2-2", "9.17/C-2-6"})
+ @GmsTest(requirements = {"GMS-3-7.1-003", "GMS-3-7.1-010"})
public void testBootSucceedsWhenNonProtectedVmStartsWithImagesSignedWithDifferentKey(String os)
throws Exception {
// Preconditions
@@ -572,7 +575,7 @@
@Test
@Parameters(method = "osVersions")
@TestCaseName("{method}_os_{0}")
- @CddTest(requirements = {"9.17/C-2-2", "9.17/C-2-5", "9.17/C-2-6"})
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void testBootFailsWhenVbMetaDigestDoesNotMatchBootconfig(String os) throws Exception {
// protectedVmWithImageSignedWithDifferentKeyRunsPvmfw() is the protected case.
assumeKernelSupported(os);
@@ -1010,7 +1013,8 @@
@Test
@Parameters(method = "params")
@TestCaseName("{method}_protectedVm_{0}_os_{1}")
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-1-2", "9.17/C/1-3"})
+ @CddTest
+ @GmsTest(requirements = {"GMS-3-7.1-001.002"})
public void testMicrodroidBoots(boolean protectedVm, String os) throws Exception {
// Preconditions
assumeKernelSupported(os);
@@ -1097,6 +1101,7 @@
}
@Test
+ @CddTest
public void testPathToBinaryIsRejected() throws Exception {
CommandRunner android = new CommandRunner(getDevice());
@@ -1145,6 +1150,7 @@
}
@Test
+ @CddTest
public void testRunEmptyPayload() throws Exception {
CommandRunner android = new CommandRunner(getDevice());
@@ -1198,7 +1204,6 @@
}
@Test
- @CddTest(requirements = {"9.17/C-2-2", "9.17/C-2-6"})
public void testAllVbmetaUseSHA256() throws Exception {
File virtApexDir = FileUtil.createTempDir("virt_apex");
// Pull the virt apex's etc/ directory (which contains images)
@@ -1309,6 +1314,7 @@
@Test
@Parameters(method = "params")
@TestCaseName("{method}_protectedVm_{0}_os_{1}")
+ @CddTest
public void testDeviceAssignment(boolean protectedVm, String os) throws Exception {
// Preconditions
assumeKernelSupported(os);
@@ -1364,6 +1370,8 @@
}
@Test
+ @CddTest
+ @GmsTest(requirements = {"GMS-3-7.1-001.002"})
public void testOsVersions() throws Exception {
for (String os : getSupportedOSList()) {
assertWithMessage("Unknown OS \"%s\"", os).that(SUPPORTED_OSES.values()).contains(os);
@@ -1414,6 +1422,7 @@
@Test
@Parameters(method = "osVersions")
@TestCaseName("{method}_os_{0}")
+ @CddTest
public void microdroidDeviceTreeCompat(String os) throws Exception {
assumeArm64Supported();
final String configPath = "assets/vm_config.json";
@@ -1442,6 +1451,7 @@
@Test
@Parameters(method = "osVersions")
@TestCaseName("{method}_os_{0}")
+ @CddTest
public void microdroidProtectedDeviceTreeCompat(String os) throws Exception {
assumeArm64Supported();
final String configPath = "assets/vm_config.json";
diff --git a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidCapabilitiesTest.java b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidCapabilitiesTest.java
index 08bc310..df5525f 100644
--- a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidCapabilitiesTest.java
+++ b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidCapabilitiesTest.java
@@ -40,7 +40,7 @@
@RunWith(JUnit4.class)
public class MicrodroidCapabilitiesTest extends MicrodroidDeviceTestBase {
@Test
- @CddTest(requirements = "9.17/C-1-6")
+ @CddTest(requirements = "9.17/C-1-1")
public void supportForProtectedOrNonProtectedVms() {
assumeSupportedDevice();
@@ -61,7 +61,7 @@
}
@Test
- @VsrTest(requirements = "VSR-7.1-001.005")
+ @VsrTest(requirements = "VSR-7.1-001.004")
public void avfIsRequired() {
assumeVsrCompliant();
assume().withMessage("Requirement doesn't apply due to vendor API level")
diff --git a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
index 9c66765..6260458 100644
--- a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
+++ b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
@@ -66,6 +66,7 @@
import androidx.test.platform.app.InstrumentationRegistry;
import com.android.compatibility.common.util.CddTest;
+import com.android.compatibility.common.util.GmsTest;
import com.android.compatibility.common.util.VsrTest;
import com.android.microdroid.test.device.MicrodroidDeviceTestBase;
import com.android.microdroid.test.vmshare.IVmShareTestService;
@@ -216,13 +217,13 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void createAndConnectToVm() throws Exception {
createAndConnectToVmHelper(CPU_TOPOLOGY_ONE_CPU, /* shouldUseHugepages= */ false);
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void createAndConnectToVm_HostCpuTopology() throws Exception {
createAndConnectToVmHelper(CPU_TOPOLOGY_MATCH_HOST, /* shouldUseHugepages= */ false);
}
@@ -248,8 +249,9 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
@VsrTest(requirements = {"VSR-7.1-001.006"})
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.005"})
public void vmAttestationWhenRemoteAttestationIsNotSupported() throws Exception {
// pVM remote attestation is only supported on protected VMs.
assumeProtectedVM();
@@ -276,8 +278,9 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
@VsrTest(requirements = {"VSR-7.1-001.006"})
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.005"})
public void vmAttestationWithVendorPartitionWhenSupported() throws Exception {
// pVM remote attestation is only supported on protected VMs.
assumeProtectedVM();
@@ -294,8 +297,9 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
@VsrTest(requirements = {"VSR-7.1-001.006"})
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.005"})
public void vmAttestationWhenRemoteAttestationIsSupported() throws Exception {
// pVM remote attestation is only supported on protected VMs.
assumeProtectedVM();
@@ -340,7 +344,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void createAndRunNoDebugVm() throws Exception {
assumeSupportedDevice();
@@ -361,7 +365,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void autoCloseVm() throws Exception {
assumeSupportedDevice();
@@ -391,7 +395,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void autoCloseVmDescriptor() throws Exception {
VirtualMachineConfig config =
newVmConfigBuilderWithPayloadBinary("MicrodroidTestNativeLib.so")
@@ -420,7 +424,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmDescriptorClosedOnImport() throws Exception {
VirtualMachineConfig config =
newVmConfigBuilderWithPayloadBinary("MicrodroidTestNativeLib.so")
@@ -443,7 +447,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmLifecycleChecks() throws Exception {
assumeSupportedDevice();
@@ -491,7 +495,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void connectVsock() throws Exception {
assumeSupportedDevice();
@@ -529,7 +533,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void binderCallbacksWork() throws Exception {
assumeSupportedDevice();
@@ -581,7 +585,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmConfigGetAndSetTests() {
// Minimal has as little as specified as possible; everything that can be is defaulted.
VirtualMachineConfig.Builder minimalBuilder =
@@ -650,7 +654,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmConfigBuilderValidationTests() {
VirtualMachineConfig.Builder builder =
new VirtualMachineConfig.Builder(getContext()).setProtectedVm(mProtectedVm);
@@ -700,7 +704,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void compatibleConfigTests() {
VirtualMachineConfig baseline = newBaselineBuilder().build();
@@ -787,7 +791,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmUnitTests() throws Exception {
VirtualMachineConfig.Builder builder = newVmConfigBuilderWithPayloadBinary("binary.so");
VirtualMachineConfig config = builder.build();
@@ -808,7 +812,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void testAvfRequiresUpdatableApex() throws Exception {
assertWithMessage("Devices that support AVF must also support updatable APEX")
.that(SystemProperties.getBoolean("ro.apex.updatable", false))
@@ -816,7 +820,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmmGetAndCreate() throws Exception {
assumeSupportedDevice();
@@ -863,7 +867,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmFilesStoredInDeDirWhenCreatedFromDEContext() throws Exception {
final Context ctx = getContext().createDeviceProtectedStorageContext();
final int userId = ctx.getUserId();
@@ -881,7 +885,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void vmFilesStoredInCeDirWhenCreatedFromCEContext() throws Exception {
final Context ctx = getContext().createCredentialProtectedStorageContext();
final int userId = ctx.getUserId();
@@ -898,7 +902,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void differentManagersForDifferentContexts() throws Exception {
final Context ceCtx = getContext().createCredentialProtectedStorageContext();
final Context deCtx = getContext().createDeviceProtectedStorageContext();
@@ -907,12 +911,7 @@
}
@Test
- @CddTest(
- requirements = {
- "9.17/C-1-1",
- "9.17/C-1-2",
- "9.17/C-1-4",
- })
+ @CddTest
public void createVmWithConfigRequiresPermission() throws Exception {
assumeSupportedDevice();
revokePermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION);
@@ -934,10 +933,7 @@
}
@Test
- @CddTest(
- requirements = {
- "9.17/C-1-1",
- })
+ @CddTest
public void deleteVm() throws Exception {
assumeSupportedDevice();
@@ -961,10 +957,7 @@
}
@Test
- @CddTest(
- requirements = {
- "9.17/C-1-1",
- })
+ @CddTest
public void deleteVmFiles() throws Exception {
assumeSupportedDevice();
@@ -994,10 +987,7 @@
}
@Test
- @CddTest(
- requirements = {
- "9.17/C-1-1",
- })
+ @CddTest
public void validApkPathIsAccepted() throws Exception {
assumeSupportedDevice();
@@ -1022,7 +1012,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void invalidVmNameIsRejected() {
VirtualMachineManager vmm = getVirtualMachineManager();
assertThrows(IllegalArgumentException.class, () -> vmm.get("../foo"));
@@ -1030,7 +1020,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void extraApk() throws Exception {
assumeSupportedDevice();
@@ -1055,7 +1045,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void extraApkInVmConfig() throws Exception {
assumeSupportedDevice();
assumeFeatureEnabled(VirtualMachineManager.FEATURE_MULTI_TENANT);
@@ -1114,7 +1104,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7"})
+ @CddTest
public void changingNonDebuggableVmDebuggableInvalidatesVmIdentity() throws Exception {
// Debuggability changes initrd which is verified by pvmfw.
// Therefore, skip this on non-protected VM.
@@ -1168,7 +1158,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7"})
+ @CddTest
public void changingDebuggableVmNonDebuggableInvalidatesVmIdentity() throws Exception {
// Debuggability changes initrd which is verified by pvmfw.
// Therefore, skip this on non-protected VM.
@@ -1249,7 +1239,8 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7", "9.17/C-3-4"})
+ @CddTest
+ @GmsTest(requirements = {"GMS-3-7.1-011"})
public void instancesOfSameVmHaveDifferentCdis() throws Exception {
assumeSupportedDevice();
// TODO(b/325094712): VMs on CF with same payload have the same secret. This is because
@@ -1276,7 +1267,8 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7", "9.17/C-3-4"})
+ @CddTest
+ @GmsTest(requirements = {"GMS-3-7.1-011"})
public void sameInstanceKeepsSameCdis() throws Exception {
assumeSupportedDevice();
assume().withMessage("Skip on CF. Too Slow. b/257270529").that(isCuttlefish()).isFalse();
@@ -1297,8 +1289,9 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7"})
+ @CddTest
@VsrTest(requirements = {"VSR-7.1-001.005"})
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.004"})
public void bccIsSuperficiallyWellFormed() throws Exception {
assumeSupportedDevice();
@@ -1344,6 +1337,7 @@
@Test
@VsrTest(requirements = {"VSR-7.1-001.005"})
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.004"})
public void protectedVmHasValidDiceChain() throws Exception {
// This test validates two things regarding the pVM DICE chain:
// 1. The DICE chain is well-formed that all the entries conform to the DICE spec.
@@ -1377,7 +1371,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-1-2"})
+ @CddTest
public void accessToCdisIsRestricted() throws Exception {
assumeSupportedDevice();
@@ -1454,7 +1448,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7"})
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenMicrodroidDataIsCompromised() throws Exception {
// If Updatable VM is supported => No instance.img required
assumeNoUpdatableVmSupport();
@@ -1462,7 +1456,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-7"})
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenPvmFwDataIsCompromised() throws Exception {
// If Updatable VM is supported => No instance.img required
assumeNoUpdatableVmSupport();
@@ -1475,6 +1469,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenConfigIsInvalid() throws Exception {
grantPermission(VirtualMachine.USE_CUSTOM_VIRTUAL_MACHINE_PERMISSION);
VirtualMachineConfig config =
@@ -1489,6 +1484,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenBinaryNameIsInvalid() throws Exception {
VirtualMachineConfig config =
newVmConfigBuilderWithPayloadBinary("DoesNotExist.so")
@@ -1502,6 +1498,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenApkPathIsInvalid() {
VirtualMachineConfig config =
newVmConfigBuilderWithPayloadBinary("MicrodroidTestNativeLib.so")
@@ -1515,6 +1512,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenExtraApkPackageIsInvalid() {
VirtualMachineConfig config =
newVmConfigBuilderWithPayloadBinary("MicrodroidTestNativeLib.so")
@@ -1558,6 +1556,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenBinaryIsMissingEntryFunction() throws Exception {
VirtualMachineConfig normalConfig =
newVmConfigBuilderWithPayloadBinary("MicrodroidEmptyNativeLib.so")
@@ -1570,6 +1569,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-006"})
public void bootFailsWhenBinaryTriesToLinkAgainstPrivateLibs() throws Exception {
VirtualMachineConfig normalConfig =
newVmConfigBuilderWithPayloadBinary("MicrodroidPrivateLinkingNativeLib.so")
@@ -1582,6 +1582,7 @@
}
@Test
+ @CddTest
public void sameInstancesShareTheSameVmObject() throws Exception {
VirtualMachineConfig config =
newVmConfigBuilderWithPayloadBinary("MicrodroidTestNativeLib.so").build();
@@ -1598,6 +1599,7 @@
}
@Test
+ @CddTest
public void importedVmAndOriginalVmHaveTheSameCdi() throws Exception {
assumeSupportedDevice();
// Arrange
@@ -1693,7 +1695,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void encryptedStorageAvailable() throws Exception {
assumeSupportedDevice();
@@ -1716,7 +1718,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void encryptedStorageIsInaccessibleToDifferentVm() throws Exception {
assumeSupportedDevice();
// TODO(b/325094712): VMs on CF with same payload have the same secret. This is because
@@ -1781,7 +1783,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void microdroidLauncherHasEmptyCapabilities() throws Exception {
assumeSupportedDevice();
@@ -1805,7 +1807,8 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
+ @GmsTest(requirements = {"GMS-3-7.1-005"})
public void payloadIsNotRoot() throws Exception {
assumeSupportedDevice();
assumeFeatureEnabled(VirtualMachineManager.FEATURE_MULTI_TENANT);
@@ -1828,7 +1831,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1"})
+ @CddTest
public void encryptedStorageIsPersistent() throws Exception {
assumeSupportedDevice();
@@ -1864,7 +1867,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-1", "9.17/C-2-1"})
+ @CddTest
public void canReadFileFromAssets_debugFull() throws Exception {
assumeSupportedDevice();
@@ -1888,6 +1891,7 @@
}
@Test
+ @CddTest
public void outputShouldBeExplicitlyCaptured() throws Exception {
assumeSupportedDevice();
@@ -1910,6 +1914,7 @@
}
@Test
+ @CddTest
public void inputShouldBeExplicitlyAllowed() throws Exception {
assumeSupportedDevice();
@@ -1961,6 +1966,7 @@
}
@Test
+ @CddTest
public void outputIsRedirectedToLogcatIfNotCaptured() throws Exception {
assumeSupportedDevice();
@@ -1981,6 +1987,7 @@
}
@Test
+ @CddTest
public void outputIsNotRedirectedToLogcatIfNotDebuggable() throws Exception {
assumeSupportedDevice();
@@ -1991,6 +1998,7 @@
}
@Test
+ @CddTest
public void testConsoleInputSupported() throws Exception {
assumeSupportedDevice();
assumeFalse("Not supported on GKI kernels", mOs.startsWith("microdroid_gki-"));
@@ -2020,6 +2028,7 @@
}
@Test
+ @CddTest
public void testStartVmWithPayloadOfAnotherApp() throws Exception {
assumeSupportedDevice();
@@ -2049,6 +2058,7 @@
}
@Test
+ @CddTest
public void testVmDescriptorParcelUnparcel_noTrustedStorage() throws Exception {
assumeSupportedDevice();
@@ -2082,6 +2092,7 @@
}
@Test
+ @CddTest
public void testVmDescriptorParcelUnparcel_withTrustedStorage() throws Exception {
assumeSupportedDevice();
@@ -2135,6 +2146,7 @@
}
@Test
+ @CddTest
public void testShareVmWithAnotherApp() throws Exception {
assumeSupportedDevice();
@@ -2180,6 +2192,7 @@
}
@Test
+ @CddTest
public void testShareVmWithAnotherApp_encryptedStorage() throws Exception {
assumeSupportedDevice();
@@ -2249,7 +2262,8 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-5"})
+ @CddTest
+ @GmsTest(requirements = {"GMS-3-7.1-005"})
public void testFileUnderBinHasExecutePermission() throws Exception {
assumeSupportedDevice();
@@ -2292,7 +2306,7 @@
private static final int MS_NOATIME = 1024;
@Test
- @CddTest(requirements = {"9.17/C-1-5"})
+ @GmsTest(requirements = {"GMS-3-7.1-004", "GMS-3-7.1-005"})
public void dataIsMountedWithNoExec() throws Exception {
assumeSupportedDevice();
@@ -2317,7 +2331,7 @@
}
@Test
- @CddTest(requirements = {"9.17/C-1-5"})
+ @GmsTest(requirements = {"GMS-3-7.1-004", "GMS-3-7.1-005"})
public void encryptedStoreIsMountedWithNoExec() throws Exception {
assumeSupportedDevice();
@@ -2343,7 +2357,6 @@
}
@Test
- @VsrTest(requirements = {"VSR-7.1-001.003"})
public void kernelVersionRequirement() throws Exception {
assumeVsrCompliant();
int firstApiLevel = SystemProperties.getInt("ro.product.first_api_level", 0);
@@ -2445,6 +2458,9 @@
}
@Test
+ @CddTest
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.007"})
+ @VsrTest(requirements = {"VSR-7.1-001.008"})
public void configuringVendorDiskImageRequiresCustomPermission() throws Exception {
File vendorDiskImage =
new File("/data/local/tmp/cts/microdroid/test_microdroid_vendor_image.img");
@@ -2462,6 +2478,9 @@
}
@Test
+ @CddTest
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.007"})
+ @VsrTest(requirements = {"VSR-7.1-001.008"})
public void bootsWithVendorPartition() throws Exception {
File vendorDiskImage = new File("/vendor/etc/avf/microdroid/microdroid_vendor.img");
assumeTrue("Microdroid vendor image doesn't exist, skip", vendorDiskImage.exists());
@@ -2481,6 +2500,9 @@
}
@Test
+ @CddTest
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.007"})
+ @VsrTest(requirements = {"VSR-7.1-001.008"})
public void bootsWithCustomVendorPartitionForNonPvm() throws Exception {
assumeNonProtectedVM();
File vendorDiskImage =
@@ -2502,6 +2524,9 @@
}
@Test
+ @CddTest
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.007"})
+ @VsrTest(requirements = {"VSR-7.1-001.008"})
public void bootFailsWithCustomVendorPartitionForPvm() throws Exception {
assumeProtectedVM();
File vendorDiskImage =
@@ -2514,6 +2539,9 @@
}
@Test
+ @CddTest
+ @GmsTest(requirements = {"GMS-VSR-7.1-001.007"})
+ @VsrTest(requirements = {"VSR-7.1-001.008"})
public void creationFailsWithUnsignedVendorPartition() throws Exception {
File vendorDiskImage =
new File(
@@ -2526,6 +2554,7 @@
}
@Test
+ @GmsTest(requirements = {"GMS-3-7.1-004", "GMS-3-7.1-005"})
public void systemPartitionMountFlags() throws Exception {
assumeSupportedDevice();