Loading fs_mgr/TEST_MAPPING +3 −0 Original line number Original line Diff line number Diff line Loading @@ -11,6 +11,9 @@ }, }, { { "name": "fiemap_writer_test" "name": "fiemap_writer_test" }, { "name": "vts_libsnapshot_test_presubmit" } } ] ] } } fs_mgr/libsnapshot/Android.bp +24 −5 Original line number Original line Diff line number Diff line Loading @@ -160,8 +160,8 @@ cc_library_static { ], ], } } cc_test { cc_defaults { name: "libsnapshot_test", name: "libsnapshot_test_defaults", defaults: ["libsnapshot_defaults"], defaults: ["libsnapshot_defaults"], srcs: [ srcs: [ "partition_cow_creator_test.cpp", "partition_cow_creator_test.cpp", Loading @@ -173,10 +173,7 @@ cc_test { "android.hardware.boot@1.1", "android.hardware.boot@1.1", "libbinder", "libbinder", "libcrypto", "libcrypto", "libfs_mgr", "libgsi", "libhidlbase", "libhidlbase", "liblp", "libprotobuf-cpp-lite", "libprotobuf-cpp-lite", "libsparse", "libsparse", "libutils", "libutils", Loading @@ -186,16 +183,38 @@ cc_test { "libutilscallstack", "libutilscallstack", ], ], static_libs: [ static_libs: [ "libfs_mgr", "libgsi", "libgmock", "libgmock", "liblp", "libsnapshot", "libsnapshot", "libsnapshot_test_helpers", "libsnapshot_test_helpers", ], ], header_libs: [ header_libs: [ "libstorage_literals_headers", "libstorage_literals_headers", ], ], test_suites: [ "vts-core", "device-tests" ], test_min_api_level: 29, auto_gen_config: true, require_root: true, require_root: true, } } cc_test { name: "vts_libsnapshot_test", defaults: ["libsnapshot_test_defaults"], } cc_test { name: "vts_libsnapshot_test_presubmit", defaults: ["libsnapshot_test_defaults"], cppflags: [ "-DSKIP_TEST_IN_PRESUBMIT", ], } cc_binary { cc_binary { name: "snapshotctl", name: "snapshotctl", srcs: [ srcs: [ Loading fs_mgr/libsnapshot/snapshot_test.cpp +22 −0 Original line number Original line Diff line number Diff line Loading @@ -506,6 +506,9 @@ TEST_F(SnapshotTest, Merge) { } } TEST_F(SnapshotTest, FirstStageMountAndMerge) { TEST_F(SnapshotTest, FirstStageMountAndMerge) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif ASSERT_TRUE(AcquireLock()); ASSERT_TRUE(AcquireLock()); static const uint64_t kDeviceSize = 1024 * 1024; static const uint64_t kDeviceSize = 1024 * 1024; Loading Loading @@ -562,6 +565,9 @@ TEST_F(SnapshotTest, FlashSuperDuringUpdate) { } } TEST_F(SnapshotTest, FlashSuperDuringMerge) { TEST_F(SnapshotTest, FlashSuperDuringMerge) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif ASSERT_TRUE(AcquireLock()); ASSERT_TRUE(AcquireLock()); static const uint64_t kDeviceSize = 1024 * 1024; static const uint64_t kDeviceSize = 1024 * 1024; Loading Loading @@ -973,6 +979,9 @@ class SnapshotUpdateTest : public SnapshotTest { // Also test UnmapUpdateSnapshot unmaps everything. // Also test UnmapUpdateSnapshot unmaps everything. // Also test first stage mount and merge after this. // Also test first stage mount and merge after this. TEST_F(SnapshotUpdateTest, FullUpdateFlow) { TEST_F(SnapshotUpdateTest, FullUpdateFlow) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif // OTA client blindly unmaps all partitions that are possibly mapped. // OTA client blindly unmaps all partitions that are possibly mapped. for (const auto& name : {"sys_b", "vnd_b", "prd_b"}) { for (const auto& name : {"sys_b", "vnd_b", "prd_b"}) { ASSERT_TRUE(sm->UnmapUpdateSnapshot(name)); ASSERT_TRUE(sm->UnmapUpdateSnapshot(name)); Loading Loading @@ -1120,6 +1129,9 @@ TEST_F(SnapshotUpdateTest, SnapshotStatusFileWithoutCow) { // Test that the old partitions are not modified. // Test that the old partitions are not modified. TEST_F(SnapshotUpdateTest, TestRollback) { TEST_F(SnapshotUpdateTest, TestRollback) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif // Execute the update. // Execute the update. ASSERT_TRUE(sm->BeginUpdate()); ASSERT_TRUE(sm->BeginUpdate()); ASSERT_TRUE(sm->UnmapUpdateSnapshot("sys_b")); ASSERT_TRUE(sm->UnmapUpdateSnapshot("sys_b")); Loading Loading @@ -1297,6 +1309,9 @@ TEST_F(SnapshotUpdateTest, RetrofitAfterRegularAb) { } } TEST_F(SnapshotUpdateTest, MergeCannotRemoveCow) { TEST_F(SnapshotUpdateTest, MergeCannotRemoveCow) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif // Make source partitions as big as possible to force COW image to be created. // Make source partitions as big as possible to force COW image to be created. SetSize(sys_, 5_MiB); SetSize(sys_, 5_MiB); SetSize(vnd_, 5_MiB); SetSize(vnd_, 5_MiB); Loading Loading @@ -1571,6 +1586,9 @@ TEST_F(SnapshotUpdateTest, Overflow) { } } TEST_F(SnapshotUpdateTest, WaitForMerge) { TEST_F(SnapshotUpdateTest, WaitForMerge) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif AddOperationForPartitions(); AddOperationForPartitions(); // Execute the update. // Execute the update. Loading Loading @@ -1790,6 +1808,10 @@ std::vector<uint64_t> ImageManagerTestParams() { std::vector<uint64_t> ret; std::vector<uint64_t> ret; for (uint64_t size = 1_MiB; size <= 512_MiB; size *= 2) { for (uint64_t size = 1_MiB; size <= 512_MiB; size *= 2) { ret.push_back(size); ret.push_back(size); #ifdef SKIP_TEST_IN_PRESUBMIT // BUG(148889015); break; #endif } } return ret; return ret; } } Loading Loading
fs_mgr/TEST_MAPPING +3 −0 Original line number Original line Diff line number Diff line Loading @@ -11,6 +11,9 @@ }, }, { { "name": "fiemap_writer_test" "name": "fiemap_writer_test" }, { "name": "vts_libsnapshot_test_presubmit" } } ] ] } }
fs_mgr/libsnapshot/Android.bp +24 −5 Original line number Original line Diff line number Diff line Loading @@ -160,8 +160,8 @@ cc_library_static { ], ], } } cc_test { cc_defaults { name: "libsnapshot_test", name: "libsnapshot_test_defaults", defaults: ["libsnapshot_defaults"], defaults: ["libsnapshot_defaults"], srcs: [ srcs: [ "partition_cow_creator_test.cpp", "partition_cow_creator_test.cpp", Loading @@ -173,10 +173,7 @@ cc_test { "android.hardware.boot@1.1", "android.hardware.boot@1.1", "libbinder", "libbinder", "libcrypto", "libcrypto", "libfs_mgr", "libgsi", "libhidlbase", "libhidlbase", "liblp", "libprotobuf-cpp-lite", "libprotobuf-cpp-lite", "libsparse", "libsparse", "libutils", "libutils", Loading @@ -186,16 +183,38 @@ cc_test { "libutilscallstack", "libutilscallstack", ], ], static_libs: [ static_libs: [ "libfs_mgr", "libgsi", "libgmock", "libgmock", "liblp", "libsnapshot", "libsnapshot", "libsnapshot_test_helpers", "libsnapshot_test_helpers", ], ], header_libs: [ header_libs: [ "libstorage_literals_headers", "libstorage_literals_headers", ], ], test_suites: [ "vts-core", "device-tests" ], test_min_api_level: 29, auto_gen_config: true, require_root: true, require_root: true, } } cc_test { name: "vts_libsnapshot_test", defaults: ["libsnapshot_test_defaults"], } cc_test { name: "vts_libsnapshot_test_presubmit", defaults: ["libsnapshot_test_defaults"], cppflags: [ "-DSKIP_TEST_IN_PRESUBMIT", ], } cc_binary { cc_binary { name: "snapshotctl", name: "snapshotctl", srcs: [ srcs: [ Loading
fs_mgr/libsnapshot/snapshot_test.cpp +22 −0 Original line number Original line Diff line number Diff line Loading @@ -506,6 +506,9 @@ TEST_F(SnapshotTest, Merge) { } } TEST_F(SnapshotTest, FirstStageMountAndMerge) { TEST_F(SnapshotTest, FirstStageMountAndMerge) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif ASSERT_TRUE(AcquireLock()); ASSERT_TRUE(AcquireLock()); static const uint64_t kDeviceSize = 1024 * 1024; static const uint64_t kDeviceSize = 1024 * 1024; Loading Loading @@ -562,6 +565,9 @@ TEST_F(SnapshotTest, FlashSuperDuringUpdate) { } } TEST_F(SnapshotTest, FlashSuperDuringMerge) { TEST_F(SnapshotTest, FlashSuperDuringMerge) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif ASSERT_TRUE(AcquireLock()); ASSERT_TRUE(AcquireLock()); static const uint64_t kDeviceSize = 1024 * 1024; static const uint64_t kDeviceSize = 1024 * 1024; Loading Loading @@ -973,6 +979,9 @@ class SnapshotUpdateTest : public SnapshotTest { // Also test UnmapUpdateSnapshot unmaps everything. // Also test UnmapUpdateSnapshot unmaps everything. // Also test first stage mount and merge after this. // Also test first stage mount and merge after this. TEST_F(SnapshotUpdateTest, FullUpdateFlow) { TEST_F(SnapshotUpdateTest, FullUpdateFlow) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif // OTA client blindly unmaps all partitions that are possibly mapped. // OTA client blindly unmaps all partitions that are possibly mapped. for (const auto& name : {"sys_b", "vnd_b", "prd_b"}) { for (const auto& name : {"sys_b", "vnd_b", "prd_b"}) { ASSERT_TRUE(sm->UnmapUpdateSnapshot(name)); ASSERT_TRUE(sm->UnmapUpdateSnapshot(name)); Loading Loading @@ -1120,6 +1129,9 @@ TEST_F(SnapshotUpdateTest, SnapshotStatusFileWithoutCow) { // Test that the old partitions are not modified. // Test that the old partitions are not modified. TEST_F(SnapshotUpdateTest, TestRollback) { TEST_F(SnapshotUpdateTest, TestRollback) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif // Execute the update. // Execute the update. ASSERT_TRUE(sm->BeginUpdate()); ASSERT_TRUE(sm->BeginUpdate()); ASSERT_TRUE(sm->UnmapUpdateSnapshot("sys_b")); ASSERT_TRUE(sm->UnmapUpdateSnapshot("sys_b")); Loading Loading @@ -1297,6 +1309,9 @@ TEST_F(SnapshotUpdateTest, RetrofitAfterRegularAb) { } } TEST_F(SnapshotUpdateTest, MergeCannotRemoveCow) { TEST_F(SnapshotUpdateTest, MergeCannotRemoveCow) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif // Make source partitions as big as possible to force COW image to be created. // Make source partitions as big as possible to force COW image to be created. SetSize(sys_, 5_MiB); SetSize(sys_, 5_MiB); SetSize(vnd_, 5_MiB); SetSize(vnd_, 5_MiB); Loading Loading @@ -1571,6 +1586,9 @@ TEST_F(SnapshotUpdateTest, Overflow) { } } TEST_F(SnapshotUpdateTest, WaitForMerge) { TEST_F(SnapshotUpdateTest, WaitForMerge) { #ifdef SKIP_TEST_IN_PRESUBMIT GTEST_SKIP() << "WIP failure b/148889015"; #endif AddOperationForPartitions(); AddOperationForPartitions(); // Execute the update. // Execute the update. Loading Loading @@ -1790,6 +1808,10 @@ std::vector<uint64_t> ImageManagerTestParams() { std::vector<uint64_t> ret; std::vector<uint64_t> ret; for (uint64_t size = 1_MiB; size <= 512_MiB; size *= 2) { for (uint64_t size = 1_MiB; size <= 512_MiB; size *= 2) { ret.push_back(size); ret.push_back(size); #ifdef SKIP_TEST_IN_PRESUBMIT // BUG(148889015); break; #endif } } return ret; return ret; } } Loading