Fix test of triggerEmergencyNetworkScan am: 2b4c6387d3

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

Change-Id: I3422587ee52737abc2932caa102ceb24a68f5a24
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:00:33 +00:00 committed by Automerger Merge Worker
commit 04dbd06bb5

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}));
}
/*