summaryrefslogtreecommitdiffstats
path: root/radio
diff options
context:
space:
mode:
authorLegler Wu <legler.wu@mediatek.com>2017-06-30 11:00:07 +0800
committerSanket Padawe <sanketpadawe@google.com>2017-07-21 17:28:26 -0700
commitb36443a8644924bb54ab3d1117b145257ec11480 (patch)
tree48c94cc7323eed826f5aa83c0eb530e26ec767b2 /radio
parent7c60d26763223dd32353b279cea01dc8053eaba8 (diff)
downloadplatform_hardware_interfaces-b36443a8644924bb54ab3d1117b145257ec11480.tar.gz
platform_hardware_interfaces-b36443a8644924bb54ab3d1117b145257ec11480.tar.bz2
platform_hardware_interfaces-b36443a8644924bb54ab3d1117b145257ec11480.zip
Update VTS tests so that Mediatek pass more VTS for O.
Bug: b/62926561 Test: vts tests Change-Id: Ic927f9efd437c6411fb14feac8c681334e4b5e60 Merged-in: Ic927f9efd437c6411fb14feac8c681334e4b5e60
Diffstat (limited to 'radio')
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp9
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_data.cpp24
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_icc.cpp3
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_misc.cpp25
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_sms.cpp38
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_stk.cpp6
6 files changed, 75 insertions, 30 deletions
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
index 14d14d42bd..54855fb6b6 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
@@ -122,7 +122,8 @@ TEST_F(RadioHidlTest, setCdmaBroadcastConfig) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(CheckGeneralError() ||
+ ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
+ CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
}
}
@@ -140,7 +141,8 @@ TEST_F(RadioHidlTest, getCdmaBroadcastConfig) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(CheckGeneralError());
+ ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
+ CheckGeneralError());
}
}
@@ -158,7 +160,8 @@ TEST_F(RadioHidlTest, setCdmaBroadcastActivation) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(CheckGeneralError() ||
+ ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
+ CheckGeneralError() ||
radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
}
}
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 108676b9d4..87ca6066c3 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -76,9 +76,13 @@ TEST_F(RadioHidlTest, setupDataCall) {
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
- 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 ||
+ 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 ||
+ radioRsp->rspInfo.error == RadioError::SIM_ABSENT ||
CheckOEMError());
}
}
@@ -98,7 +102,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());
}
}
@@ -116,7 +123,9 @@ 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);
}
}
@@ -220,6 +229,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);
}
}
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 a8857c3455..f50ee29a1a 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, supplyNetworkDepersonalization) {
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 71b9111d53..b31ca48af5 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
@@ -677,9 +677,11 @@ TEST_F(RadioHidlTest, startLceService) {
if (cardStatus.cardState == CardState::ABSENT) {
std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;
- ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE ||
+ 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);
}
}
@@ -697,7 +699,9 @@ 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);
}
}
@@ -713,8 +717,11 @@ TEST_F(RadioHidlTest, pullLceData) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError() ||
- radioRsp->rspInfo.error == RadioError::INTERNAL_ERR);
+ ASSERT_TRUE(radioRsp->rspInfo.error ==
+ RadioError::RADIO_NOT_AVAILABLE ||
+ CheckOEMError() ||
+ radioRsp->rspInfo.error == RadioError::INTERNAL_ERR ||
+ radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
}
}
@@ -755,7 +762,9 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
+ ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
+ radioRsp->rspInfo.error ==
+ RadioError::REQUEST_NOT_SUPPORTED);
}
/* Reset back to no carrier restriction */
@@ -769,7 +778,9 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- EXPECT_EQ(radioRsp->rspInfo.error, RadioError::NONE);
+ ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE ||
+ radioRsp->rspInfo.error ==
+ RadioError::REQUEST_NOT_SUPPORTED);
}
}
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 9aa7663f26..d88232a0c5 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);
}
}
@@ -236,8 +239,11 @@ TEST_F(RadioHidlTest, getSmscAddress) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
if (cardStatus.cardState == CardState::ABSENT) {
- ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
- radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE);
+ ASSERT_TRUE(CheckGeneralError() ||
+ radioRsp->rspInfo.error == RadioError::INVALID_STATE ||
+ radioRsp->rspInfo.error ==
+ RadioError::INVALID_MODEM_STATE ||
+ radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
}
}
@@ -257,7 +263,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 +292,9 @@ 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 +317,9 @@ 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 +372,9 @@ 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 +426,9 @@ 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 +449,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 774df98d4b..7692d65ed3 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
@@ -155,7 +155,8 @@ TEST_F(RadioHidlTest, sendEnvelopeWithStatus) {
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckGeneralError() ||
- radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
+ radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
+ radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
}
// Test with sending random string
@@ -170,6 +171,7 @@ TEST_F(RadioHidlTest, sendEnvelopeWithStatus) {
if (cardStatus.cardState == CardState::ABSENT) {
ASSERT_TRUE(CheckGeneralError() ||
- radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS);
+ radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS ||
+ radioRsp->rspInfo.error == RadioError::SIM_ABSENT);
}
}