diff options
Diffstat (limited to 'payload_consumer/filesystem_verifier_action_unittest.cc')
-rw-r--r-- | payload_consumer/filesystem_verifier_action_unittest.cc | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/payload_consumer/filesystem_verifier_action_unittest.cc b/payload_consumer/filesystem_verifier_action_unittest.cc index 1b5d32a6..fdc94d9d 100644 --- a/payload_consumer/filesystem_verifier_action_unittest.cc +++ b/payload_consumer/filesystem_verifier_action_unittest.cc @@ -327,54 +327,4 @@ TEST_F(FilesystemVerifierActionTest, RunAsRootTerminateEarlyTest) { while (loop_.RunOnce(false)) {} } -// Disabled as we switched to minor version 3, so this test is obsolete, will be -// deleted when we delete the corresponding code in PerformAction(). -// Test that the rootfs and kernel size used for hashing in delta payloads for -// major version 1 is properly read. -TEST_F(FilesystemVerifierActionTest, - DISABLED_RunAsRootDetermineLegacySizeTest) { - string img; - EXPECT_TRUE(utils::MakeTempFile("img.XXXXXX", &img, nullptr)); - ScopedPathUnlinker img_unlinker(img); - test_utils::CreateExtImageAtPath(img, nullptr); - // Extend the "partition" holding the file system from 10MiB to 20MiB. - EXPECT_EQ(0, truncate(img.c_str(), 20 * 1024 * 1024)); - - InstallPlan install_plan; - install_plan.source_slot = 1; - - fake_boot_control_.SetPartitionDevice( - kLegacyPartitionNameRoot, install_plan.source_slot, img); - fake_boot_control_.SetPartitionDevice( - kLegacyPartitionNameKernel, install_plan.source_slot, img); - FilesystemVerifierAction action(&fake_boot_control_, - VerifierMode::kComputeSourceHash); - - ObjectFeederAction<InstallPlan> feeder_action; - feeder_action.set_obj(install_plan); - - ObjectCollectorAction<InstallPlan> collector_action; - - BondActions(&feeder_action, &action); - BondActions(&action, &collector_action); - ActionProcessor processor; - processor.EnqueueAction(&feeder_action); - processor.EnqueueAction(&action); - processor.EnqueueAction(&collector_action); - - loop_.PostTask(FROM_HERE, - base::Bind([&processor]{ processor.StartProcessing(); })); - loop_.Run(); - install_plan = collector_action.object(); - - ASSERT_EQ(2U, install_plan.partitions.size()); - // When computing the size of the rootfs on legacy delta updates we use the - // size of the filesystem, but when updating the kernel we use the whole - // partition. - EXPECT_EQ(10U << 20, install_plan.partitions[0].source_size); - EXPECT_EQ(kLegacyPartitionNameRoot, install_plan.partitions[0].name); - EXPECT_EQ(20U << 20, install_plan.partitions[1].source_size); - EXPECT_EQ(kLegacyPartitionNameKernel, install_plan.partitions[1].name); -} - } // namespace chromeos_update_engine |