OSDN Git Service

Fix VtsHalDrmV1_0Target test failure
authorJeff Tinker <jtinker@google.com>
Mon, 24 Apr 2017 23:29:01 +0000 (16:29 -0700)
committerJeff Tinker <jtinker@google.com>
Tue, 25 Apr 2017 00:02:17 +0000 (17:02 -0700)
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
drm/1.0/vts/functional/drm_hal_vendor_test.cpp

index 71b893a..04f2658 100644 (file)
@@ -129,6 +129,7 @@ TEST_F(DrmHalClearkeyFactoryTest, InvalidPluginNotSupported) {
  */
 TEST_F(DrmHalClearkeyFactoryTest, EmptyPluginUUIDNotSupported) {
     hidl_array<uint8_t, 16> emptyUUID;
+    memset(emptyUUID.data(), 0, 16);
     EXPECT_FALSE(drmFactory->isCryptoSchemeSupported(emptyUUID));
     EXPECT_FALSE(cryptoFactory->isCryptoSchemeSupported(emptyUUID));
 }
index ec73a7d..33fb6fb 100644 (file)
@@ -190,6 +190,7 @@ TEST_P(DrmHalVendorFactoryTest, InvalidPluginNotSupported) {
  */
 TEST_P(DrmHalVendorFactoryTest, EmptyPluginUUIDNotSupported) {
     hidl_array<uint8_t, 16> emptyUUID;
+    memset(emptyUUID.data(), 0, 16);
     EXPECT_FALSE(drmFactory->isCryptoSchemeSupported(emptyUUID));
     EXPECT_FALSE(cryptoFactory->isCryptoSchemeSupported(emptyUUID));
 }