Merge "Add corresponding error code to fix vts test" into oc-mr1-dev

This commit is contained in:
Shuo Qian 2017-07-31 17:40:52 +00:00 committed by Android (Google) Code Review
commit de8b8c2abf
2 changed files with 23 additions and 15 deletions

View file

@ -98,7 +98,10 @@ TEST_F(RadioHidlTest, deactivateDataCall) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::INVALID_CALL_ID, radioRsp->rspInfo.error);
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID ||
radioRsp->rspInfo.error == RadioError::SIM_ABSENT || CheckOEMError() ||
radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE);
}
}
@ -220,6 +223,9 @@ TEST_F(RadioHidlTest, setDataProfile) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
// TODO(shuoq): Will add error check when we know the expected error from QC
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
}
}

View file

@ -754,22 +754,24 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE || CheckGeneralError());
}
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
}
/* Reset back to no carrier restriction */
memset(&carriers, 0, sizeof(carriers));
carriers.allowedCarriers.resize(0);
carriers.excludedCarriers.resize(0);
/* Reset back to no carrier restriction */
memset(&carriers, 0, sizeof(carriers));
carriers.allowedCarriers.resize(0);
carriers.excludedCarriers.resize(0);
radio->setAllowedCarriers(++serial, true, carriers);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
radio->setAllowedCarriers(++serial, true, carriers);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE || CheckGeneralError());
}
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
}
}
/*