From 13cddcb2984dc2d03f4e59f84e55e8836f8045a9 Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Wed, 14 Jul 2021 16:50:14 +0100 Subject: [PATCH] KeyMaster 4.0 VTS: fix GSI detection Commit f18a8328a1ed ("keymaster: Relax testing under GSI") disabled some tag checks for devices running with GSI, but detected GSI by looking for an absence of the ro.boot.vbmeta.device_state property. This property is currently present on GSI, so instead detect GSI using the existing is_gsi() helper, which checks ro.product.system.name against "mainline". Bug: 192513934 Test: atest VtsHalKeymasterV4_0TargetTest:PerInstance/AttestationTest Merged-In: If3c7d84a9e091b9b0842e4d8919453600bc239ea Change-Id: If3c7d84a9e091b9b0842e4d8919453600bc239ea --- keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp index 01c502c586..476eed8b19 100644 --- a/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp +++ b/keymaster/4.0/vts/functional/keymaster_hidl_hal_test.cpp @@ -438,7 +438,7 @@ bool verify_attestation_record(const string& challenge, const string& app_id, // TODO(b/136282179): When running under VTS-on-GSI the TEE-backed // keymaster implementation will report YYYYMM dates instead of YYYYMMDD // for the BOOT_PATCH_LEVEL. - if (avb_verification_enabled()) { + if (!is_gsi()) { for (int i = 0; i < att_hw_enforced.size(); i++) { if (att_hw_enforced[i].tag == TAG_BOOT_PATCHLEVEL || att_hw_enforced[i].tag == TAG_VENDOR_PATCHLEVEL) {