diff --git a/init/test_kill_services/init_kill_services_test.cpp b/init/test_kill_services/init_kill_services_test.cpp index 535570321..227380d71 100644 --- a/init/test_kill_services/init_kill_services_test.cpp +++ b/init/test_kill_services/init_kill_services_test.cpp @@ -16,6 +16,7 @@ #include +#include #include #include @@ -24,6 +25,7 @@ using ::android::base::GetProperty; using ::android::base::SetProperty; void ExpectKillingServiceRecovers(const std::string& service_name) { + LOG(INFO) << "hello " << service_name << "!"; const std::string status_prop = "init.svc." + service_name; const std::string pid_prop = "init.svc_debug_pid." + service_name; @@ -32,6 +34,7 @@ void ExpectKillingServiceRecovers(const std::string& service_name) { ASSERT_EQ("running", GetProperty(status_prop, "")) << status_prop; ASSERT_NE("", initial_pid) << pid_prop; + LOG(INFO) << "okay, now goodbye " << service_name; EXPECT_EQ(0, system(("kill -9 " + initial_pid).c_str())); constexpr size_t kMaxWaitMilliseconds = 10000; @@ -42,11 +45,16 @@ void ExpectKillingServiceRecovers(const std::string& service_name) { for (size_t retry = 0; retry < kRetryTimes; retry++) { const std::string& pid = GetProperty(pid_prop, ""); if (pid != initial_pid && pid != "") break; + LOG(INFO) << "I said goodbye " << service_name << "!"; usleep(kRetryWaitMilliseconds * 1000); } + LOG(INFO) << "are you still there " << service_name << "?"; + // svc_debug_pid is set after svc property EXPECT_EQ("running", GetProperty(status_prop, "")); + + LOG(INFO) << "I'm done with " << service_name; } class InitKillServicesTest : public ::testing::TestWithParam {};