From fb1616eb9424564ed274a389ebc52600ef8cb41d Mon Sep 17 00:00:00 2001 From: Willy Hu Date: Fri, 28 Jun 2019 18:36:03 +0800 Subject: [PATCH] VTS: Change stopNetworkScan from 1_1 to 1_2 Change stopNetworkScan from 1_1 to 1_2 when testing VtsHalRadioV1_2Target. Symptom: When vts process slot2 "startnetworkscan", it will call "stopnetworkscan()" when startnetworkscan success. But from current design it will set stopnetworkscan to slot1(wrong slot, expect is slot2) as bwlow log. CTS fail log: hardware/interfaces/radio/1.2/vts/functional/radio_hidl_hal_test.cpp:111 //Device request NwScan on 2nd Sim 06-28 11:30:22.770 radio 873 1213 F RILQ : RIL[1][Log.cpp: 48] [DispatcherModul(873,1213)] d: [DispatcherModule]: Handling msg = RIL_REQUEST_START_NETWORK_SCAN //But Device want to abort on Primary Sim 06-28 11:30:22.776 radio 923 1205 F RILQ : RIL[0][Log.cpp: 48] [DispatcherModul(923,1205)] d: [NasModule]: Handling msg = RIL_REQUEST_STOP_NETWORK_SCAN[Context: IRadio(1681692777)] Bug: 135982495 Test: Build pass. Local test VTS pass. Change-Id: Ic53c24ab2a670e806b4ac7f192e6eb81252ade84 (cherry picked from commit 5cef297cb2ed70bcf70abf911dc4bd14c343cbc6) --- .../vts/functional/radio_hidl_hal_test.cpp | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/radio/1.2/vts/functional/radio_hidl_hal_test.cpp b/radio/1.2/vts/functional/radio_hidl_hal_test.cpp index bff7481bed..6b84810686 100644 --- a/radio/1.2/vts/functional/radio_hidl_hal_test.cpp +++ b/radio/1.2/vts/functional/radio_hidl_hal_test.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include void RadioHidlTest_v1_2::SetUp() { @@ -88,25 +87,7 @@ void RadioHidlTest_v1_2::updateSimCardStatus() { } void RadioHidlTest_v1_2::stopNetworkScan() { - sp<::android::hardware::radio::V1_1::IRadio> radio_v1_1; - - radio_v1_1 = ::testing::VtsHalHidlTargetTestBase::getService< - ::android::hardware::radio::V1_1::IRadio>( - RadioHidlEnvironment::Instance() - ->getServiceName<::android::hardware::radio::V1_1::IRadio>( - hidl_string(RADIO_SERVICE_NAME))); - if (radio_v1_1 == NULL) { - sleep(60); - radio_v1_1 = ::testing::VtsHalHidlTargetTestBase::getService< - ::android::hardware::radio::V1_1::IRadio>( - RadioHidlEnvironment::Instance() - ->getServiceName<::android::hardware::radio::V1_1::IRadio>( - hidl_string(RADIO_SERVICE_NAME))); - } - ASSERT_NE(nullptr, radio_v1_1.get()); - serial = GetRandomSerialNumber(); - - radio_v1_1->stopNetworkScan(serial); + radio_v1_2->stopNetworkScan(serial); EXPECT_EQ(std::cv_status::no_timeout, wait()); }