From d7f198c9abb04c88d2035e12a526e55cbbe111f2 Mon Sep 17 00:00:00 2001 From: Sanket Padawe Date: Tue, 1 Aug 2017 09:53:44 -0700 Subject: [PATCH] Update VTS tests so that more tests pass for O. Cherry picked from ag/2562201 Bug: b/62926561 Test: vts tests Change-Id: Ic927f9efd437c6411fb14feac8c681334e4b5e60 Merged-in: Ic927f9efd437c6411fb14feac8c681334e4b5e60 --- .../vts/functional/radio_hidl_hal_data.cpp | 5 ++-- .../1.0/vts/functional/radio_hidl_hal_icc.cpp | 5 ++-- .../vts/functional/radio_hidl_hal_misc.cpp | 9 ++++-- .../1.0/vts/functional/radio_hidl_hal_sms.cpp | 30 ++++++++++++------- .../1.0/vts/functional/radio_hidl_hal_stk.cpp | 3 +- 5 files changed, 34 insertions(+), 18 deletions(-) diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp index df31563254..4684e0f961 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp @@ -79,7 +79,7 @@ TEST_F(RadioHidlTest, setupDataCall) { radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || radioRsp->rspInfo.error == RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW || radioRsp->rspInfo.error == RadioError::OP_NOT_ALLOWED_DURING_VOICE_CALL || - CheckOEMError()); + radioRsp->rspInfo.error == RadioError::SIM_ABSENT || CheckOEMError()); } } @@ -119,7 +119,8 @@ TEST_F(RadioHidlTest, getDataCallList) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE || - radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE); + radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp index 9e003e2d77..e56e3c88c3 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp @@ -317,6 +317,7 @@ TEST_F(RadioHidlTest, getIccCardStatus) { radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::INVALID_SIM_STATE || radioRsp->rspInfo.error == RadioError::PASSWORD_INCORRECT || - radioRsp->rspInfo.error == RadioError::INTERNAL_ERR); + radioRsp->rspInfo.error == RadioError::INTERNAL_ERR || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } -} + } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp index 0507cc98f5..d93b176d2a 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp @@ -676,9 +676,11 @@ TEST_F(RadioHidlTest, startLceService) { EXPECT_EQ(serial, radioRsp->rspInfo.serial); if (cardStatus.cardState == CardState::ABSENT) { + std::cout << static_cast(radioRsp->rspInfo.error) << std::endl; ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED || - radioRsp->rspInfo.error == RadioError::INTERNAL_ERR); + radioRsp->rspInfo.error == RadioError::INTERNAL_ERR || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -696,7 +698,8 @@ TEST_F(RadioHidlTest, stopLceService) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::LCE_NOT_SUPPORTED || - radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED); + radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -845,4 +848,4 @@ TEST_F(RadioHidlTest, setSimCardPower) { ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED); } -} \ No newline at end of file +} diff --git a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp index 271a23aa5b..7d747030f0 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp @@ -36,7 +36,8 @@ TEST_F(RadioHidlTest, sendSms) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || - radioRsp->rspInfo.error == RadioError::INVALID_STATE); + radioRsp->rspInfo.error == RadioError::INVALID_STATE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); EXPECT_EQ(0, radioRsp->sendSmsResult.errorCode); } } @@ -62,7 +63,8 @@ TEST_F(RadioHidlTest, sendSMSExpectMore) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || - radioRsp->rspInfo.error == RadioError::INVALID_STATE); + radioRsp->rspInfo.error == RadioError::INVALID_STATE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -145,7 +147,8 @@ TEST_F(RadioHidlTest, sendCdmaSms) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || - radioRsp->rspInfo.error == RadioError::INVALID_STATE); + radioRsp->rspInfo.error == RadioError::INVALID_STATE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -237,7 +240,8 @@ TEST_F(RadioHidlTest, getSmscAddress) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE || - radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -257,7 +261,8 @@ TEST_F(RadioHidlTest, setSmscAddress) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || - radioRsp->rspInfo.error == RadioError::INVALID_SMS_FORMAT); + radioRsp->rspInfo.error == RadioError::INVALID_SMS_FORMAT || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -285,7 +290,8 @@ TEST_F(RadioHidlTest, writeSmsToSim) { radioRsp->rspInfo.error == RadioError::ENCODING_ERR || radioRsp->rspInfo.error == RadioError::NO_RESOURCES || radioRsp->rspInfo.error == RadioError::NETWORK_NOT_READY || - radioRsp->rspInfo.error == RadioError::INVALID_SMSC_ADDRESS); + radioRsp->rspInfo.error == RadioError::INVALID_SMSC_ADDRESS || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -308,7 +314,8 @@ TEST_F(RadioHidlTest, deleteSmsOnSim) { radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::MODEM_ERR || radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY || - radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -361,7 +368,8 @@ TEST_F(RadioHidlTest, writeSmsToRuim) { radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::MODEM_ERR || radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY || - radioRsp->rspInfo.error == RadioError::INVALID_SMSC_ADDRESS); + radioRsp->rspInfo.error == RadioError::INVALID_SMSC_ADDRESS || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -413,7 +421,8 @@ TEST_F(RadioHidlTest, deleteSmsOnRuim) { radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::MODEM_ERR || radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY || - radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } @@ -434,6 +443,7 @@ TEST_F(RadioHidlTest, reportSmsMemoryStatus) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::INVALID_STATE || - radioRsp->rspInfo.error == RadioError::MODEM_ERR); + radioRsp->rspInfo.error == RadioError::MODEM_ERR || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp index f97f5febd6..da46e88857 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp @@ -121,6 +121,7 @@ TEST_F(RadioHidlTest, sendEnvelopeWithStatus) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || - radioRsp->rspInfo.error == RadioError::MODEM_ERR); + radioRsp->rspInfo.error == RadioError::MODEM_ERR || + radioRsp->rspInfo.error == RadioError::SIM_ABSENT); } }