Add detail about L3 initialization

Bug: b/70299597
Merge of http://go/wvgerrit/67304
Test: Android, CE CDM, and Linux tests

There's a few different things that can go wrong in the L3
initialization, with seeding and device key failures among others. They
should be recorded in metrics to track. Along the same lines, since
multiple errors can happen in conjunction, metrics needs to change to
add more fields for errors. This CL also adds the
hidl_metrics_adapter_unittest to the Android test scripts.

Change-Id: Ie5bcf81bbe294a1136c58410f90087a13b3d911d
This commit is contained in:
Srujan Gaddam
2018-12-13 10:23:31 -08:00
parent 25d29fd22b
commit 4c5c4caf66
16 changed files with 477068 additions and 474408 deletions

View File

@@ -398,7 +398,11 @@ TEST(HidlMetricsAdapterTest, EngineAndSessionAllMetrics) {
drm_metrics::WvCdmMetrics::EngineMetrics engine_metrics;
*(engine_metrics.mutable_crypto_metrics()) = crypto_metrics;
// OEMCrypto Initialize Metrics.
engine_metrics.mutable_level3_oemcrypto_initialization_error()
->set_int_value(1);
engine_metrics.mutable_oemcrypto_initialization_mode()->set_int_value(1);
engine_metrics.mutable_previous_oemcrypto_initialization_failure()
->set_int_value(1);
engine_metrics.mutable_oemcrypto_l1_api_version()->set_int_value(1);
engine_metrics.mutable_oemcrypto_l1_min_api_version()->set_int_value(1);
// CdmEngine Metrics.
@@ -435,7 +439,7 @@ TEST(HidlMetricsAdapterTest, EngineAndSessionAllMetrics) {
hidl_vec<DrmMetricGroup> hidl_metrics;
HidlMetricsAdapter::ToHidlMetrics(metrics_proto, &hidl_metrics);
ASSERT_EQ(2U, hidl_metrics.size());
EXPECT_EQ(83U, hidl_metrics[0].metrics.size());
EXPECT_EQ(85U, hidl_metrics[0].metrics.size());
EXPECT_EQ(63U, hidl_metrics[1].metrics.size());
}