Add libsnapshot_test to presubmit
Add libsnapshot test to the TEST_MAPPING's presubmit of fs_mgr to run the test on TH whenever changes are applied to the fs_mgr contents. Some of the tests are temporarily disabled due to a WIP bug. Test: TH Bug: 142513589 Change-Id: I2a283645b433ed1fd2b08d1c4919cac26d19cf16 Signed-off-by: Alessio Balsini <balsini@google.com>
This commit is contained in:
parent
4df09e4685
commit
9ab7fe2768
3 changed files with 49 additions and 5 deletions
|
@ -11,6 +11,9 @@
|
|||
},
|
||||
{
|
||||
"name": "fiemap_writer_test"
|
||||
},
|
||||
{
|
||||
"name": "vts_libsnapshot_test_presubmit"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -160,8 +160,8 @@ cc_library_static {
|
|||
],
|
||||
}
|
||||
|
||||
cc_test {
|
||||
name: "libsnapshot_test",
|
||||
cc_defaults {
|
||||
name: "libsnapshot_test_defaults",
|
||||
defaults: ["libsnapshot_defaults"],
|
||||
srcs: [
|
||||
"partition_cow_creator_test.cpp",
|
||||
|
@ -173,10 +173,7 @@ cc_test {
|
|||
"android.hardware.boot@1.1",
|
||||
"libbinder",
|
||||
"libcrypto",
|
||||
"libfs_mgr",
|
||||
"libgsi",
|
||||
"libhidlbase",
|
||||
"liblp",
|
||||
"libprotobuf-cpp-lite",
|
||||
"libsparse",
|
||||
"libutils",
|
||||
|
@ -186,16 +183,38 @@ cc_test {
|
|||
"libutilscallstack",
|
||||
],
|
||||
static_libs: [
|
||||
"libfs_mgr",
|
||||
"libgsi",
|
||||
"libgmock",
|
||||
"liblp",
|
||||
"libsnapshot",
|
||||
"libsnapshot_test_helpers",
|
||||
],
|
||||
header_libs: [
|
||||
"libstorage_literals_headers",
|
||||
],
|
||||
test_suites: [
|
||||
"vts-core",
|
||||
"device-tests"
|
||||
],
|
||||
test_min_api_level: 29,
|
||||
auto_gen_config: 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 {
|
||||
name: "snapshotctl",
|
||||
srcs: [
|
||||
|
|
|
@ -503,6 +503,9 @@ TEST_F(SnapshotTest, Merge) {
|
|||
}
|
||||
|
||||
TEST_F(SnapshotTest, FirstStageMountAndMerge) {
|
||||
#ifdef SKIP_TEST_IN_PRESUBMIT
|
||||
GTEST_SKIP() << "WIP failure b/148889015";
|
||||
#endif
|
||||
ASSERT_TRUE(AcquireLock());
|
||||
|
||||
static const uint64_t kDeviceSize = 1024 * 1024;
|
||||
|
@ -559,6 +562,9 @@ TEST_F(SnapshotTest, FlashSuperDuringUpdate) {
|
|||
}
|
||||
|
||||
TEST_F(SnapshotTest, FlashSuperDuringMerge) {
|
||||
#ifdef SKIP_TEST_IN_PRESUBMIT
|
||||
GTEST_SKIP() << "WIP failure b/148889015";
|
||||
#endif
|
||||
ASSERT_TRUE(AcquireLock());
|
||||
|
||||
static const uint64_t kDeviceSize = 1024 * 1024;
|
||||
|
@ -970,6 +976,9 @@ class SnapshotUpdateTest : public SnapshotTest {
|
|||
// Also test UnmapUpdateSnapshot unmaps everything.
|
||||
// Also test first stage mount and merge after this.
|
||||
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.
|
||||
for (const auto& name : {"sys_b", "vnd_b", "prd_b"}) {
|
||||
ASSERT_TRUE(sm->UnmapUpdateSnapshot(name));
|
||||
|
@ -1114,6 +1123,9 @@ TEST_F(SnapshotUpdateTest, SnapshotStatusFileWithoutCow) {
|
|||
|
||||
// Test that the old partitions are not modified.
|
||||
TEST_F(SnapshotUpdateTest, TestRollback) {
|
||||
#ifdef SKIP_TEST_IN_PRESUBMIT
|
||||
GTEST_SKIP() << "WIP failure b/148889015";
|
||||
#endif
|
||||
// Execute the update.
|
||||
ASSERT_TRUE(sm->BeginUpdate());
|
||||
ASSERT_TRUE(sm->UnmapUpdateSnapshot("sys_b"));
|
||||
|
@ -1291,6 +1303,9 @@ TEST_F(SnapshotUpdateTest, RetrofitAfterRegularAb) {
|
|||
}
|
||||
|
||||
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.
|
||||
SetSize(sys_, 5_MiB);
|
||||
SetSize(vnd_, 5_MiB);
|
||||
|
@ -1565,6 +1580,9 @@ TEST_F(SnapshotUpdateTest, Overflow) {
|
|||
}
|
||||
|
||||
TEST_F(SnapshotUpdateTest, WaitForMerge) {
|
||||
#ifdef SKIP_TEST_IN_PRESUBMIT
|
||||
GTEST_SKIP() << "WIP failure b/148889015";
|
||||
#endif
|
||||
AddOperationForPartitions();
|
||||
|
||||
// Execute the update.
|
||||
|
@ -1782,6 +1800,10 @@ std::vector<uint64_t> ImageManagerTestParams() {
|
|||
std::vector<uint64_t> ret;
|
||||
for (uint64_t size = 1_MiB; size <= 512_MiB; size *= 2) {
|
||||
ret.push_back(size);
|
||||
#ifdef SKIP_TEST_IN_PRESUBMIT
|
||||
// BUG(148889015);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue