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

Commit 3f334dca authored by Nikita Ioffe's avatar Nikita Ioffe
Browse files

Add a test asserting that default fstab has /data entry

When aosp/1149619 is merged, userspace reboot will start to depend on
the fact that default fstab has an entry for /data, hence this test
to make sure that this is the case.

Bug: 135984674
Test: atest CtsFsMgrTestCases
Change-Id: I7a3c181a6b27a7b4dfc344ff04be712f3fe3376e
parent 607cbbf1
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1081,3 +1081,10 @@ source none5 swap defaults zram_backing_dev_path=/dev/path2
    EXPECT_EQ("none5", entry->mount_point);
    EXPECT_EQ("/dev/path2", entry->zram_backing_dev_path);
}

TEST(fs_mgr, DefaultFstabContainsUserdata) {
    Fstab fstab;
    ASSERT_TRUE(ReadDefaultFstab(&fstab)) << "Failed to read default fstab";
    ASSERT_NE(nullptr, GetEntryForMountPoint(&fstab, "/data"))
            << "Default fstab doesn't contain /data entry";
}