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

Commit fa57cfe2 authored by David Anderson's avatar David Anderson Committed by Automerger Merge Worker
Browse files

Merge "fs_mgr: Don't allow dt fstabs in new devices." am: 460886c1 am: 21f1ae2f am: 04beaa3a

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1989241

Change-Id: I461c5d7211246ebed4f0d9edaa1be8704c6caad2
parents b580ba81 04beaa3a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ cc_test {
        "device-tests",
    ],
    test_options: {
        min_shipping_api_level: 33,
        min_shipping_api_level: 31,
    },
    require_root: true,
    auto_gen_config: true,
+12 −3
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ static int GetVsrLevel() {

TEST(fs, ErofsSupported) {
    // S and higher for this test.
    if (GetVsrLevel() < 31) {
    if (GetVsrLevel() < __ANDROID_API_S__) {
        GTEST_SKIP();
    }

@@ -85,10 +85,10 @@ TEST(fs, PartitionTypes) {
            continue;
        }

        if (vsr_level <= 32) {
        if (vsr_level < __ANDROID_API_T__) {
            continue;
        }
        if (vsr_level == 33 && parent_bdev != super_bdev) {
        if (vsr_level == __ANDROID_API_T__ && parent_bdev != super_bdev) {
            // Only check for dynamic partitions at this VSR level.
            continue;
        }
@@ -100,3 +100,12 @@ TEST(fs, PartitionTypes) {
        }
    }
}

TEST(fs, NoDtFstab) {
    if (GetVsrLevel() <= __ANDROID_API_S__) {
        GTEST_SKIP();
    }

    android::fs_mgr::Fstab fstab;
    EXPECT_FALSE(android::fs_mgr::ReadFstabFromDt(&fstab, false));
}