From b688ea7e73c38f8a25dc04127692a2348574404a Mon Sep 17 00:00:00 2001 From: lesl Date: Thu, 24 Sep 2020 16:05:39 +0800 Subject: [PATCH] vts: Use global hostapd_ since teardown will call terminate function aosp/1427815 add invoke terminate function in teardown function. It will cause Create Test case fail since Create killed global hostapd_ service to re-generate the local one. Use global hostapd_ to replace local variable to make teardown function work normally. Bug: 169248773 Test: atest -c VtsHalWifiHostapdV1_2TargetTest Test: atest -c VtsHalWifiHostapdV1_1TargetTest Test: atest -c VtsHalWifiHostapdV1_0TargetTest Change-Id: I6300a626db76e68873bbc34c489a9a8ee2d55e7a --- wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp b/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp index 1b4eea6d04..bb99ae4d6b 100644 --- a/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp +++ b/wifi/hostapd/1.0/vts/functional/hostapd_hidl_test.cpp @@ -145,8 +145,8 @@ TEST_P(HostapdHidlTest, Create) { stopHostapd(wifi_instance_name_); startHostapdAndWaitForHidlService(wifi_instance_name_, hostapd_instance_name_); - sp hostapd = IHostapd::getService(hostapd_instance_name_); - EXPECT_NE(nullptr, hostapd.get()); + hostapd_ = IHostapd::getService(hostapd_instance_name_); + EXPECT_NE(nullptr, hostapd_.get()); } /**