Merge "Fix out-of-memory error." am: f4a9ee68a3 am: 3086bb11c9

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2231087

Change-Id: I82c6d06ba75e6f1e6c68fb0a4f8751c628a68cc6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Chih-hung Hsieh
2022-09-27 08:17:27 +00:00
committed by Automerger Merge Worker

View File

@@ -1129,8 +1129,12 @@ TYPED_TEST(FilterTest, FilterOutNonVendorTags) {
TypeParam emptyTags;
EXPECT_EQ(emptyTags, HidlUtils::filterOutNonVendorTags(emptyTags));
TypeParam allVendorTags = {{"VX_GOOGLE_VR_42", "VX_GOOGLE_1E100"}};
EXPECT_EQ(allVendorTags, HidlUtils::filterOutNonVendorTags(allVendorTags));
// b/248421569, allocate two vendor tags at a time can run out of memory
// TypeParam allVendorTags = {{"VX_GOOGLE_VR_42", "VX_GOOGLE_1E100"}};
TypeParam allVendorTags1 = {{"VX_GOOGLE_VR_42"}};
EXPECT_EQ(allVendorTags1, HidlUtils::filterOutNonVendorTags(allVendorTags1));
TypeParam allVendorTags2 = {{"VX_GOOGLE_1E100"}};
EXPECT_EQ(allVendorTags2, HidlUtils::filterOutNonVendorTags(allVendorTags2));
TypeParam oneVendorTag = {{"", "VX_GOOGLE_VR", "random_string"}};
TypeParam oneVendorTagOnly = HidlUtils::filterOutNonVendorTags(oneVendorTag);