gralloc4-vts: return after GTEST_SUCCEED
GTEST_SUCCEED() does not cause a GTEST to return. Insert a
return after every GTEST_SUCCEED().
Test: VtsHalGraphicsMapperV4_0
Bug: 149008032
Change-Id: I65637e7a0ac9a9ac8d69c9d8ccbb427543d82428
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index 726df93..58b7ed3 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -97,6 +97,7 @@
Error err = mGralloc->set(bufferHandle, metadataType, metadata);
if (err == Error::UNSUPPORTED) {
GTEST_SUCCEED() << "setting this metadata is unsupported";
+ return;
}
ASSERT_EQ(err, Error::NONE);
@@ -920,6 +921,7 @@
bufferHandle = mGralloc->allocate(info, true, true);
if (bufferHandle) {
GTEST_SUCCEED() << "unable to allocate protected content";
+ return;
}
hidl_vec<uint8_t> vec;
@@ -1237,6 +1239,7 @@
bufferHandle = mGralloc->allocate(info, true, true);
if (bufferHandle) {
GTEST_SUCCEED() << "unable to allocate protected content";
+ return;
}
uint64_t usage = static_cast<uint64_t>(BufferUsage::COMPOSER_OVERLAY);
@@ -1280,6 +1283,7 @@
bufferHandle = mGralloc->allocate(info, true, true);
if (bufferHandle) {
GTEST_SUCCEED() << "unable to allocate protected content";
+ return;
}
uint64_t protectedContent = 0;
@@ -1407,6 +1411,7 @@
Error err = mGralloc->set(bufferHandle, gralloc4::MetadataType_PlaneLayouts, vec);
if (err == Error::UNSUPPORTED) {
GTEST_SUCCEED() << "setting this metadata is unsupported";
+ return;
}
ASSERT_EQ(err, Error::NONE);
@@ -1779,6 +1784,7 @@
mDummyDescriptorInfo, gralloc4::MetadataType_PixelFormatFourCC, &vec);
if (err == Error::UNSUPPORTED) {
GTEST_SUCCEED() << "setting this metadata is unsupported";
+ return;
}
ASSERT_EQ(err, Error::NONE);
@@ -1795,6 +1801,7 @@
mDummyDescriptorInfo, gralloc4::MetadataType_PixelFormatModifier, &vec);
if (err == Error::UNSUPPORTED) {
GTEST_SUCCEED() << "setting this metadata is unsupported";
+ return;
}
ASSERT_EQ(err, Error::NONE);
@@ -1824,6 +1831,7 @@
gralloc4::MetadataType_AllocationSize, &vec);
if (err == Error::UNSUPPORTED) {
GTEST_SUCCEED() << "setting this metadata is unsupported";
+ return;
}
ASSERT_EQ(err, Error::NONE);