Commit 6f0405bb authored by John Rummell's avatar John Rummell Committed by Commit Bot

Log warnings when EME FileIO test about to fail

In order to help determine why this test occasionally fails, log
warnings when the test is calling OnTestComplete(false) with the reason
why the test has failed.

Bug: 999421
Test: Logs show up when test modified to fail (as locally is passes)
Change-Id: Ie1395e5ffef724f367a727cfbe841226d8e2c076
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1785739Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Commit-Queue: John Rummell <jrummell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693798}
parent 15425dee
......@@ -596,7 +596,7 @@ void FileIOTest::RunNextStep() {
case ACTION_CREATE:
file_io = create_file_io_cb_.Run(this);
if (!file_io) {
FILE_IO_DVLOG(3) << "Cannot create FileIO object.";
LOG(WARNING) << test_name_ << " cannot create FileIO object.";
OnTestComplete(false);
return;
}
......@@ -627,6 +627,16 @@ void FileIOTest::RunNextStep() {
void FileIOTest::OnResult(const TestStep& result) {
DCHECK(IsResult(result));
if (!CheckResult(result)) {
LOG(WARNING) << test_name_ << " got unexpected result. type=" << result.type
<< ", status=" << (uint32_t)result.status
<< ", data_size=" << result.data_size;
for (const auto& step : test_steps_) {
if (IsResult(step)) {
LOG(WARNING) << test_name_ << " expected type=" << step.type
<< ", status=" << (uint32_t)step.status
<< ", data_size=" << step.data_size;
}
}
OnTestComplete(false);
return;
}
......@@ -660,7 +670,7 @@ void FileIOTest::OnTestComplete(bool success) {
file_io_stack_.pop();
}
FILE_IO_DVLOG(3) << test_name_ << (success ? " PASSED" : " FAILED");
DLOG_IF(WARNING, !success) << test_name_ << " FAILED";
LOG_IF(WARNING, !success) << test_name_ << " FAILED";
std::move(completion_cb_).Run(success);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment