Commit 88d22715 authored by Timothy Loh's avatar Timothy Loh Committed by Commit Bot

Temporarily allow kErrorInvalidDlc in Plugin VM installer

Until the ebuild is actually updated to support DLC, the Plugin VM
installer shouldn't be failing due to DLC errors. This CL partially
reverts the behaviour of crrev.com/c/2001942 so we don't fail.

We can revert this CL once the ebuild is updated.

Bug: b:145814572
Change-Id: I2a9aadef45f5e72d1e7841f0ec3438d4d19f352c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015871Reviewed-by: default avatarJulian Watson <juwa@google.com>
Commit-Queue: Timothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#734350}
parent b38c7573
......@@ -182,16 +182,8 @@ void PluginVmInstaller::OnDlcDownloadCompleted(
}
DCHECK_EQ(state_, State::DOWNLOADING_DLC);
if (err == dlcservice::kErrorInvalidDlc) {
LOG(ERROR) << "PluginVM DLC is not supported, need to enable PluginVM DLC.";
state_ = State::DOWNLOAD_DLC_FAILED;
if (observer_)
observer_->OnDownloadFailed(FailureReason::DLC_DOWNLOAD_FAILED);
RecordPluginVmDlcUseResultHistogram(
PluginVmDlcUseResult::kFallbackToRootFsInvalidDlcError);
return;
}
// TODO(b/145814572): As soon as the DLC support is added to the ebuild, we
// should make dlcservice::kErrorInvalidDlc fail the installation.
if (err != dlcservice::kErrorNone) {
// TODO(b/145814572): Remove this log once PluginVM is converted to DLC and
// invoke |OnDownloadFailed()|. The temporary passthrough is safe as
......
......@@ -666,13 +666,8 @@ TEST_F(PluginVmInstallerDriveTest, InstallingPluginVmDlcWhenUnsupported) {
SetPluginVmImagePref(kDriveUrl, kHash);
fake_dlcservice_client_->SetInstallError(dlcservice::kErrorInvalidDlc);
EXPECT_CALL(*observer_, OnDlcDownloadCompleted()).Times(0);
EXPECT_CALL(*observer_, OnDownloadFailed(_)).Times(1);
EXPECT_CALL(*observer_, OnDlcDownloadCompleted());
StartAndRunToCompletion();
histogram_tester_->ExpectUniqueSample(
kPluginVmDlcUseResultHistogram,
PluginVmDlcUseResult::kFallbackToRootFsInvalidDlcError, 1);
}
} // namespace plugin_vm
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