From 4b7f0175f1556daf2ed1d85ca724aac64fb67c4f Mon Sep 17 00:00:00 2001 From: liuxiangjun Date: Wed, 20 Dec 2023 19:57:15 +0800 Subject: [PATCH] Remove the SIM card status condition check and add accepted possible errors For devices not in LTE service, the vts test returns MODEM_ERR is an expected result Bug:317314512 Test: VtsHalRadioTargetTest PerInstance/RadioNetworkTest#setNetworkSelectionModeManual/0_android_hardware_radio_network_IRadioNetwork_slot1 PerInstance/RadioNetworkTest#setNetworkSelectionModeManual/1_android_hardware_radio_network_IRadioNetwork_slot2 Merged-In: I75414ba18be93707310cace21b52508edfc33a20 Change-Id: I75414ba18be93707310cace21b52508edfc33a20 Signed-off-by: liuxiangjun --- radio/aidl/vts/radio_network_test.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp index f316a34554..df3fb1e8a8 100644 --- a/radio/aidl/vts/radio_network_test.cpp +++ b/radio/aidl/vts/radio_network_test.cpp @@ -1167,19 +1167,11 @@ TEST_P(RadioNetworkTest, setNetworkSelectionModeManual) { EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type); EXPECT_EQ(serial, radioRsp_network->rspInfo.serial); - if (cardStatus.cardState == CardStatus::STATE_ABSENT) { - ASSERT_TRUE(CheckAnyOfErrors( - radioRsp_network->rspInfo.error, - {RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME, RadioError::INVALID_ARGUMENTS, - RadioError::INVALID_STATE, RadioError::RADIO_NOT_AVAILABLE, RadioError::NO_MEMORY, - RadioError::INTERNAL_ERR, RadioError::SYSTEM_ERR, RadioError::CANCELLED})); - } else if (cardStatus.cardState == CardStatus::STATE_PRESENT) { - ASSERT_TRUE(CheckAnyOfErrors( - radioRsp_network->rspInfo.error, - {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_ARGUMENTS, - RadioError::INVALID_STATE, RadioError::NO_MEMORY, RadioError::INTERNAL_ERR, - RadioError::SYSTEM_ERR, RadioError::CANCELLED})); - } + ASSERT_TRUE(CheckAnyOfErrors( + radioRsp_network->rspInfo.error, + {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INVALID_ARGUMENTS, + RadioError::INVALID_STATE, RadioError::NO_MEMORY, RadioError::INTERNAL_ERR, + RadioError::SYSTEM_ERR, RadioError::CANCELLED, RadioError::MODEM_ERR})); } /*