summaryrefslogtreecommitdiff
path: root/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp')
-rw-r--r--graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index 8f440e4d1e..2aac337ca7 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -2212,6 +2212,11 @@ TEST_P(GraphicsMapperHidlTest, SetBadMetadata) {
mGralloc->set(bufferHandle, gralloc4::MetadataType_Dataspace, vec));
ASSERT_EQ(Error::UNSUPPORTED,
mGralloc->set(bufferHandle, gralloc4::MetadataType_BlendMode, vec));
+
+ // Keep optional metadata types below and populate the encoded metadata vec
+ // with some arbitrary different metadata because the common gralloc4::decode*()
+ // functions do not distinguish between an empty vec and bad value.
+ ASSERT_EQ(NO_ERROR, gralloc4::encodeDataspace(Dataspace::SRGB_LINEAR, &vec));
ASSERT_EQ(Error::UNSUPPORTED,
mGralloc->set(bufferHandle, gralloc4::MetadataType_Smpte2086, vec));
ASSERT_EQ(Error::UNSUPPORTED,