Skip pKVM boot time benchmark on _pkvm builds

The recently introduced testBootEnableAndDisablePKVM fails on _pkvm
builds because the pkvm_enabler service checks if pKVM is enabled and if
not, sets the corresponding flag in the misc partition and reboots the
device. The test overrides this config in fastboot, resulting in a
bootloop and making lab devices unavailable. Skip the test if it detects
that the flag in misc has been set.

Bug: 236799228
Bug: 244769139
Test: atest AVFHostTestCases on oriole_pkvm-userdebug
Change-Id: I20435fa3619ae428c167de4195ef1acf40261057
This commit is contained in:
David Brazdil 2022-09-02 21:04:53 +01:00
parent 78ce22038d
commit 32721cd357
1 changed files with 5 additions and 0 deletions

View File

@ -195,6 +195,11 @@ public final class AVFHostTestCase extends MicrodroidHostTestCaseBase {
}
assertWithMessage("Failed to set PKVM status. Reason: " + result)
.that(result.toString()).ignoringCase().contains(expectedOutput);
// Skip the test if running on a build with pkvm_enabler. Disabling
// pKVM for such build results in a bootloop.
assertWithMessage("Expected build with PKVM status misc=auto. Reason: " + result)
.that(result.toString()).ignoringCase().contains("misc=auto");
}
private void rebootFromBootloaderAndWaitBootCompleted() throws Exception {