summaryrefslogtreecommitdiffstats
path: root/fs_mgr/liblp/io_test.cpp
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2018-10-23 14:43:10 -0700
committerDavid Anderson <dvander@google.com>2018-10-24 19:08:37 -0700
commitef9740c67a7e373ea9bc8b2ba6481b67ae96a0cc (patch)
treee9f57180ed80be8d7f9fd6253b43b15482407630 /fs_mgr/liblp/io_test.cpp
parent7a6c511a6d109f2b32329c17217dc4e099d9cfb0 (diff)
downloadsystem_core-ef9740c67a7e373ea9bc8b2ba6481b67ae96a0cc.tar.gz
system_core-ef9740c67a7e373ea9bc8b2ba6481b67ae96a0cc.tar.bz2
system_core-ef9740c67a7e373ea9bc8b2ba6481b67ae96a0cc.zip
liblp: Allow the super partition to span multiple block devices.
This patch allows the block device table in LpMetadataHeader to contain additional partitions. MetadataBuilder can now resize partitions such that are allocated across block devices as needed, however, it attempts to minimize this by grouping free regions by device. Bug: 116802789 Test: liblp_test gtests device with super partition flashes and boots Change-Id: I9cf74c8925faf154703eeba2a26546a152efcaa2
Diffstat (limited to 'fs_mgr/liblp/io_test.cpp')
-rw-r--r--fs_mgr/liblp/io_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs_mgr/liblp/io_test.cpp b/fs_mgr/liblp/io_test.cpp
index 9c675feba..603e5c046 100644
--- a/fs_mgr/liblp/io_test.cpp
+++ b/fs_mgr/liblp/io_test.cpp
@@ -128,7 +128,7 @@ TEST(liblp, CreateFakeDisk) {
// Flashing metadata should not work if the metadata was created for a larger
// disk than the destination disk.
TEST(liblp, ExportDiskTooSmall) {
- unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(kDiskSize + 1024, 512, 2);
+ unique_ptr<MetadataBuilder> builder = MetadataBuilder::New(kDiskSize + 4096, 512, 2);
ASSERT_NE(builder, nullptr);
unique_ptr<LpMetadata> exported = builder->Export();
ASSERT_NE(exported, nullptr);
@@ -581,7 +581,7 @@ TEST(liblp, FlashSparseImage) {
unique_fd fd = CreateFakeDisk();
ASSERT_GE(fd, 0);
- BlockDeviceInfo device_info(kDiskSize, 0, 0, 512);
+ BlockDeviceInfo device_info("super", kDiskSize, 0, 0, 512);
unique_ptr<MetadataBuilder> builder =
MetadataBuilder::New(device_info, kMetadataSize, kMetadataSlots);
ASSERT_NE(builder, nullptr);