cdm_engine_fuzzer: Bug Fix
Resolved timeout issue in cdm_engine_fuzzer.cpp exec/s: 20 Test: ./cdm_engine_fuzzer Bug: 304414453 Change-Id: I1ada7775ba423bb6941bec846d108ee8c76e2c04
This commit is contained in:
@@ -44,6 +44,7 @@ const std::string kUsageFilePrefixL1 = "/data/vendor/mediadrm/IDM0/L1/";
|
||||
const std::string kUsageFilePrefixL3 = "/data/vendor/mediadrm/IDM0/L3/";
|
||||
const std::string kCertFile = kUsageFilePrefixL3 + "cert.bin";
|
||||
const std::string kCertFile1 = kUsageFilePrefixL3 + "cert1.bin";
|
||||
static constexpr int32_t kMaxRuns = 500;
|
||||
|
||||
using namespace wvutil;
|
||||
using namespace wvcdm::metrics;
|
||||
@@ -225,7 +226,11 @@ void CdmEngineFuzzer::process() {
|
||||
|
||||
CdmEngineFuzzer::init(cdmEngine);
|
||||
|
||||
while (mFdp.remaining_bytes()) {
|
||||
int32_t runs = kMaxRuns;
|
||||
/* Limited the while loop to prevent a timeout caused by the
|
||||
/* CryptoSession constructor, which took time to initialize
|
||||
/* OEMCrypto in each iteration.*/
|
||||
while (mFdp.remaining_bytes() > 0 && --runs) {
|
||||
auto invokeCdmEngineAPI = mFdp.PickValueInArray<
|
||||
const std::function<void()>>({
|
||||
[&]() { cdmEngine->OnTimerEvent(); },
|
||||
|
||||
Reference in New Issue
Block a user