From 08e90550f19de78894ddd5879f17f64c0a1ea8b6 Mon Sep 17 00:00:00 2001 From: sqian Date: Thu, 1 Jun 2017 12:39:22 -0700 Subject: [PATCH] Fix vts tests: Fixed with QC updated documentation: - setGsmBroadcastConfig - getGsmBroadcastConfig - setGsmBroadcastActivation - getImsRegistrationState - pullLceData - deleteSmsOnSim - deleteSmsOnRuim - sendDtmf - startDtmf - stopDtmf - sendBurstDtmf Try to increase timeout to 75 to fix (suggest by QC in b/35671595 #62): - dial Test: adb shell data/local/tmp/VtsHalRadioV1_0TargetTest Bug: 35671595, 35800570 Change-Id: Idd50bf71ae4c4490722d88d7cba0485b9d49073b --- current.txt | 2 +- radio/1.0/IRadioResponse.hal | 17 +++++++++++++---- .../radio_hidl_hal_cell_broadcast.cpp | 9 ++++++--- radio/1.0/vts/functional/radio_hidl_hal_ims.cpp | 4 +++- .../1.0/vts/functional/radio_hidl_hal_misc.cpp | 3 ++- radio/1.0/vts/functional/radio_hidl_hal_sms.cpp | 10 ++++++++-- radio/1.0/vts/functional/radio_hidl_hal_utils.h | 2 +- .../1.0/vts/functional/radio_hidl_hal_voice.cpp | 12 ++++++++---- 8 files changed, 42 insertions(+), 17 deletions(-) diff --git a/current.txt b/current.txt index 5c9d3720ce..e18cec03d2 100644 --- a/current.txt +++ b/current.txt @@ -130,7 +130,7 @@ deee1dc4948f33af207e1008aba0f6cc07afb7900eab53f33192c8cac137eefc android.hardwar efc83df3f962b93c7c0290d691d7d300dabe12683e2cde3591fb3c0beedce20f android.hardware.power@1.0::types 9b5aa499ec3b4226f15f48f5ed08896e2fc0676f978c9e199c1da21daaf002a6 android.hardware.radio@1.0::IRadio 5c8efbb9c451a59737ed2c6c20230aae4745839ca01d8088d6dcc9020e52d2c5 android.hardware.radio@1.0::IRadioIndication -c5f22264a31562e009bb284287051b7998fc46cd3294df61c9e6a1d622184993 android.hardware.radio@1.0::IRadioResponse +69f6b4b8ec40ca02ccc7bb8227a097135c20c00bd94c822e421cd9af1267252c android.hardware.radio@1.0::IRadioResponse de3ab9f73b1073cd677b19d886fb927e9381b30161a704712d2b30f875873f5c android.hardware.radio@1.0::ISap d183e406ef0897df2117a9dde384e8e6ea4fa6ab1c7f6f28e65b87011218c9ea android.hardware.radio@1.0::ISapCallback 96986fbd22f0e6ca752e1fcdc0a64bda213995a81f5f36bc4faf3532d9306b97 android.hardware.radio@1.0::types diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal index 4a9be59809..35ab899bfb 100644 --- a/radio/1.0/IRadioResponse.hal +++ b/radio/1.0/IRadioResponse.hal @@ -423,6 +423,7 @@ interface IRadioResponse { * RadioError:INTERNAL_ERR * RadioError:SYSTEM_ERR * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:INVALID_MODEM_STATE */ oneway sendDtmfResponse(RadioResponseInfo info); @@ -887,6 +888,7 @@ interface IRadioResponse { * RadioError:INVALID_CALL_ID * RadioError:SYSTEM_ERR * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:INVALID_MODEM_STATE */ oneway startDtmfResponse(RadioResponseInfo info); @@ -905,6 +907,7 @@ interface IRadioResponse { * RadioError:INTERNAL_ERR * RadioError:INVALID_CALL_ID * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:INVALID_MODEM_STATE */ oneway stopDtmfResponse(RadioResponseInfo info); @@ -1050,16 +1053,15 @@ interface IRadioResponse { * * Valid errors returned: * RadioError:NONE - * RadioError:SIM_FULL * RadioError:INVALID_ARGUMENTS * RadioError:NO_MEMORY - * RadioError:REQUEST_RATE_LIMITED * RadioError:SYSTEM_ERR * RadioError:MODEM_ERR * RadioError:NO_SUCH_ENTRY * RadioError:INTERNAL_ERR * RadioError:RADIO_NOT_AVAILABLE * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:INVALID_MODEM_STATE */ oneway deleteSmsOnSimResponse(RadioResponseInfo info); @@ -1359,6 +1361,7 @@ interface IRadioResponse { * RadioError:INVALID_CALL_ID * RadioError:INVALID_STATE * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:MODE_NOT_SUPPORTED */ oneway sendBurstDtmfResponse(RadioResponseInfo info); @@ -1580,13 +1583,12 @@ interface IRadioResponse { * RadioError:RADIO_NOT_AVAILABLE * RadioError:INVALID_ARGUMENTS * RadioError:NO_MEMORY - * RadioError:REQUEST_RATE_LIMITED * RadioError:SYSTEM_ERR * RadioError:MODEM_ERR * RadioError:NO_SUCH_ENTRY * RadioError:INTERNAL_ERR * RadioError:REQUEST_NOT_SUPPORTED - * RadioError:OPERATION_NOT_ALLOWED + * RadioError:INVALID_MODEM_STATE */ oneway deleteSmsOnRuimResponse(RadioResponseInfo info); @@ -1802,6 +1804,12 @@ interface IRadioResponse { * Valid errors returned: * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE + * RadioError:NO_MEMORY + * RadioError:INTERNAL_ERR + * RadioError:SYSTEM_ERR + * RadioError:REQUEST_NOT_SUPPORTED + * RadioError:MODEM_ERR + * RadioError:INVALID_MODEM_STATE */ oneway getImsRegistrationStateResponse(RadioResponseInfo info, bool isRegistered, RadioTechnologyFamily ratFamily); @@ -2053,6 +2061,7 @@ interface IRadioResponse { * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:LCE_NOT_SUPPORTED + * RadioError:INTERNAL_ERR */ oneway pullLceDataResponse(RadioResponseInfo info, LceDataInfo lceInfo); 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 3bf7c9d6a2..14d14d42bd 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 @@ -77,7 +77,8 @@ TEST_F(RadioHidlTest, setGsmBroadcastConfig) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::INVALID_STATE || - radioRsp->rspInfo.error == RadioError::NONE); + radioRsp->rspInfo.error == RadioError::NONE || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } @@ -95,7 +96,8 @@ TEST_F(RadioHidlTest, getGsmBroadcastConfig) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::INVALID_STATE || - radioRsp->rspInfo.error == RadioError::NONE); + radioRsp->rspInfo.error == RadioError::NONE || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } @@ -179,6 +181,7 @@ TEST_F(RadioHidlTest, setGsmBroadcastActivation) { radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::INVALID_STATE || radioRsp->rspInfo.error == RadioError::NONE || - radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED); + radioRsp->rspInfo.error == RadioError::OPERATION_NOT_ALLOWED || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp b/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp index ec99d428c5..16465c71a3 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_ims.cpp @@ -190,6 +190,8 @@ TEST_F(RadioHidlTest, getImsRegistrationState) { EXPECT_EQ(serial, radioRsp->rspInfo.serial); if (cardStatus.cardState == CardState::ABSENT) { - EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error); + ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE || + radioRsp->rspInfo.error == RadioError::MODEM_ERR || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } 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 29cb91232f..1df5802dd0 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp @@ -702,7 +702,8 @@ 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()); + ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::RADIO_NOT_AVAILABLE || CheckOEMError() || + radioRsp->rspInfo.error == RadioError::INTERNAL_ERR); } } 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 698cf26df5..9aa7663f26 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp @@ -307,7 +307,8 @@ TEST_F(RadioHidlTest, deleteSmsOnSim) { radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::MODEM_ERR || - radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY); + radioRsp->rspInfo.error == RadioError::NO_SUCH_ENTRY || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } @@ -407,7 +408,12 @@ TEST_F(RadioHidlTest, deleteSmsOnRuim) { EXPECT_EQ(serial, radioRsp->rspInfo.serial); if (cardStatus.cardState == CardState::ABSENT) { - ASSERT_TRUE(CheckGeneralError()); + ASSERT_TRUE(CheckGeneralError() || + radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || + 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); } } diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h index 4db8a44cd7..a0d7f70862 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h +++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h @@ -82,7 +82,7 @@ using ::android::hardware::Return; using ::android::hardware::Void; using ::android::sp; -#define TIMEOUT_PERIOD 65 +#define TIMEOUT_PERIOD 75 #define RADIO_SERVICE_NAME "slot1" class RadioHidlTest; diff --git a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp index 95d00e32fc..8fe04fd874 100644 --- a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp +++ b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp @@ -390,7 +390,8 @@ TEST_F(RadioHidlTest, sendDtmf) { radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID || - radioRsp->rspInfo.error == RadioError::MODEM_ERR); + radioRsp->rspInfo.error == RadioError::MODEM_ERR || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } @@ -410,7 +411,8 @@ TEST_F(RadioHidlTest, startDtmf) { radioRsp->rspInfo.error == RadioError::INVALID_ARGUMENTS || radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID || - radioRsp->rspInfo.error == RadioError::MODEM_ERR); + radioRsp->rspInfo.error == RadioError::MODEM_ERR || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } @@ -428,7 +430,8 @@ TEST_F(RadioHidlTest, stopDtmf) { if (cardStatus.cardState == CardState::ABSENT) { ASSERT_TRUE(CheckGeneralError() || radioRsp->rspInfo.error == RadioError::NONE || radioRsp->rspInfo.error == RadioError::INVALID_CALL_ID || - radioRsp->rspInfo.error == RadioError::MODEM_ERR); + radioRsp->rspInfo.error == RadioError::MODEM_ERR || + radioRsp->rspInfo.error == RadioError::INVALID_MODEM_STATE); } } @@ -481,6 +484,7 @@ TEST_F(RadioHidlTest, sendBurstDtmf) { 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::MODE_NOT_SUPPORTED); } } \ No newline at end of file