Fix test of triggerEmergencyNetworkScan am: 2b4c6387d3 am: 04dbd06bb5

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/3080044

Change-Id: I2398997f8cb6cf5aa0485794b21b06c7f67a89ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hunsuk Choi 2024-05-09 06:38:12 +00:00 committed by Automerger Merge Worker
commit 0ec6970a23

View file

@ -2193,6 +2193,18 @@ TEST_P(RadioNetworkTest, triggerEmergencyNetworkScan) {
serial = GetRandomSerialNumber();
radio_network->setEmergencyMode(serial, EmergencyMode::EMERGENCY_WWAN);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
RadioError::MODEM_ERR, RadioError::INVALID_ARGUMENTS}));
serial = GetRandomSerialNumber();
EmergencyNetworkScanTrigger scanRequest;
scanRequest.accessNetwork = {AccessNetwork::EUTRAN};
scanRequest.scanType = EmergencyScanType::NO_PREFERENCE;
@ -2206,6 +2218,19 @@ TEST_P(RadioNetworkTest, triggerEmergencyNetworkScan) {
radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
RadioError::MODEM_ERR, RadioError::INVALID_ARGUMENTS}));
// exit emergency mode for other tests
serial = GetRandomSerialNumber();
radio_network->exitEmergencyMode(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
}
/*