Snap for 7398294 from 20833734e1 to sc-release

Change-Id: I139792d552e6879234561e72fc854be761a9bd06
This commit is contained in:
android-build-team Robot
2021-05-26 01:19:18 +00:00
3 changed files with 11 additions and 6 deletions

View File

@@ -358,8 +358,10 @@ class CdmDurationTest : public WvCdmTestBaseWithEngine,
// this tests a cyan bar with a black X. This assumes that |cutoff| is before
// |stop|. Both |start| and |cutoff| are system times.
void TerminatePlayback(uint64_t start, uint64_t cutoff) {
ASSERT_LT(start, cutoff);
AllowPlayback(start, cutoff);
// We subtract some fudge from the cutoff to account for possible round off
// error when computing the playback window.
ASSERT_LT(start, cutoff - kFudge);
AllowPlayback(start, cutoff - kFudge);
SleepUntil(cutoff + kFudge);
FailDecrypt();
}

View File

@@ -4,13 +4,16 @@ set -ex
export CXX=clang++
export CC=clang
export GYP_DEFINES="$GYP_DEFINES clang=1"
export PATH_TO_CDM_DIR=.
gyp --format=ninja --depth=$(pwd) oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp
export PYTHONPATH="$PYTHONPATH:$PATH_TO_CDM_DIR/third_party"
python3 $PATH_TO_CDM_DIR/third_party/gyp/__init__.py --format=ninja \
--depth=$(pwd) oemcrypto/test/fuzz_tests/oemcrypto_fuzztests.gyp
ninja -C out/Default
# oemcrypto_odkitee_fuzztests.gypi has flags to instrument all the gyp targets
# with fuzzer flags.
gyp --format=ninja --depth=$(pwd) \
python3 $PATH_TO_CDM_DIR/third_party/gyp/__init__.py --format=ninja \
--depth=$(pwd) \
--include=oemcrypto/test/fuzz_tests/oemcrypto_odkitee_fuzztests.gypi \
oemcrypto/test/fuzz_tests/oemcrypto_odkitee_fuzztests.gyp
ninja -C out/Default

View File

@@ -20,7 +20,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
// Convert OEMCrypto_LicenseType in core_response to a valid enum value.
ConvertDataToValidEnum(
OEMCrypto_LicenstType_MaxValue,
OEMCrypto_LicenseType_MaxValue,
&license_api_fuzz.license_messages().core_response().license_type);
license_api_fuzz.license_messages().EncryptAndSignResponse();