update_engine: Add fds for the source partitions.
Add new fds for the source partition, one for the rootfs and another for
the kernel. These are opened if we have a delta update with minor
version 2.
This change also adds support for changing the minor versions in tests.
There is a new private member, supported_minor_version_, which defaults
to kSupportedMinorPayloadVersion. It is set in the unit tests with calls
to SetSupportedVersion.
BUG=chromium:463573
TEST=`FEATURES=test emerge-link update_engine`
Change-Id: Ib988c91eb450b2499c615ae65b271691dfd9c651
Reviewed-on: https://chromium-review.googlesource.com/260950
Trybot-Ready: Allie Wood <alliewood@chromium.org>
Tested-by: Allie Wood <alliewood@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Commit-Queue: Allie Wood <alliewood@chromium.org>
diff --git a/download_action_unittest.cc b/download_action_unittest.cc
index 4ecf377..1dc1beb 100644
--- a/download_action_unittest.cc
+++ b/download_action_unittest.cc
@@ -149,6 +149,8 @@
"",
output_temp_file.GetPath(),
"",
+ "",
+ "",
"");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);
@@ -266,7 +268,7 @@
// takes ownership of passed in HttpFetcher
ObjectFeederAction<InstallPlan> feeder_action;
InstallPlan install_plan(false, false, "", 0, "", 0, "",
- temp_file.GetPath(), "", "");
+ temp_file.GetPath(), "", "", "", "");
feeder_action.set_obj(install_plan);
MockPrefs prefs;
DownloadAction download_action(&prefs, nullptr,
@@ -376,6 +378,8 @@
"",
"/dev/null",
"/dev/null",
+ "/dev/null",
+ "/dev/null",
"");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);
@@ -411,7 +415,8 @@
DirectFileWriter writer;
// takes ownership of passed in HttpFetcher
- InstallPlan install_plan(false, false, "", 0, "", 0, "", path, "", "");
+ InstallPlan install_plan(
+ false, false, "", 0, "", 0, "", path, "", "", "", "");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);
MockPrefs prefs;
@@ -493,6 +498,8 @@
"",
output_temp_file.GetPath(),
"",
+ "",
+ "",
"");
ObjectFeederAction<InstallPlan> feeder_action;
feeder_action.set_obj(install_plan);