diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2021-03-12 14:28:33 -0500 |
---|---|---|
committer | Kelvin Zhang <zhangkelvin@google.com> | 2021-03-24 10:08:49 -0400 |
commit | 21a4991833d778725eef1fdbf7866c3aa0f1dbad (patch) | |
tree | 5093e3a4c420ff1e81aebd58bc5ee5ebf036b847 /payload_consumer/filesystem_verifier_action_unittest.cc | |
parent | 569c97eebd46b7c7a7740dea837f2e86475c02c2 (diff) |
Make dynamic partition control android return a writable fd
We can return a FileDescriptor object, which encapsulates logic needed
to write to a COW. This way, filesystem verfication action can use the
turend value directly for computing verity and hash the partition.
Test: th
Change-Id: Iafe9699ef0cc15961641fc94f8ad2820230a56e1
Diffstat (limited to 'payload_consumer/filesystem_verifier_action_unittest.cc')
-rw-r--r-- | payload_consumer/filesystem_verifier_action_unittest.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/payload_consumer/filesystem_verifier_action_unittest.cc b/payload_consumer/filesystem_verifier_action_unittest.cc index 7d3ee9e1..60e36cc2 100644 --- a/payload_consumer/filesystem_verifier_action_unittest.cc +++ b/payload_consumer/filesystem_verifier_action_unittest.cc @@ -423,14 +423,13 @@ TEST_F(FilesystemVerifierActionTest, RunWithVABCNoVerity) { .WillByDefault(Return(FeatureFlag(FeatureFlag::Value::LAUNCH))); ON_CALL(dynamic_control, UpdateUsesSnapshotCompression()) .WillByDefault(Return(true)); - ON_CALL(dynamic_control, OpenCowReader(_, _, _)) - .WillByDefault(Return(fake_fd)); + ON_CALL(dynamic_control, OpenCowFd(_, _, _)).WillByDefault(Return(fake_fd)); ON_CALL(dynamic_control, IsDynamicPartition(part.name, _)) .WillByDefault(Return(true)); EXPECT_CALL(dynamic_control, UpdateUsesSnapshotCompression()) .Times(AtLeast(1)); - EXPECT_CALL(dynamic_control, OpenCowReader(part.name, {part.source_path}, _)) + EXPECT_CALL(dynamic_control, OpenCowFd(part.name, {part.source_path}, _)) .Times(1); EXPECT_CALL(dynamic_control, ListDynamicPartitionsForSlot(_, _, _)) .WillRepeatedly( |