Add VTS test case to cover multiple RANs per request
Test IRadioNetwork.setSignalStrengthReportingCriteria should
support multiple RANs per request.
Bug: 206857183
Test: atest VtsHalRadioTargetTest
Merged-In: I9d48029b4c2f5c36c7f48c9712c17dbdcf890dc4
Change-Id: I9d48029b4c2f5c36c7f48c9712c17dbdcf890dc4
(cherry picked from commit 926d66ed00
)
This commit is contained in:
parent
6d8dcd4aba
commit
64b9f3fdb6
1 changed files with 83 additions and 0 deletions
|
@ -591,6 +591,89 @@ TEST_P(RadioNetworkTest, setSignalStrengthReportingCriteria_NGRAN_SSSINR) {
|
|||
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadioNetwork.setSignalStrengthReportingCriteria() for multi-RANs per request
|
||||
*/
|
||||
TEST_P(RadioNetworkTest, setSignalStrengthReportingCriteria_multiRansPerRequest) {
|
||||
SignalThresholdInfo signalThresholdInfoGeran;
|
||||
signalThresholdInfoGeran.signalMeasurement = SignalThresholdInfo::SIGNAL_MEASUREMENT_TYPE_RSSI;
|
||||
signalThresholdInfoGeran.hysteresisMs = 5000;
|
||||
signalThresholdInfoGeran.hysteresisDb = 2;
|
||||
signalThresholdInfoGeran.thresholds = {-109, -103, -97, -89};
|
||||
signalThresholdInfoGeran.isEnabled = true;
|
||||
signalThresholdInfoGeran.ran = AccessNetwork::GERAN;
|
||||
|
||||
SignalThresholdInfo signalThresholdInfoUtran;
|
||||
signalThresholdInfoUtran.signalMeasurement = SignalThresholdInfo::SIGNAL_MEASUREMENT_TYPE_RSCP;
|
||||
signalThresholdInfoUtran.hysteresisMs = 5000;
|
||||
signalThresholdInfoUtran.hysteresisDb = 2;
|
||||
signalThresholdInfoUtran.thresholds = {-110, -97, -73, -49, -25};
|
||||
signalThresholdInfoUtran.isEnabled = true;
|
||||
signalThresholdInfoUtran.ran = AccessNetwork::UTRAN;
|
||||
|
||||
SignalThresholdInfo signalThresholdInfoEutran;
|
||||
signalThresholdInfoEutran.signalMeasurement = SignalThresholdInfo::SIGNAL_MEASUREMENT_TYPE_RSRP;
|
||||
signalThresholdInfoEutran.hysteresisMs = 5000;
|
||||
signalThresholdInfoEutran.hysteresisDb = 2;
|
||||
signalThresholdInfoEutran.thresholds = {-128, -108, -88, -68};
|
||||
signalThresholdInfoEutran.isEnabled = true;
|
||||
signalThresholdInfoEutran.ran = AccessNetwork::EUTRAN;
|
||||
|
||||
SignalThresholdInfo signalThresholdInfoCdma2000;
|
||||
signalThresholdInfoCdma2000.signalMeasurement =
|
||||
SignalThresholdInfo::SIGNAL_MEASUREMENT_TYPE_RSSI;
|
||||
signalThresholdInfoCdma2000.hysteresisMs = 5000;
|
||||
signalThresholdInfoCdma2000.hysteresisDb = 2;
|
||||
signalThresholdInfoCdma2000.thresholds = {-105, -90, -75, -65};
|
||||
signalThresholdInfoCdma2000.isEnabled = true;
|
||||
signalThresholdInfoCdma2000.ran = AccessNetwork::CDMA2000;
|
||||
|
||||
SignalThresholdInfo signalThresholdInfoNgran;
|
||||
signalThresholdInfoNgran.signalMeasurement =
|
||||
SignalThresholdInfo::SIGNAL_MEASUREMENT_TYPE_SSRSRP;
|
||||
signalThresholdInfoNgran.hysteresisMs = 5000;
|
||||
signalThresholdInfoNgran.hysteresisDb = 0;
|
||||
signalThresholdInfoNgran.thresholds = {-105, -90, -75, -65};
|
||||
signalThresholdInfoNgran.isEnabled = true;
|
||||
signalThresholdInfoNgran.ran = AccessNetwork::NGRAN;
|
||||
|
||||
const static std::vector<SignalThresholdInfo> candidateSignalThresholdInfos = {
|
||||
signalThresholdInfoGeran, signalThresholdInfoUtran, signalThresholdInfoEutran,
|
||||
signalThresholdInfoCdma2000, signalThresholdInfoNgran};
|
||||
|
||||
std::vector<SignalThresholdInfo> supportedSignalThresholdInfos;
|
||||
for (size_t i = 0; i < candidateSignalThresholdInfos.size(); i++) {
|
||||
serial = GetRandomSerialNumber();
|
||||
ndk::ScopedAStatus res = radio_network->setSignalStrengthReportingCriteria(
|
||||
serial, {candidateSignalThresholdInfos[i]});
|
||||
ASSERT_OK(res);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
if (radioRsp_network->rspInfo.error == RadioError::NONE) {
|
||||
supportedSignalThresholdInfos.push_back(signalThresholdInfoGeran);
|
||||
} else {
|
||||
// Refer to IRadioNetworkResponse#setSignalStrengthReportingCriteriaResponse
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_network->rspInfo.error,
|
||||
{RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE}));
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_FALSE(supportedSignalThresholdInfos.empty());
|
||||
|
||||
serial = GetRandomSerialNumber();
|
||||
ndk::ScopedAStatus res = radio_network->setSignalStrengthReportingCriteria(
|
||||
serial, supportedSignalThresholdInfos);
|
||||
ASSERT_OK(res);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
|
||||
|
||||
ALOGI("setSignalStrengthReportingCriteria_multiRansPerRequest, rspInfo.error = %s\n",
|
||||
toString(radioRsp_network->rspInfo.error).c_str());
|
||||
|
||||
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::NONE}));
|
||||
}
|
||||
|
||||
/*
|
||||
* Test IRadioNetwork.setLinkCapacityReportingCriteria() invalid hysteresisDlKbps
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue