From 4cbe215e34678970403da6c11320222304a2aebb Mon Sep 17 00:00:00 2001 From: David Drysdale Date: Tue, 7 Mar 2023 14:44:38 +0000 Subject: [PATCH] Allow for 32-bit VTS builds In 32-bit builds a `long` may be 32 bits, but the `long` values on an AIDL interface are 64 bits. Therefore need to use `int64_t` for the corresponding C++ type, not `long`. Bug: 271056044 Test: VtsAidlKeyMintTargetTest --gtest_filter="*AuthTest*" (32-b) Change-Id: I19f5a1d825dfcc45087534bbd4239a13cdfec3f7 --- security/keymint/aidl/vts/functional/AuthTest.cpp | 2 +- security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/security/keymint/aidl/vts/functional/AuthTest.cpp b/security/keymint/aidl/vts/functional/AuthTest.cpp index a31ac01174..78c88f4896 100644 --- a/security/keymint/aidl/vts/functional/AuthTest.cpp +++ b/security/keymint/aidl/vts/functional/AuthTest.cpp @@ -274,7 +274,7 @@ class AuthTest : public KeyMintAidlTestBase { std::shared_ptr clock_; string password_; uint32_t uid_; - long sid_; + int64_t sid_; std::vector handle_; }; diff --git a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h index a6a9df60f8..3c753d1942 100644 --- a/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h +++ b/security/keymint/aidl/vts/functional/KeyMintAidlTestBase.h @@ -356,7 +356,7 @@ class KeyMintAidlTestBase : public ::testing::TestWithParam { SecurityLevel securityLevel_; string name_; string author_; - long challenge_; + int64_t challenge_; private: void CheckEncryptOneByteAtATime(BlockMode block_mode, const int block_size,