Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2c19ddc authored by Yinchu Chen's avatar Yinchu Chen Committed by David Drysdale
Browse files

Skipping test on GSI + first_api_level < U

The test is marked as assumption failed for Key attestation fails on the
combination of the build with the vendor froze on the Android T base
build and Android U/V GSI build because the attestation properties
ro.product.*_for_attestation have to be present in vendor properties
files.

Bug: 396582186
Test:
VtsAidlKeyMintTargetTest.PerInstance/NewKeyGenerationTest

Change-Id: I661fb0041b6e8918a32f6ee72024ebad119260d0
Merged-In: I661fb0041b6e8918a32f6ee72024ebad119260d0
parent c9e5b146
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -249,7 +249,14 @@ uint32_t KeyMintAidlTestBase::boot_patch_level() {
 * which is mandatory for KeyMint version 2 and first_api_level 33 or greater.
 */
bool KeyMintAidlTestBase::isDeviceIdAttestationRequired() {
    return AidlVersion() >= 2 && property_get_int32("ro.vendor.api_level", 0) >= __ANDROID_API_T__;
    if (!is_gsi_image()) {
        return AidlVersion() >= 2 && get_vsr_api_level() >= __ANDROID_API_T__;
    } else {
        // The device ID properties may not be set properly when testing earlier implementations
        // under GSI, e.g. `ro.product.<id>` is overridden by the GSI image, but the
        // `ro.product.vendor.<id>` value (which does survive GSI installation) was not set.
        return AidlVersion() >= 2 && get_vsr_api_level() >= __ANDROID_API_U__;
    }
}

/**