Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4023747 authored by Mark Salyzyn's avatar Mark Salyzyn Committed by android-build-merger
Browse files

Merge "liblp: test: fix liblp.UpdateAnyMetadataSlot" am: 00781649 am: c1c3cf9a

am: 21cf41b6

Change-Id: Ia52cef8db51a214852ef6d1ad52295ee09494cea
parents e05abbf6 21cf41b6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -117,6 +117,9 @@ TEST(liblp, CreateFakeDisk) {
    uint64_t size;
    ASSERT_TRUE(GetDescriptorSize(fd, &size));
    ASSERT_EQ(size, kDiskSize);

    // Verify that we can't read unwritten metadata.
    ASSERT_EQ(ReadMetadata(fd, 1), nullptr);
}

// Flashing metadata should not work if the metadata was created for a larger
@@ -191,9 +194,6 @@ TEST(liblp, UpdateAnyMetadataSlot) {
    ASSERT_EQ(imported->partitions.size(), 1);
    EXPECT_EQ(GetPartitionName(imported->partitions[0]), "system");

    // Verify that we can't read unwritten metadata.
    ASSERT_EQ(ReadMetadata(fd, 1), nullptr);

    // Change the name before writing to the next slot.
    strncpy(imported->partitions[0].name, "vendor", sizeof(imported->partitions[0].name));
    ASSERT_TRUE(UpdatePartitionTable(fd, *imported.get(), 1));