mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
VTS: Fix IRadio.setAllowedCarriers and IRadio.nvResetConfig
1) IRadio.setAllowedCarriers Fix IRadio.setAllowedCarriers to pass no restrictions. Passing restrictions will block all other SIM cards until a new IRadio.setAllowedCarriers with no restriction is invoked. Even factory reset will not recover. 2) IRadio.nvResetConfig IRadio.nvResetConfig with ResetNvType RELOAD causes radio restart. All subsuquent scripts fail with cause RADIO_NOT_AVAILABLE. Fix to use ResetNvType ERASE which does not restart the radio. Test: VTS Bug: 37946160 Change-Id: Ib671758414cc97e1a596358306f89eed13918c48
This commit is contained in:
@@ -556,7 +556,7 @@ TEST_F(RadioHidlTest, nvWriteCdmaPrl) {
|
||||
TEST_F(RadioHidlTest, nvResetConfig) {
|
||||
int serial = 1;
|
||||
|
||||
radio->nvResetConfig(++serial, ResetNvType::RELOAD);
|
||||
radio->nvResetConfig(++serial, ResetNvType::ERASE);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
|
||||
@@ -733,6 +733,8 @@ TEST_F(RadioHidlTest, getModemActivityInfo) {
|
||||
TEST_F(RadioHidlTest, setAllowedCarriers) {
|
||||
int serial = 1;
|
||||
CarrierRestrictions carriers;
|
||||
|
||||
/* Carrier restriction with one carrier */
|
||||
memset(&carriers, 0, sizeof(carriers));
|
||||
carriers.allowedCarriers.resize(1);
|
||||
carriers.excludedCarriers.resize(0);
|
||||
@@ -749,6 +751,20 @@ TEST_F(RadioHidlTest, setAllowedCarriers) {
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
|
||||
}
|
||||
|
||||
/* 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);
|
||||
|
||||
if (cardStatus.cardState == CardState::ABSENT) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -816,4 +832,4 @@ TEST_F(RadioHidlTest, setSimCardPower) {
|
||||
ASSERT_TRUE(radioRsp->rspInfo.error == RadioError::NONE
|
||||
|| radioRsp->rspInfo.error == RadioError::REQUEST_NOT_SUPPORTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user