Add corresponding error code to fix vts test

Test: run vts
Bug: 63152815
Bug: 62989786
Bug: 64041522
Change-Id: Ifbd17f85b39221de31ec7884b30dc176e1cbd3ab
Merged-In: Ifbd17f85b39221de31ec7884b30dc176e1cbd3ab
This commit is contained in:
sqian 2017-07-31 15:00:44 -07:00
parent c17e286b9f
commit 293bbfdc3e
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);
}
}
/*