From a33256b811e29cd8887c00b671cee1ef5f6de8f8 Mon Sep 17 00:00:00 2001 From: Jeff Tinker Date: Mon, 24 Apr 2017 16:29:01 -0700 Subject: [PATCH] Fix VtsHalDrmV1_0Target test failure DrmHalVendorFactoryTest.EmptyPluginUUIDNotSupported was failing on 64 bit builds. The test was using an uninitialized hidl_array as the empty UUID which was incorrect. This change initializes the array contents to null values. Test: drm hal tests pass bug: 37172151 Change-Id: I0acb86921f0daceba30fa7879980ce819db64a74 --- drm/1.0/vts/functional/drm_hal_clearkey_test.cpp | 1 + drm/1.0/vts/functional/drm_hal_vendor_test.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp index 71b893a813..04f265866c 100644 --- a/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp +++ b/drm/1.0/vts/functional/drm_hal_clearkey_test.cpp @@ -129,6 +129,7 @@ TEST_F(DrmHalClearkeyFactoryTest, InvalidPluginNotSupported) { */ TEST_F(DrmHalClearkeyFactoryTest, EmptyPluginUUIDNotSupported) { hidl_array emptyUUID; + memset(emptyUUID.data(), 0, 16); EXPECT_FALSE(drmFactory->isCryptoSchemeSupported(emptyUUID)); EXPECT_FALSE(cryptoFactory->isCryptoSchemeSupported(emptyUUID)); } diff --git a/drm/1.0/vts/functional/drm_hal_vendor_test.cpp b/drm/1.0/vts/functional/drm_hal_vendor_test.cpp index ec73a7d022..33fb6fbac3 100644 --- a/drm/1.0/vts/functional/drm_hal_vendor_test.cpp +++ b/drm/1.0/vts/functional/drm_hal_vendor_test.cpp @@ -190,6 +190,7 @@ TEST_P(DrmHalVendorFactoryTest, InvalidPluginNotSupported) { */ TEST_P(DrmHalVendorFactoryTest, EmptyPluginUUIDNotSupported) { hidl_array emptyUUID; + memset(emptyUUID.data(), 0, 16); EXPECT_FALSE(drmFactory->isCryptoSchemeSupported(emptyUUID)); EXPECT_FALSE(cryptoFactory->isCryptoSchemeSupported(emptyUUID)); }