Added new VTS test cases for v1.2 data call APIs
Test: VtsHalRadioV1_2Target Bug: 64132030 Change-Id: I3b9d94985f42a5dd9b9a24e0592cf1657da237d5
This commit is contained in:
parent
196fbbc1a6
commit
ac1844fac4
2 changed files with 94 additions and 2 deletions
|
@ -567,3 +567,91 @@ TEST_F(RadioHidlTest_v1_2, setLinkCapacityReportingCriteria_Geran) {
|
|||
toString(radioRsp_v1_2->rspInfo.error).c_str());
|
||||
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error, {RadioError::NONE}));
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio.setupDataCall_1_2() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest_v1_2, setupDataCall_1_2) {
|
||||
const int serial = GetRandomSerialNumber();
|
||||
|
||||
V1_2::AccessNetwork accessNetwork = V1_2::AccessNetwork::EUTRAN;
|
||||
|
||||
DataProfileInfo dataProfileInfo;
|
||||
memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
|
||||
dataProfileInfo.profileId = DataProfileId::IMS;
|
||||
dataProfileInfo.apn = hidl_string("VZWIMS");
|
||||
dataProfileInfo.protocol = hidl_string("IPV4V6");
|
||||
dataProfileInfo.roamingProtocol = hidl_string("IPV6");
|
||||
dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
|
||||
dataProfileInfo.user = "";
|
||||
dataProfileInfo.password = "";
|
||||
dataProfileInfo.type = DataProfileInfoType::THREE_GPP2;
|
||||
dataProfileInfo.maxConnsTime = 300;
|
||||
dataProfileInfo.maxConns = 20;
|
||||
dataProfileInfo.waitTime = 0;
|
||||
dataProfileInfo.enabled = true;
|
||||
dataProfileInfo.supportedApnTypesBitmap = 320;
|
||||
dataProfileInfo.bearerBitmap = 161543;
|
||||
dataProfileInfo.mtu = 0;
|
||||
dataProfileInfo.mvnoType = MvnoType::NONE;
|
||||
dataProfileInfo.mvnoMatchData = hidl_string();
|
||||
|
||||
bool modemCognitive = false;
|
||||
bool roamingAllowed = false;
|
||||
bool isRoaming = false;
|
||||
|
||||
V1_2::DataRequestReason reason = V1_2::DataRequestReason::NORMAL;
|
||||
std::vector<hidl_string> addresses = {""};
|
||||
std::vector<hidl_string> dnses = {""};
|
||||
|
||||
Return<void> res = radio_v1_2->setupDataCall_1_2(serial, accessNetwork, dataProfileInfo,
|
||||
modemCognitive, roamingAllowed, isRoaming,
|
||||
reason, addresses, dnses);
|
||||
ASSERT_OK(res);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_2->rspInfo.error,
|
||||
{RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_ARGUMENTS,
|
||||
RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW, RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
} else if (cardStatus.cardState == CardState::PRESENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_2->rspInfo.error,
|
||||
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_ARGUMENTS,
|
||||
RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW, RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadio.deactivateDataCall_1_2() for the response returned.
|
||||
*/
|
||||
TEST_F(RadioHidlTest_v1_2, deactivateDataCall_1_2) {
|
||||
const int serial = GetRandomSerialNumber();
|
||||
int cid = 1;
|
||||
V1_2::DataRequestReason reason = V1_2::DataRequestReason::NORMAL;
|
||||
|
||||
Return<void> res = radio_v1_2->deactivateDataCall_1_2(serial, cid, reason);
|
||||
ASSERT_OK(res);
|
||||
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_2->rspInfo.error,
|
||||
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_CALL_ID,
|
||||
RadioError::INVALID_STATE, RadioError::INVALID_ARGUMENTS,
|
||||
RadioError::REQUEST_NOT_SUPPORTED, RadioError::CANCELLED, RadioError::SIM_ABSENT}));
|
||||
} else if (cardStatus.cardState == CardState::PRESENT) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_2->rspInfo.error,
|
||||
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_CALL_ID,
|
||||
RadioError::INVALID_STATE, RadioError::INVALID_ARGUMENTS,
|
||||
RadioError::REQUEST_NOT_SUPPORTED, RadioError::CANCELLED}));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,8 +150,10 @@ Return<void> RadioResponse_v1_2::sendSMSExpectMoreResponse(const RadioResponseIn
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse_v1_2::setupDataCallResponse(const RadioResponseInfo& /*info*/,
|
||||
Return<void> RadioResponse_v1_2::setupDataCallResponse(const RadioResponseInfo& info,
|
||||
const SetupDataCallResult& /*dcResponse*/) {
|
||||
rspInfo = info;
|
||||
parent_v1_2.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
@ -205,7 +207,9 @@ Return<void> RadioResponse_v1_2::acceptCallResponse(const RadioResponseInfo& /*i
|
|||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse_v1_2::deactivateDataCallResponse(const RadioResponseInfo& /*info*/) {
|
||||
Return<void> RadioResponse_v1_2::deactivateDataCallResponse(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent_v1_2.notify();
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue