[test] Update test to reflect failure to verify payload in pVM
Bug: 256148034
Test: atest MicrodroidHostTests
Change-Id: I1332e66de309458c2b0dbcf9612a33ba8baf053a
diff --git a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
index a54a22a..1fa0976 100644
--- a/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
+++ b/tests/hostside/java/com/android/microdroid/test/MicrodroidHostTests.java
@@ -435,7 +435,7 @@
@Test
@CddTest(requirements = {"9.17/C-2-1", "9.17/C-2-2", "9.17/C-2-6"})
- public void protectedVmWithImageSignedWithDifferentKeyRunsPvmfw() throws Exception {
+ public void protectedVmWithImageSignedWithDifferentKeyFailsToVerifyPayload() throws Exception {
// Arrange
assumeProtectedVm();
File key = findTestFile("test.com.android.virt.pem");
@@ -452,8 +452,9 @@
vmInfo.mProcess.waitFor(5L, TimeUnit.SECONDS);
String consoleLog = getDevice().pullFileContents(CONSOLE_PATH);
assertWithMessage("pvmfw should start").that(consoleLog).contains("pVM firmware");
- // TODO(b/256148034): Asserts that pvmfw run fails when this verification is implemented.
- // Also rename the test.
+ assertWithMessage("pvmfw should fail to verify the payload")
+ .that(consoleLog)
+ .contains("Failed to verify the payload");
vmInfo.mProcess.destroy();
}