From d945d204082ce1d27c1ecdc31019835375b48347 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 9 Aug 2024 20:49:09 +0000 Subject: [PATCH 1/2] init_kill_services_test: formatting for merges Adding formatting here, as we will start a push for people using this, if they run into any linkToDeath issue, or if they want to test this. Bugs: me Test: N/A Change-Id: I72510d61926ce694671d897519463f37892a8d12 --- .../init_kill_services_test.cpp | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/init/test_kill_services/init_kill_services_test.cpp b/init/test_kill_services/init_kill_services_test.cpp index 3af92bb55..96f0faf39 100644 --- a/init/test_kill_services/init_kill_services_test.cpp +++ b/init/test_kill_services/init_kill_services_test.cpp @@ -87,6 +87,24 @@ static inline std::string PrintName(const testing::TestParamInfo& i return info.param; } -INSTANTIATE_TEST_CASE_P(DeathTest, InitKillServicesTest, - ::testing::Values("lmkd", "ueventd", "hwservicemanager", "servicemanager"), - PrintName); +INSTANTIATE_TEST_CASE_P( + DeathTest, InitKillServicesTest, + ::testing::Values( + // clang-format off + +// TODO: we may want a more automatic way of testing this for services based on some +// criteria (e.g. not disabled), but for now adding core services one at a time + +// BEGIN INTERNAL ONLY MERGE GUARD (add things here if internal only, move down later) +// END INTERNAL ONLY MERGE GUARD + +// BEGIN AOSP ONLY (add things here if adding to AOSP) + "lmkd", + "ueventd", + "hwservicemanager", + "servicemanager" +// END AOSP ONLY + + // clang-format on + ), + PrintName); From 164f29700744963b4e7906b165da375dfbb67a59 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Fri, 9 Aug 2024 20:50:51 +0000 Subject: [PATCH 2/2] init_kill_services_test: += system_suspend Get coverage for this. Bugs: me Test: atest init_kill_services_test Change-Id: I2b0fcb8d273f89de6d0ad115a8de0c0314dbfc3f --- init/test_kill_services/init_kill_services_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init/test_kill_services/init_kill_services_test.cpp b/init/test_kill_services/init_kill_services_test.cpp index 96f0faf39..efba9f677 100644 --- a/init/test_kill_services/init_kill_services_test.cpp +++ b/init/test_kill_services/init_kill_services_test.cpp @@ -102,7 +102,8 @@ INSTANTIATE_TEST_CASE_P( "lmkd", "ueventd", "hwservicemanager", - "servicemanager" + "servicemanager", + "system_suspend" // END AOSP ONLY // clang-format on