Loading current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,7 @@ dc7e6d4f537b9943e27edc4f86c5a03bb643b18f18f866f8c3c71c0ac4ea8cbc android.hardwar 78589343d8ee2e1b155acad3fbdc7fcbb6af94491aee968b2383c21627264f8b android.hardware.radio@1.0::IRadioResponse # Available in Android O, b/68061860 e822cb7f4a1bdd45689c5e92ccd19a2201c20b771bd4b2ec1ae627e324591f9d android.hardware.radio@1.0::IRadioResponse 6e69adb24d7c0b0ca3a54a38c49a5625b161b3f5d5f7d6fda0befdbbfc8e9e06 android.hardware.radio@1.0::IRadioResponse c2c50ec74c87a583c683b4493f8f9f2e454a8d41c57af5b3eb88823a999f0ea4 android.hardware.radio@1.0::IRadioResponse # Added for b/65230472 for Android O 28e929b453df3d9f5060af2764e6cdb123ddb893e3e86923c877f6ff7e5f02c9 android.hardware.wifi@1.0::types bfd81bcafa3c97519cd56ad29e9fa48e23d1d323b89dbcc85899282a8c628194 android.hardware.automotive.vehicle@2.0::types df1d7b27e644bfed0a4f606a8c44d35d45cafce82c7c648494c8a25c7cd4a949 android.hardware.wifi@1.0::types Loading drm/1.0/vts/functional/drm_hal_clearkey_test.cpp +29 −35 Original line number Diff line number Diff line Loading @@ -89,10 +89,6 @@ static const uint8_t kInvalidUUID[16] = { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80}; static const uint32_t k256SubSampleByteCount = 256; static const uint32_t k512SubSampleClearBytes = 512; static const uint32_t k512SubSampleEncryptedBytes = 512; class DrmHalClearkeyFactoryTest : public ::testing::VtsHalHidlTargetTestBase { public: virtual void SetUp() override { Loading Loading @@ -349,8 +345,7 @@ SessionId DrmHalClearkeyPluginTest::openSession() { * Helper method to close a session */ void DrmHalClearkeyPluginTest::closeSession(const SessionId& sessionId) { auto result = drmPlugin->closeSession(sessionId); EXPECT_EQ(Status::OK, result); EXPECT_TRUE(drmPlugin->closeSession(sessionId).isOk()); } /** Loading Loading @@ -793,7 +788,7 @@ TEST_F(DrmHalClearkeyPluginTest, SetMacAlgorithmNoSession) { */ TEST_F(DrmHalClearkeyPluginTest, GenericEncryptNotSupported) { SessionId session = openSession(); ; hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; hidl_vec<uint8_t> input = {1, 2, 3, 4, 5}; hidl_vec<uint8_t> iv = std::vector<uint8_t>(AES_BLOCK_SIZE, 0); Loading Loading @@ -822,7 +817,7 @@ TEST_F(DrmHalClearkeyPluginTest, GenericDecryptNotSupported) { TEST_F(DrmHalClearkeyPluginTest, GenericSignNotSupported) { SessionId session = openSession(); ; hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; hidl_vec<uint8_t> message = {1, 2, 3, 4, 5}; auto res = drmPlugin->sign(session, keyId, message, Loading @@ -836,7 +831,7 @@ TEST_F(DrmHalClearkeyPluginTest, GenericSignNotSupported) { TEST_F(DrmHalClearkeyPluginTest, GenericVerifyNotSupported) { SessionId session = openSession(); ; hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; hidl_vec<uint8_t> message = {1, 2, 3, 4, 5}; hidl_vec<uint8_t> signature = {0, 0, 0, 0, 0, 0, 0, 0, Loading Loading @@ -926,8 +921,7 @@ sp<IMemory> DrmHalClearkeyPluginTest::getDecryptMemory(size_t size, */ TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSession) { auto sessionId = openSession(); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); closeSession(sessionId); } Loading @@ -948,8 +942,7 @@ TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSessionClosedSession) { */ TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSessionEmptySession) { SessionId sessionId; Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); } /** Loading Loading @@ -1131,18 +1124,17 @@ TEST_F(DrmHalClearkeyDecryptTest, TestQueryKeyStatus) { TEST_F(DrmHalClearkeyDecryptTest, ClearSegmentTest) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kByteCount = 256; const vector<SubSample> subSamples = { {.numBytesOfClearData = k256SubSampleByteCount, {.numBytesOfClearData = kByteCount, .numBytesOfEncryptedData = 0}}; auto sessionId = openSession(); loadKeys(sessionId); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::UNENCRYPTED, &iv[0], subSamples, noPattern, Status::OK); EXPECT_EQ(k256SubSampleByteCount, byteCount); EXPECT_EQ(kByteCount, byteCount); closeSession(sessionId); } Loading @@ -1154,18 +1146,18 @@ TEST_F(DrmHalClearkeyDecryptTest, ClearSegmentTest) { TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTest) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kClearBytes = 512; const uint32_t kEncryptedBytes = 512; const vector<SubSample> subSamples = { {.numBytesOfClearData = k512SubSampleClearBytes, .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}}; {.numBytesOfClearData = kClearBytes, .numBytesOfEncryptedData = kEncryptedBytes}}; auto sessionId = openSession(); loadKeys(sessionId); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples, noPattern, Status::OK); EXPECT_EQ(k512SubSampleClearBytes + k512SubSampleEncryptedBytes, byteCount); EXPECT_EQ(kClearBytes + kEncryptedBytes, byteCount); closeSession(sessionId); } Loading @@ -1177,12 +1169,10 @@ TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTestNoKeys) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const vector<SubSample> subSamples = { {.numBytesOfClearData = k256SubSampleByteCount, .numBytesOfEncryptedData = k256SubSampleByteCount}}; {.numBytesOfClearData = 256, .numBytesOfEncryptedData = 256}}; auto sessionId = openSession(); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples, noPattern, Status::ERROR_DRM_NO_LICENSE); Loading @@ -1207,9 +1197,9 @@ void DrmHalClearkeyDecryptTest::decryptWithInvalidKeys( EXPECT_EQ(Status::OK, status); EXPECT_EQ(0u, myKeySetId.size()); }); ASSERT_OK(res); EXPECT_OK(res); ASSERT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples, noPattern, Status::ERROR_DRM_NO_LICENSE); Loading @@ -1224,9 +1214,11 @@ void DrmHalClearkeyDecryptTest::decryptWithInvalidKeys( TEST_F(DrmHalClearkeyDecryptTest, DecryptWithEmptyKey) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kClearBytes = 512; const uint32_t kEncryptedBytes = 512; const vector<SubSample> subSamples = { {.numBytesOfClearData = k512SubSampleClearBytes, .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}}; {.numBytesOfClearData = kClearBytes, .numBytesOfEncryptedData = kEncryptedBytes}}; // base 64 encoded JSON response string, must not contain padding character '=' const hidl_string emptyKeyResponse = Loading Loading @@ -1259,9 +1251,11 @@ TEST_F(DrmHalClearkeyDecryptTest, DecryptWithEmptyKey) { TEST_F(DrmHalClearkeyDecryptTest, DecryptWithKeyTooLong) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kClearBytes = 512; const uint32_t kEncryptedBytes = 512; const vector<SubSample> subSamples = { {.numBytesOfClearData = k512SubSampleClearBytes, .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}}; {.numBytesOfClearData = kClearBytes, .numBytesOfEncryptedData = kEncryptedBytes}}; // base 64 encoded JSON response string, must not contain padding character '=' const hidl_string keyTooLongResponse = Loading graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -30,10 +30,12 @@ Gralloc::Gralloc() { } void Gralloc::init() { mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>(); mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>( GraphicsMapperHidlEnvironment::Instance()->getServiceName<IAllocator>()); ASSERT_NE(nullptr, mAllocator.get()) << "failed to get allocator service"; mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>(); mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>( GraphicsMapperHidlEnvironment::Instance()->getServiceName<IMapper>()); ASSERT_NE(nullptr, mMapper.get()) << "failed to get mapper service"; ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode"; } Loading graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h +16 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <unordered_set> #include <VtsHalHidlTargetTestEnvBase.h> #include <android/hardware/graphics/allocator/2.0/IAllocator.h> #include <android/hardware/graphics/mapper/2.0/IMapper.h> #include <utils/StrongPointer.h> Loading Loading @@ -88,6 +89,21 @@ class Gralloc { std::unordered_set<const native_handle_t*> mImportedBuffers; }; // Test environment for graphics.mapper. class GraphicsMapperHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase { public: // get the test environment singleton static GraphicsMapperHidlEnvironment* Instance() { static GraphicsMapperHidlEnvironment* instance = new GraphicsMapperHidlEnvironment; return instance; } virtual void registerTestServices() override { registerTestService<IAllocator>(); registerTestService<IMapper>(); } }; } // namespace tests } // namespace V2_0 } // namespace mapper Loading graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp +7 −6 Original line number Diff line number Diff line Loading @@ -403,10 +403,11 @@ TEST_F(GraphicsMapperHidlTest, UnlockNegative) { } // namespace android int main(int argc, char** argv) { using android::hardware::graphics::mapper::V2_0::tests::GraphicsMapperHidlEnvironment; ::testing::AddGlobalTestEnvironment(GraphicsMapperHidlEnvironment::Instance()); ::testing::InitGoogleTest(&argc, argv); GraphicsMapperHidlEnvironment::Instance()->init(&argc, argv); int status = RUN_ALL_TESTS(); LOG(INFO) << "Test result = " << status; return status; } Loading
current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,7 @@ dc7e6d4f537b9943e27edc4f86c5a03bb643b18f18f866f8c3c71c0ac4ea8cbc android.hardwar 78589343d8ee2e1b155acad3fbdc7fcbb6af94491aee968b2383c21627264f8b android.hardware.radio@1.0::IRadioResponse # Available in Android O, b/68061860 e822cb7f4a1bdd45689c5e92ccd19a2201c20b771bd4b2ec1ae627e324591f9d android.hardware.radio@1.0::IRadioResponse 6e69adb24d7c0b0ca3a54a38c49a5625b161b3f5d5f7d6fda0befdbbfc8e9e06 android.hardware.radio@1.0::IRadioResponse c2c50ec74c87a583c683b4493f8f9f2e454a8d41c57af5b3eb88823a999f0ea4 android.hardware.radio@1.0::IRadioResponse # Added for b/65230472 for Android O 28e929b453df3d9f5060af2764e6cdb123ddb893e3e86923c877f6ff7e5f02c9 android.hardware.wifi@1.0::types bfd81bcafa3c97519cd56ad29e9fa48e23d1d323b89dbcc85899282a8c628194 android.hardware.automotive.vehicle@2.0::types df1d7b27e644bfed0a4f606a8c44d35d45cafce82c7c648494c8a25c7cd4a949 android.hardware.wifi@1.0::types Loading
drm/1.0/vts/functional/drm_hal_clearkey_test.cpp +29 −35 Original line number Diff line number Diff line Loading @@ -89,10 +89,6 @@ static const uint8_t kInvalidUUID[16] = { 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80}; static const uint32_t k256SubSampleByteCount = 256; static const uint32_t k512SubSampleClearBytes = 512; static const uint32_t k512SubSampleEncryptedBytes = 512; class DrmHalClearkeyFactoryTest : public ::testing::VtsHalHidlTargetTestBase { public: virtual void SetUp() override { Loading Loading @@ -349,8 +345,7 @@ SessionId DrmHalClearkeyPluginTest::openSession() { * Helper method to close a session */ void DrmHalClearkeyPluginTest::closeSession(const SessionId& sessionId) { auto result = drmPlugin->closeSession(sessionId); EXPECT_EQ(Status::OK, result); EXPECT_TRUE(drmPlugin->closeSession(sessionId).isOk()); } /** Loading Loading @@ -793,7 +788,7 @@ TEST_F(DrmHalClearkeyPluginTest, SetMacAlgorithmNoSession) { */ TEST_F(DrmHalClearkeyPluginTest, GenericEncryptNotSupported) { SessionId session = openSession(); ; hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; hidl_vec<uint8_t> input = {1, 2, 3, 4, 5}; hidl_vec<uint8_t> iv = std::vector<uint8_t>(AES_BLOCK_SIZE, 0); Loading Loading @@ -822,7 +817,7 @@ TEST_F(DrmHalClearkeyPluginTest, GenericDecryptNotSupported) { TEST_F(DrmHalClearkeyPluginTest, GenericSignNotSupported) { SessionId session = openSession(); ; hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; hidl_vec<uint8_t> message = {1, 2, 3, 4, 5}; auto res = drmPlugin->sign(session, keyId, message, Loading @@ -836,7 +831,7 @@ TEST_F(DrmHalClearkeyPluginTest, GenericSignNotSupported) { TEST_F(DrmHalClearkeyPluginTest, GenericVerifyNotSupported) { SessionId session = openSession(); ; hidl_vec<uint8_t> keyId = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}; hidl_vec<uint8_t> message = {1, 2, 3, 4, 5}; hidl_vec<uint8_t> signature = {0, 0, 0, 0, 0, 0, 0, 0, Loading Loading @@ -926,8 +921,7 @@ sp<IMemory> DrmHalClearkeyPluginTest::getDecryptMemory(size_t size, */ TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSession) { auto sessionId = openSession(); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); closeSession(sessionId); } Loading @@ -948,8 +942,7 @@ TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSessionClosedSession) { */ TEST_F(DrmHalClearkeyPluginTest, SetMediaDrmSessionEmptySession) { SessionId sessionId; Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); } /** Loading Loading @@ -1131,18 +1124,17 @@ TEST_F(DrmHalClearkeyDecryptTest, TestQueryKeyStatus) { TEST_F(DrmHalClearkeyDecryptTest, ClearSegmentTest) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kByteCount = 256; const vector<SubSample> subSamples = { {.numBytesOfClearData = k256SubSampleByteCount, {.numBytesOfClearData = kByteCount, .numBytesOfEncryptedData = 0}}; auto sessionId = openSession(); loadKeys(sessionId); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::UNENCRYPTED, &iv[0], subSamples, noPattern, Status::OK); EXPECT_EQ(k256SubSampleByteCount, byteCount); EXPECT_EQ(kByteCount, byteCount); closeSession(sessionId); } Loading @@ -1154,18 +1146,18 @@ TEST_F(DrmHalClearkeyDecryptTest, ClearSegmentTest) { TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTest) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kClearBytes = 512; const uint32_t kEncryptedBytes = 512; const vector<SubSample> subSamples = { {.numBytesOfClearData = k512SubSampleClearBytes, .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}}; {.numBytesOfClearData = kClearBytes, .numBytesOfEncryptedData = kEncryptedBytes}}; auto sessionId = openSession(); loadKeys(sessionId); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples, noPattern, Status::OK); EXPECT_EQ(k512SubSampleClearBytes + k512SubSampleEncryptedBytes, byteCount); EXPECT_EQ(kClearBytes + kEncryptedBytes, byteCount); closeSession(sessionId); } Loading @@ -1177,12 +1169,10 @@ TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTestNoKeys) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const vector<SubSample> subSamples = { {.numBytesOfClearData = k256SubSampleByteCount, .numBytesOfEncryptedData = k256SubSampleByteCount}}; {.numBytesOfClearData = 256, .numBytesOfEncryptedData = 256}}; auto sessionId = openSession(); Status status = cryptoPlugin->setMediaDrmSession(sessionId); EXPECT_EQ(Status::OK, status); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples, noPattern, Status::ERROR_DRM_NO_LICENSE); Loading @@ -1207,9 +1197,9 @@ void DrmHalClearkeyDecryptTest::decryptWithInvalidKeys( EXPECT_EQ(Status::OK, status); EXPECT_EQ(0u, myKeySetId.size()); }); ASSERT_OK(res); EXPECT_OK(res); ASSERT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk()); uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples, noPattern, Status::ERROR_DRM_NO_LICENSE); Loading @@ -1224,9 +1214,11 @@ void DrmHalClearkeyDecryptTest::decryptWithInvalidKeys( TEST_F(DrmHalClearkeyDecryptTest, DecryptWithEmptyKey) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kClearBytes = 512; const uint32_t kEncryptedBytes = 512; const vector<SubSample> subSamples = { {.numBytesOfClearData = k512SubSampleClearBytes, .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}}; {.numBytesOfClearData = kClearBytes, .numBytesOfEncryptedData = kEncryptedBytes}}; // base 64 encoded JSON response string, must not contain padding character '=' const hidl_string emptyKeyResponse = Loading Loading @@ -1259,9 +1251,11 @@ TEST_F(DrmHalClearkeyDecryptTest, DecryptWithEmptyKey) { TEST_F(DrmHalClearkeyDecryptTest, DecryptWithKeyTooLong) { vector<uint8_t> iv(AES_BLOCK_SIZE, 0); const Pattern noPattern = {0, 0}; const uint32_t kClearBytes = 512; const uint32_t kEncryptedBytes = 512; const vector<SubSample> subSamples = { {.numBytesOfClearData = k512SubSampleClearBytes, .numBytesOfEncryptedData = k512SubSampleEncryptedBytes}}; {.numBytesOfClearData = kClearBytes, .numBytesOfEncryptedData = kEncryptedBytes}}; // base 64 encoded JSON response string, must not contain padding character '=' const hidl_string keyTooLongResponse = Loading
graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -30,10 +30,12 @@ Gralloc::Gralloc() { } void Gralloc::init() { mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>(); mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>( GraphicsMapperHidlEnvironment::Instance()->getServiceName<IAllocator>()); ASSERT_NE(nullptr, mAllocator.get()) << "failed to get allocator service"; mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>(); mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>( GraphicsMapperHidlEnvironment::Instance()->getServiceName<IMapper>()); ASSERT_NE(nullptr, mMapper.get()) << "failed to get mapper service"; ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode"; } Loading
graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.h +16 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ #include <unordered_set> #include <VtsHalHidlTargetTestEnvBase.h> #include <android/hardware/graphics/allocator/2.0/IAllocator.h> #include <android/hardware/graphics/mapper/2.0/IMapper.h> #include <utils/StrongPointer.h> Loading Loading @@ -88,6 +89,21 @@ class Gralloc { std::unordered_set<const native_handle_t*> mImportedBuffers; }; // Test environment for graphics.mapper. class GraphicsMapperHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase { public: // get the test environment singleton static GraphicsMapperHidlEnvironment* Instance() { static GraphicsMapperHidlEnvironment* instance = new GraphicsMapperHidlEnvironment; return instance; } virtual void registerTestServices() override { registerTestService<IAllocator>(); registerTestService<IMapper>(); } }; } // namespace tests } // namespace V2_0 } // namespace mapper Loading
graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp +7 −6 Original line number Diff line number Diff line Loading @@ -403,10 +403,11 @@ TEST_F(GraphicsMapperHidlTest, UnlockNegative) { } // namespace android int main(int argc, char** argv) { using android::hardware::graphics::mapper::V2_0::tests::GraphicsMapperHidlEnvironment; ::testing::AddGlobalTestEnvironment(GraphicsMapperHidlEnvironment::Instance()); ::testing::InitGoogleTest(&argc, argv); GraphicsMapperHidlEnvironment::Instance()->init(&argc, argv); int status = RUN_ALL_TESTS(); LOG(INFO) << "Test result = " << status; return status; }