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
This commit is contained in:
Nikita Ioffe 2019-10-25 21:00:45 +01:00
parent 607cbbf1e8
commit 3f334dcaa4
1 changed files with 7 additions and 0 deletions

View File

@ -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";
}