From 299717115eb2bce20c5b74346903ed39eaaef675 Mon Sep 17 00:00:00 2001 From: Akilesh Kailash Date: Tue, 12 Jul 2022 05:23:48 +0000 Subject: [PATCH 1/5] libsnapshot: Fix vts_libsnapshot_test.SnapshotUpdateTest#FullUpdateFlow Check if compression feature is enabled. Bug: 238143011 Test: OTA Signed-off-by: Akilesh Kailash Change-Id: I77663799a5371f1de8b4e29d7c777a24249d1b7b Ignore-AOSP-First: already present in aosp/master --- fs_mgr/libsnapshot/snapshot_test.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs_mgr/libsnapshot/snapshot_test.cpp b/fs_mgr/libsnapshot/snapshot_test.cpp index 6a348b4e5..c145da718 100644 --- a/fs_mgr/libsnapshot/snapshot_test.cpp +++ b/fs_mgr/libsnapshot/snapshot_test.cpp @@ -2755,6 +2755,10 @@ bool IsDaemonRequired() { return false; } + if (!IsCompressionEnabled()) { + return false; + } + const std::string UNKNOWN = "unknown"; const std::string vendor_release = android::base::GetProperty("ro.vendor.build.version.release_or_codename", UNKNOWN); From 9591090a17148d01a803072e2a93bd994d797cae Mon Sep 17 00:00:00 2001 From: Benergy Meenan Ravuri Date: Tue, 5 Jul 2022 15:50:08 +0530 Subject: [PATCH 2/5] Check userspace snapshots only for API level >= T Skip checking for userspace snapshots enabled property for API level < T as this feature is not applicable for GRF targets. Bug: 236450435 Test: vts_ota_config_test Change-Id: Ib5083f6237cdf4962aae06f166811d67cf6c385e Ignore-AOSP-First: already present in aosp/master --- fs_mgr/libsnapshot/vts_ota_config_test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs_mgr/libsnapshot/vts_ota_config_test.cpp b/fs_mgr/libsnapshot/vts_ota_config_test.cpp index afc2d81a4..02bcc3438 100644 --- a/fs_mgr/libsnapshot/vts_ota_config_test.cpp +++ b/fs_mgr/libsnapshot/vts_ota_config_test.cpp @@ -17,7 +17,14 @@ #include #include +static int GetVsrLevel() { + return android::base::GetIntProperty("ro.vendor.api_level", -1); +} + TEST(VAB, Enabled) { ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.enabled", false)); + if (GetVsrLevel() < __ANDROID_API_T__) { + GTEST_SKIP(); + } ASSERT_TRUE(android::base::GetBoolProperty("ro.virtual_ab.userspace.snapshots.enabled", false)); } From b2182ee8e08ff88dd528e2a48c459bbd8b157c48 Mon Sep 17 00:00:00 2001 From: "P.Adarsh Reddy" Date: Fri, 8 Jul 2022 12:52:27 +0530 Subject: [PATCH 3/5] Do not enforce EROFS for android-T and below. EROFS is not mandatory for android T and below, so skip the test for those. Bug: 237765186 Test: vts_fs_test fs#ErofsSupported Change-Id: Iceea46f8f2d443636de504962b718a2461605591 Ignore-AOSP-First: already present in aosp/master --- fs_mgr/tests/vts_fs_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_mgr/tests/vts_fs_test.cpp b/fs_mgr/tests/vts_fs_test.cpp index aac2cfd9b..3f1210396 100644 --- a/fs_mgr/tests/vts_fs_test.cpp +++ b/fs_mgr/tests/vts_fs_test.cpp @@ -28,8 +28,8 @@ static int GetVsrLevel() { } TEST(fs, ErofsSupported) { - // S and higher for this test. - if (GetVsrLevel() < __ANDROID_API_S__) { + // U and higher for this test. + if (GetVsrLevel() <= __ANDROID_API_T__) { GTEST_SKIP(); } From 3282850933b8bc6a630bdb432bbfe3dd5b5e3ee3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 13 Jul 2022 20:51:43 +0000 Subject: [PATCH 4/5] Revert "Do not enforce EROFS for android-T and below." This reverts commit a571d4a9bcb96d0a797bd3c99008a40c413503d4. Reason for revert: Incorrect fix Bug: 237765186 Ignore-AOSP-First: cherry-pick Change-Id: I6586c8e53cc89418d1802807a1a2e108f7e825d3 Merged-In: I6586c8e53cc89418d1802807a1a2e108f7e825d3 --- fs_mgr/tests/vts_fs_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_mgr/tests/vts_fs_test.cpp b/fs_mgr/tests/vts_fs_test.cpp index 3f1210396..aac2cfd9b 100644 --- a/fs_mgr/tests/vts_fs_test.cpp +++ b/fs_mgr/tests/vts_fs_test.cpp @@ -28,8 +28,8 @@ static int GetVsrLevel() { } TEST(fs, ErofsSupported) { - // U and higher for this test. - if (GetVsrLevel() <= __ANDROID_API_T__) { + // S and higher for this test. + if (GetVsrLevel() < __ANDROID_API_S__) { GTEST_SKIP(); } From aee8ddbc46b8933e187b1991c4bf36926c01adb7 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 13 Jul 2022 16:45:11 -0700 Subject: [PATCH 5/5] vts_fs_test: Only require EROFS in T+ kernels. Bug: 237765186 Test: vts_fs_test Ignore-AOSP-First: cherry-pick Change-Id: I294535953bfbe0f246347487b746d3adf2fca1aa Merged-In: I294535953bfbe0f246347487b746d3adf2fca1aa --- fs_mgr/tests/vts_fs_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs_mgr/tests/vts_fs_test.cpp b/fs_mgr/tests/vts_fs_test.cpp index aac2cfd9b..ae8e45992 100644 --- a/fs_mgr/tests/vts_fs_test.cpp +++ b/fs_mgr/tests/vts_fs_test.cpp @@ -28,8 +28,8 @@ static int GetVsrLevel() { } TEST(fs, ErofsSupported) { - // S and higher for this test. - if (GetVsrLevel() < __ANDROID_API_S__) { + // T-launch GKI kernels and higher must support EROFS. + if (GetVsrLevel() < __ANDROID_API_T__) { GTEST_SKIP(); }