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

Commit 5d64ddfe authored by Chuwei Xu's avatar Chuwei Xu
Browse files

Fix testVerifyStatsExternalConsistent case

Root cause: For devices mount /data partition without quota option will
get this testcase failure, because
the getExternalSize logic will use Android/obb path
to calculate totalsize.
But the testcase will check the totalsize excluding obb.

Solution: For device mounted userdata without quota option
will remove obbSize from totalSize, to
Make android.appsecurity.cts.StorageHostTest
testcase PASS.

Test:  run cts-on-gsi -m CtsAppSecurityHostTestCases -t
android.appsecurity.cts.StorageHostTest

Bug: 145269983
Change-Id: I8df02d5427d7512046ca3793f03a133a4ad00cbd
parent e377b272
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1996,6 +1996,9 @@ binder::Status InstalldNativeService::getExternalSize(const std::unique_ptr<std:
        auto obbPath = StringPrintf("%s/Android/obb",
                create_data_media_path(uuid_, userId).c_str());
        calculate_tree_size(obbPath, &obbSize);
        if (!(flags & FLAG_USE_QUOTA)) {
            totalSize -= obbSize;
        }
        ATRACE_END();
    }