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 5cef297cb2)
This commit is contained in:
Willy Hu 2019-06-28 18:36:03 +08:00 committed by Amit Mahajan
parent 56e9dd901e
commit fb1616eb94

View file

@ -14,7 +14,6 @@
* limitations under the License.
*/
#include <android/hardware/radio/1.1/IRadio.h>
#include <radio_hidl_hal_utils_v1_2.h>
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());
}