From e85a6b9616ae24ea2405069ad25a7284b5955632 Mon Sep 17 00:00:00 2001 From: Fred Gylys-Colwell Date: Tue, 8 Nov 2022 20:33:57 -0800 Subject: [PATCH] Allow entitlement and entitled session to be the same For DRM, but not for CAS, we allow the entitlement session and the entitled session to be the same. Bug: 301462149 Change-Id: Ib830484be8437b1c4ce34500ae912e6c119dcfc3 (cherry picked from commit c1ec1c248d3ca1d3bc414c71cc9222c77d56f043) --- libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp index a2c4db74..355d426a 100644 --- a/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp +++ b/libwvdrmengine/oemcrypto/test/oemcrypto_test.cpp @@ -903,7 +903,9 @@ TEST_P(OEMCryptoLicenseTest, EntitledKeySessionMultipleKeySessionsAPI17) { session_.session_id(), &key_session_id_2); // For DRM, but not for CAS, we allow there to be only a single entitled // session. - if (status == OEMCrypto_ERROR_TOO_MANY_SESSIONS) { + if (!global_features.supports_cas && + (key_session_id_2 == key_session_id_1 || + status == OEMCrypto_ERROR_TOO_MANY_SESSIONS)) { GTEST_SKIP() << "Skipping test because multiple entitled sessions not supported."; }