rollbackProtectedDataOfPayload: Assume UpdatableVM
The implementation of the API is only supported when Updatable VMs are
supported. Whilst the latter is mandatory, this tests need not ensure
the Support (there are other XTS for that).
Test: N/A
Bug: 389462869
Change-Id: I53eab6fc6e2dd1629a1698b31698c2a4cf3cde08
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 8502ec3..a2b4747 100644
--- a/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
+++ b/tests/testapk/src/java/com/android/microdroid/test/MicrodroidTests.java
@@ -1874,22 +1874,13 @@
return false;
}
- private void ensureUpdatableVmSupported() throws Exception {
- if (getVendorApiLevel() >= 202504 && deviceCapableOfProtectedVm()) {
- assertTrue(
- "Missing Updatable VM support, have you declared Secretkeeper interface?",
- isUpdatableVmSupported());
- } else {
- assumeTrue("Device does not support Updatable VM", isUpdatableVmSupported());
- }
- }
-
@Test
public void rollbackProtectedDataOfPayload() throws Exception {
assumeSupportedDevice();
// Rollback protected data is only possible if Updatable VMs is supported -
// which implies Secretkeeper support.
- ensureUpdatableVmSupported();
+ assumeTrue("Missing Updatable VM support", isUpdatableVmSupported());
+
byte[] value1 = new byte[32];
Arrays.fill(value1, (byte) 0xcc);
byte[] value2 = new byte[32];