From 2f45350921bf90b38f4c4ac876fb1d8d4b4fdf4c Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Mon, 27 Mar 2023 19:41:50 -0700 Subject: [PATCH] Update oemcrypto unit tests version number Merge from Widevine repo of http://go/wvgerrit/169074 And update a few scripts that check for version number. Merged from https://widevine-internal-review.googlesource.com/167657 Bug: 275264353 Test: luci tests Change-Id: Ic3c16323e993075c9bfe206fc73bf82c0e67f65b --- libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h | 2 +- .../oemcrypto/test/oemcrypto_basic_test.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h b/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h index c0e72abd..87eb1f60 100644 --- a/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h +++ b/libwvdrmengine/oemcrypto/include/OEMCryptoCENC.h @@ -3,7 +3,7 @@ // License Agreement. /** - * @mainpage OEMCrypto API v18 + * @mainpage OEMCrypto API v18.1 * * OEMCrypto is the low level library implemented by the OEM to provide key and * content protection, usually in a separate secure memory or process space. The diff --git a/libwvdrmengine/oemcrypto/test/oemcrypto_basic_test.cpp b/libwvdrmengine/oemcrypto/test/oemcrypto_basic_test.cpp index f9cf44a4..719af194 100644 --- a/libwvdrmengine/oemcrypto/test/oemcrypto_basic_test.cpp +++ b/libwvdrmengine/oemcrypto/test/oemcrypto_basic_test.cpp @@ -147,20 +147,26 @@ TEST_F(OEMCryptoClientTest, FreeUnallocatedSecureBufferNoFailure) { * Verifies initialization and logs version information. * This test is first, because it might give an idea why other * tests are failing when the device has the wrong keybox installed. + * + * The log message should be updated by Widevine with every release so that it + * is easier to verify which version of the tests a partner is running. Widevine + * should change the API version number when the API changes, but the unit tests + * might be updated more frequently, and are only tracked by the date of the + * last change. */ TEST_F(OEMCryptoClientTest, VersionNumber) { const std::string log_message = - "OEMCrypto unit tests for API 18.0. Tests last updated 2022-08-08"; + "OEMCrypto unit tests for API 18.1. Tests last updated 2023-03-08"; cout << " " << log_message << "\n"; cout << " " - << "These tests are part of Android T." + << "These tests are part of Android U." << "\n"; LOGI("%s", log_message.c_str()); // If any of the following fail, then it is time to update the log message // above. EXPECT_EQ(ODK_MAJOR_VERSION, 18); EXPECT_EQ(ODK_MINOR_VERSION, 1); - EXPECT_EQ(kCurrentAPI, 18u); + EXPECT_EQ(kCurrentAPI, static_cast(ODK_MAJOR_VERSION)); OEMCrypto_Security_Level level = OEMCrypto_SecurityLevel(); EXPECT_GT(level, OEMCrypto_Level_Unknown); EXPECT_LE(level, OEMCrypto_Level3);