Fix failures in VtsHalRadioV1_5TargetTest

Update below VTS tests with EUTRAN instead of GERAN.
setNetworkSelectionModeManual_1_5 and setSystemSelectionChannels_1_5
because some devices do not support GSM.

Test:
run vts -m VtsHalRadioV1_5TargetTest -t PerInstance/RadioHidlTest_v1_5#setNetworkSelectionModeManual_1_5/0_slot1
run vts -m VtsHalRadioV1_5TargetTest -t PerInstance/RadioHidlTest_v1_5#setNetworkSelectionModeManual_1_5/1_slot2
run vts -m VtsHalRadioV1_5TargetTest -t PerInstance/RadioHidlTest_v1_5#setSystemSelectionChannels_1_5/0_slot1
run vts -m VtsHalRadioV1_5TargetTest -t PerInstance/RadioHidlTest_v1_5#setSystemSelectionChannels_1_5/1_slot2

Bug: 335796413
Change-Id: Ia79460a168515d93883a0056c80f5915f016273d
This commit is contained in:
Gautam Raychaudhury
2024-05-08 20:32:18 +05:30
parent 2b4c6387d3
commit beff3324c7

View File

@@ -519,26 +519,38 @@ TEST_P(RadioHidlTest_v1_5, areUiccApplicationsEnabled) {
TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) { TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
serial = GetRandomSerialNumber(); serial = GetRandomSerialNumber();
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900; ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band3;
bandP900.geranBands() = {GeranBands::BAND_P900}; band3.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_3});
::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850; ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band17;
band850.geranBands() = {GeranBands::BAND_850}; band17.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_17});
::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = { ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band20;
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN, band20.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_20});
.bands = bandP900, ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band40;
band40.eutranBands({::android::hardware::radio::V1_5::EutranBands::BAND_40});
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier3 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band3,
.channels = {1, 2}}; .channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = { ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier17 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN, .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band850, .bands = band17,
.channels = {1, 2}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier20 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band20,
.channels = {128, 129}};
::android::hardware::radio::V1_5::RadioAccessSpecifier specifier40 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN,
.bands = band40,
.channels = {128, 129}}; .channels = {128, 129}};
Return<void> res = Return<void> res =
radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifierP900, specifier850}); radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifier3, specifier17, specifier20, specifier40});
ASSERT_OK(res); ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial); EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
ALOGI("setSystemSelectionChannels, rspInfo.error = %s\n", ALOGI("setSystemSelectionChannels_1_5, rspInfo.error = %s\n",
toString(radioRsp_v1_5->rspInfo.error).c_str()); toString(radioRsp_v1_5->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors( ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_v1_5->rspInfo.error, radioRsp_v1_5->rspInfo.error,
@@ -547,12 +559,12 @@ TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) { if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
serial = GetRandomSerialNumber(); serial = GetRandomSerialNumber();
Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5( Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(
serial, false, {specifierP900, specifier850}); serial, false, {specifier3, specifier17, specifier20, specifier40});
ASSERT_OK(res); ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial); EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
ALOGI("setSystemSelectionChannels, rspInfo.error = %s\n", ALOGI("setSystemSelectionChannels_1_5, rspInfo.error = %s\n",
toString(radioRsp_v1_5->rspInfo.error).c_str()); toString(radioRsp_v1_5->rspInfo.error).c_str());
EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error); EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error);
} }
@@ -1190,11 +1202,12 @@ TEST_P(RadioHidlTest_v1_5, setNetworkSelectionModeManual_1_5) {
// can't camp on nonexistent MCCMNC, so we expect this to fail. // can't camp on nonexistent MCCMNC, so we expect this to fail.
Return<void> res = radio_v1_5->setNetworkSelectionModeManual_1_5( Return<void> res = radio_v1_5->setNetworkSelectionModeManual_1_5(
serial, "123456", android::hardware::radio::V1_5::RadioAccessNetworks::GERAN); serial, "123456", android::hardware::radio::V1_5::RadioAccessNetworks::EUTRAN);
EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial); EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
ALOGI("setNetworkSelectionModeManual_1_5, rspInfo.error = %s\n",
toString(radioRsp_v1_5->rspInfo.error).c_str());
if (cardStatus.base.base.base.cardState == CardState::ABSENT) { if (cardStatus.base.base.base.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error, ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
{RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME, {RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME,