Merge "Add documentation for Aware suspend & resume" into udc-dev
diff --git a/radio/aidl/vts/radio_aidl_hal_utils.cpp b/radio/aidl/vts/radio_aidl_hal_utils.cpp
index f18da55..64969de 100644
--- a/radio/aidl/vts/radio_aidl_hal_utils.cpp
+++ b/radio/aidl/vts/radio_aidl_hal_utils.cpp
@@ -16,7 +16,6 @@
#define LOG_TAG "RadioTest"
#include "radio_aidl_hal_utils.h"
-#include <iostream>
#include "VtsCoreUtil.h"
#include "radio_config_utils.h"
#include "radio_sim_utils.h"
@@ -144,11 +143,25 @@
return true;
}
+void RadioServiceTest::SetUp() {
+ ALOGD("BEGIN %s#%s", ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name(),
+ ::testing::UnitTest::GetInstance()->current_test_info()->name());
+ count_ = 0;
+ serial = -1;
+}
+
+void RadioServiceTest::TearDown() {
+ count_ = 0;
+ serial = -1;
+ ALOGD("END %s#%s", ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name(),
+ ::testing::UnitTest::GetInstance()->current_test_info()->name());
+}
+
/*
* Notify that the response message is received.
*/
void RadioServiceTest::notify(int receivedSerial) {
- std::unique_lock<std::mutex> lock(mtx_);
+ std::lock_guard<std::mutex> lock(mtx_);
if (serial == receivedSerial) {
count_++;
cv_.notify_one();
diff --git a/radio/aidl/vts/radio_aidl_hal_utils.h b/radio/aidl/vts/radio_aidl_hal_utils.h
index d515e1a..09c4f14 100644
--- a/radio/aidl/vts/radio_aidl_hal_utils.h
+++ b/radio/aidl/vts/radio_aidl_hal_utils.h
@@ -25,7 +25,6 @@
#include <aidl/android/hardware/radio/sim/CardStatus.h>
#include <aidl/android/hardware/radio/sim/IRadioSim.h>
#include <utils/Log.h>
-#include <vector>
using namespace aidl::android::hardware::radio;
using aidl::android::hardware::radio::config::SimSlotStatus;
@@ -133,14 +132,15 @@
/**
* RadioServiceTest base class
*/
-class RadioServiceTest {
+class RadioServiceTest : public ::testing::TestWithParam<std::string> {
protected:
- std::mutex mtx_;
- std::condition_variable cv_;
std::shared_ptr<config::IRadioConfig> radio_config;
std::shared_ptr<sim::IRadioSim> radio_sim;
public:
+ void SetUp() override;
+ void TearDown() override;
+
/* Used as a mechanism to inform the test about data/event callback */
void notify(int receivedSerial);
@@ -155,4 +155,8 @@
/* Update SIM slot status */
void updateSimSlotStatus(int physicalSlotId);
+
+ private:
+ std::mutex mtx_;
+ std::condition_variable cv_;
};
diff --git a/radio/aidl/vts/radio_config_test.cpp b/radio/aidl/vts/radio_config_test.cpp
index c979d28..aed3b05 100644
--- a/radio/aidl/vts/radio_config_test.cpp
+++ b/radio/aidl/vts/radio_config_test.cpp
@@ -14,7 +14,6 @@
* limitations under the License.
*/
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_config_utils.h"
@@ -22,6 +21,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioConfigTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
radio_config = IRadioConfig::fromBinder(
@@ -31,8 +31,6 @@
radioRsp_config = ndk::SharedRefBase::make<RadioConfigResponse>(*this);
ASSERT_NE(nullptr, radioRsp_config.get());
- count_ = 0;
-
radioInd_config = ndk::SharedRefBase::make<RadioConfigIndication>(*this);
ASSERT_NE(nullptr, radioInd_config.get());
diff --git a/radio/aidl/vts/radio_config_utils.h b/radio/aidl/vts/radio_config_utils.h
index 3db430d..f79aedb 100644
--- a/radio/aidl/vts/radio_config_utils.h
+++ b/radio/aidl/vts/radio_config_utils.h
@@ -74,9 +74,10 @@
};
// The main test class for Radio AIDL Config.
-class RadioConfigTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioConfigTest : public RadioServiceTest {
public:
- virtual void SetUp() override;
+ void SetUp() override;
+
ndk::ScopedAStatus updateSimCardStatus();
/* Override updateSimSlotStatus in RadioServiceTest to not call setResponseFunctions */
void updateSimSlotStatus();
diff --git a/radio/aidl/vts/radio_data_test.cpp b/radio/aidl/vts/radio_data_test.cpp
index 3eedc14..0fb2fb4 100644
--- a/radio/aidl/vts/radio_data_test.cpp
+++ b/radio/aidl/vts/radio_data_test.cpp
@@ -17,7 +17,6 @@
#include <aidl/android/hardware/radio/RadioAccessFamily.h>
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <aidl/android/hardware/radio/data/ApnTypes.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_data_utils.h"
@@ -25,6 +24,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioDataTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -39,8 +39,6 @@
radioRsp_data = ndk::SharedRefBase::make<RadioDataResponse>(*this);
ASSERT_NE(nullptr, radioRsp_data.get());
- count_ = 0;
-
radioInd_data = ndk::SharedRefBase::make<RadioDataIndication>(*this);
ASSERT_NE(nullptr, radioInd_data.get());
@@ -555,7 +553,6 @@
* Test IRadioData.getDataCallList() for the response returned.
*/
TEST_P(RadioDataTest, getDataCallList) {
- LOG(DEBUG) << "getDataCallList";
serial = GetRandomSerialNumber();
radio_data->getDataCallList(serial);
@@ -569,14 +566,12 @@
radioRsp_data->rspInfo.error,
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT}));
}
- LOG(DEBUG) << "getDataCallList finished";
}
/*
* Test IRadioData.setDataAllowed() for the response returned.
*/
TEST_P(RadioDataTest, setDataAllowed) {
- LOG(DEBUG) << "setDataAllowed";
serial = GetRandomSerialNumber();
bool allow = true;
@@ -589,5 +584,4 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_data->rspInfo.error);
}
- LOG(DEBUG) << "setDataAllowed finished";
}
diff --git a/radio/aidl/vts/radio_data_utils.h b/radio/aidl/vts/radio_data_utils.h
index fb91ef6..0959207 100644
--- a/radio/aidl/vts/radio_data_utils.h
+++ b/radio/aidl/vts/radio_data_utils.h
@@ -100,13 +100,13 @@
};
// The main test class for Radio AIDL Data.
-class RadioDataTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioDataTest : public RadioServiceTest {
protected:
/* Get current data call list */
ndk::ScopedAStatus getDataCallList();
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio data service handle */
std::shared_ptr<IRadioData> radio_data;
diff --git a/radio/aidl/vts/radio_ims_test.cpp b/radio/aidl/vts/radio_ims_test.cpp
index 289d3ed..1938e0a 100644
--- a/radio/aidl/vts/radio_ims_test.cpp
+++ b/radio/aidl/vts/radio_ims_test.cpp
@@ -15,7 +15,6 @@
*/
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_ims_utils.h"
@@ -23,6 +22,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioImsTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -37,8 +37,6 @@
radioRsp_ims = ndk::SharedRefBase::make<RadioImsResponse>(*this);
ASSERT_NE(nullptr, radioRsp_ims.get());
- count_ = 0;
-
radioInd_ims = ndk::SharedRefBase::make<RadioImsIndication>(*this);
ASSERT_NE(nullptr, radioInd_ims.get());
diff --git a/radio/aidl/vts/radio_ims_utils.h b/radio/aidl/vts/radio_ims_utils.h
index 2bf80dc..208c94b 100644
--- a/radio/aidl/vts/radio_ims_utils.h
+++ b/radio/aidl/vts/radio_ims_utils.h
@@ -76,12 +76,12 @@
};
// The main test class for Radio AIDL Ims.
-class RadioImsTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioImsTest : public RadioServiceTest {
protected:
virtual void verifyError(RadioError resp);
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio ims service handle */
std::shared_ptr<IRadioIms> radio_ims;
diff --git a/radio/aidl/vts/radio_imsmedia_test.cpp b/radio/aidl/vts/radio_imsmedia_test.cpp
index 2b6f5ef..425f6b4 100644
--- a/radio/aidl/vts/radio_imsmedia_test.cpp
+++ b/radio/aidl/vts/radio_imsmedia_test.cpp
@@ -15,7 +15,6 @@
*/
#include <aidl/android/hardware/radio/ims/media/MediaDirection.h>
-#include <android-base/logging.h>
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
#include <sys/socket.h>
@@ -25,10 +24,9 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioImsMediaTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
- ALOGD("Enter RadioImsMediaTest.");
-
radio_imsmedia = IImsMedia::fromBinder(
ndk::SpAIBinder(AServiceManager_waitForService(GetParam().c_str())));
ASSERT_NE(nullptr, radio_imsmedia.get());
@@ -38,7 +36,6 @@
radio_imsmediasessionlistener = ndk::SharedRefBase::make<ImsMediaSessionListener>(*this);
ASSERT_NE(nullptr, radio_imsmediasessionlistener.get());
- count_ = 0;
}
TEST_P(RadioImsMediaTest, MOCallSuccess) {
diff --git a/radio/aidl/vts/radio_imsmedia_utils.h b/radio/aidl/vts/radio_imsmedia_utils.h
index 6143add..87f1b00 100644
--- a/radio/aidl/vts/radio_imsmedia_utils.h
+++ b/radio/aidl/vts/radio_imsmedia_utils.h
@@ -79,13 +79,13 @@
};
/* The main test class for Radio AIDL ImsMedia. */
-class RadioImsMediaTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioImsMediaTest : public RadioServiceTest {
protected:
virtual void verifyError(RtpError inError);
virtual ndk::ScopedAStatus triggerOpenSession(int32_t sessionId);
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio imsmedia service handle */
std::shared_ptr<IImsMedia> radio_imsmedia;
diff --git a/radio/aidl/vts/radio_messaging_test.cpp b/radio/aidl/vts/radio_messaging_test.cpp
index 9f1718b..4ab88d2 100644
--- a/radio/aidl/vts/radio_messaging_test.cpp
+++ b/radio/aidl/vts/radio_messaging_test.cpp
@@ -15,7 +15,6 @@
*/
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_messaging_utils.h"
@@ -23,6 +22,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioMessagingTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -37,8 +37,6 @@
radioRsp_messaging = ndk::SharedRefBase::make<RadioMessagingResponse>(*this);
ASSERT_NE(nullptr, radioRsp_messaging.get());
- count_ = 0;
-
radioInd_messaging = ndk::SharedRefBase::make<RadioMessagingIndication>(*this);
ASSERT_NE(nullptr, radioInd_messaging.get());
@@ -61,7 +59,6 @@
* Test IRadioMessaging.sendSms() for the response returned.
*/
TEST_P(RadioMessagingTest, sendSms) {
- LOG(DEBUG) << "sendSms";
serial = GetRandomSerialNumber();
GsmSmsMessage msg;
msg.smscPdu = "";
@@ -80,14 +77,12 @@
CHECK_GENERAL_ERROR));
EXPECT_EQ(0, radioRsp_messaging->sendSmsResult.errorCode);
}
- LOG(DEBUG) << "sendSms finished";
}
/*
* Test IRadioMessaging.sendSmsExpectMore() for the response returned.
*/
TEST_P(RadioMessagingTest, sendSmsExpectMore) {
- LOG(DEBUG) << "sendSmsExpectMore";
serial = GetRandomSerialNumber();
GsmSmsMessage msg;
msg.smscPdu = "";
@@ -105,14 +100,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendSmsExpectMore finished";
}
/*
* Test IRadioMessaging.sendCdmaSms() for the response returned.
*/
TEST_P(RadioMessagingTest, sendCdmaSms) {
- LOG(DEBUG) << "sendCdmaSms";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAddress
@@ -151,7 +144,6 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendCdmaSms finished";
}
/*
@@ -202,7 +194,6 @@
* Test IRadioMessaging.setGsmBroadcastConfig() for the response returned.
*/
TEST_P(RadioMessagingTest, setGsmBroadcastConfig) {
- LOG(DEBUG) << "setGsmBroadcastConfig";
serial = GetRandomSerialNumber();
// Create GsmBroadcastSmsConfigInfo #1
@@ -260,14 +251,12 @@
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setGsmBroadcastConfig finished";
}
/*
* Test IRadioMessaging.getGsmBroadcastConfig() for the response returned.
*/
TEST_P(RadioMessagingTest, getGsmBroadcastConfig) {
- LOG(DEBUG) << "getGsmBroadcastConfig";
serial = GetRandomSerialNumber();
radio_messaging->getGsmBroadcastConfig(serial);
@@ -282,14 +271,12 @@
{RadioError::NONE, RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getGsmBroadcastConfig finished";
}
/*
* Test IRadioMessaging.setCdmaBroadcastConfig() for the response returned.
*/
TEST_P(RadioMessagingTest, setCdmaBroadcastConfig) {
- LOG(DEBUG) << "setCdmaBroadcastConfig";
serial = GetRandomSerialNumber();
CdmaBroadcastSmsConfigInfo cbSmsConfig;
@@ -310,14 +297,12 @@
{RadioError::NONE, RadioError::INVALID_MODEM_STATE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setCdmaBroadcastConfig finished";
}
/*
* Test IRadioMessaging.getCdmaBroadcastConfig() for the response returned.
*/
TEST_P(RadioMessagingTest, getCdmaBroadcastConfig) {
- LOG(DEBUG) << "getCdmaBroadcastConfig";
serial = GetRandomSerialNumber();
radio_messaging->getCdmaBroadcastConfig(serial);
@@ -330,14 +315,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_messaging->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getCdmaBroadcastConfig finished";
}
/*
* Test IRadioMessaging.setCdmaBroadcastActivation() for the response returned.
*/
TEST_P(RadioMessagingTest, setCdmaBroadcastActivation) {
- LOG(DEBUG) << "setCdmaBroadcastActivation";
serial = GetRandomSerialNumber();
bool activate = false;
@@ -352,14 +335,12 @@
{RadioError::NONE, RadioError::INVALID_ARGUMENTS},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setCdmaBroadcastActivation finished";
}
/*
* Test IRadioMessaging.setGsmBroadcastActivation() for the response returned.
*/
TEST_P(RadioMessagingTest, setGsmBroadcastActivation) {
- LOG(DEBUG) << "setGsmBroadcastActivation";
serial = GetRandomSerialNumber();
bool activate = false;
@@ -376,14 +357,12 @@
RadioError::INVALID_STATE, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setGsmBroadcastActivation finished";
}
/*
* Test IRadioMessaging.acknowledgeLastIncomingGsmSms() for the response returned.
*/
TEST_P(RadioMessagingTest, acknowledgeLastIncomingGsmSms) {
- LOG(DEBUG) << "acknowledgeLastIncomingGsmSms";
serial = GetRandomSerialNumber();
bool success = true;
@@ -399,14 +378,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "acknowledgeLastIncomingGsmSms finished";
}
/*
* Test IRadioMessaging.acknowledgeIncomingGsmSmsWithPdu() for the response returned.
*/
TEST_P(RadioMessagingTest, acknowledgeIncomingGsmSmsWithPdu) {
- LOG(DEBUG) << "acknowledgeIncomingGsmSmsWithPdu";
serial = GetRandomSerialNumber();
bool success = true;
std::string ackPdu = "";
@@ -422,14 +399,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::NO_SMS_TO_ACK},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "acknowledgeIncomingGsmSmsWithPdu finished";
}
/*
* Test IRadioMessaging.acknowledgeLastIncomingCdmaSms() for the response returned.
*/
TEST_P(RadioMessagingTest, acknowledgeLastIncomingCdmaSms) {
- LOG(DEBUG) << "acknowledgeLastIncomingCdmaSms";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAck
@@ -448,14 +423,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::NO_SMS_TO_ACK},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "acknowledgeLastIncomingCdmaSms finished";
}
/*
* Test IRadioMessaging.sendImsSms() for the response returned.
*/
TEST_P(RadioMessagingTest, sendImsSms) {
- LOG(DEBUG) << "sendImsSms";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAddress
@@ -482,7 +455,7 @@
cdmaSmsMessage.bearerData =
(std::vector<uint8_t>){15, 0, 3, 32, 3, 16, 1, 8, 16, 53, 76, 68, 6, 51, 106, 0};
- // Creata an ImsSmsMessage
+ // Create an ImsSmsMessage
ImsSmsMessage msg;
msg.tech = RadioTechnologyFamily::THREE_GPP2;
msg.retry = false;
@@ -500,14 +473,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_messaging->rspInfo.error,
{RadioError::INVALID_ARGUMENTS}, CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendImsSms finished";
}
/*
* Test IRadioMessaging.getSmscAddress() for the response returned.
*/
TEST_P(RadioMessagingTest, getSmscAddress) {
- LOG(DEBUG) << "getSmscAddress";
serial = GetRandomSerialNumber();
radio_messaging->getSmscAddress(serial);
@@ -522,14 +493,12 @@
RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getSmscAddress finished";
}
/*
* Test IRadioMessaging.setSmscAddress() for the response returned.
*/
TEST_P(RadioMessagingTest, setSmscAddress) {
- LOG(DEBUG) << "setSmscAddress";
serial = GetRandomSerialNumber();
std::string address = std::string("smscAddress");
@@ -545,14 +514,12 @@
RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setSmscAddress finished";
}
/*
* Test IRadioMessaging.writeSmsToSim() for the response returned.
*/
TEST_P(RadioMessagingTest, writeSmsToSim) {
- LOG(DEBUG) << "writeSmsToSim";
serial = GetRandomSerialNumber();
SmsWriteArgs smsWriteArgs;
smsWriteArgs.status = SmsWriteArgs::STATUS_REC_UNREAD;
@@ -573,14 +540,12 @@
RadioError::NETWORK_NOT_READY, RadioError::NO_RESOURCES, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "writeSmsToSim finished";
}
/*
* Test IRadioMessaging.deleteSmsOnSim() for the response returned.
*/
TEST_P(RadioMessagingTest, deleteSmsOnSim) {
- LOG(DEBUG) << "deleteSmsOnSim";
serial = GetRandomSerialNumber();
int index = 1;
@@ -598,14 +563,12 @@
RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "deleteSmsOnSim finished";
}
/*
* Test IRadioMessaging.writeSmsToRuim() for the response returned.
*/
TEST_P(RadioMessagingTest, writeSmsToRuim) {
- LOG(DEBUG) << "writeSmsToRuim";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAddress
@@ -651,14 +614,12 @@
RadioError::NO_SUCH_ENTRY, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "writeSmsToRuim finished";
}
/*
* Test IRadioMessaging.deleteSmsOnRuim() for the response returned.
*/
TEST_P(RadioMessagingTest, deleteSmsOnRuim) {
- LOG(DEBUG) << "deleteSmsOnRuim";
serial = GetRandomSerialNumber();
int index = 1;
@@ -704,14 +665,12 @@
RadioError::MODEM_ERR, RadioError::NO_SUCH_ENTRY, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "deleteSmsOnRuim finished";
}
/*
* Test IRadioMessaging.reportSmsMemoryStatus() for the response returned.
*/
TEST_P(RadioMessagingTest, reportSmsMemoryStatus) {
- LOG(DEBUG) << "reportSmsMemoryStatus";
serial = GetRandomSerialNumber();
bool available = true;
@@ -727,5 +686,4 @@
RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "reportSmsMemoryStatus finished";
}
diff --git a/radio/aidl/vts/radio_messaging_utils.h b/radio/aidl/vts/radio_messaging_utils.h
index 7b66192..3bd8346 100644
--- a/radio/aidl/vts/radio_messaging_utils.h
+++ b/radio/aidl/vts/radio_messaging_utils.h
@@ -132,9 +132,9 @@
};
// The main test class for Radio AIDL Messaging.
-class RadioMessagingTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioMessagingTest : public RadioServiceTest {
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio messaging service handle */
std::shared_ptr<IRadioMessaging> radio_messaging;
diff --git a/radio/aidl/vts/radio_modem_test.cpp b/radio/aidl/vts/radio_modem_test.cpp
index 67747a8..c48a461 100644
--- a/radio/aidl/vts/radio_modem_test.cpp
+++ b/radio/aidl/vts/radio_modem_test.cpp
@@ -15,7 +15,6 @@
*/
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_modem_utils.h"
@@ -23,6 +22,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioModemTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -37,8 +37,6 @@
radioRsp_modem = ndk::SharedRefBase::make<RadioModemResponse>(*this);
ASSERT_NE(nullptr, radioRsp_modem.get());
- count_ = 0;
-
radioInd_modem = ndk::SharedRefBase::make<RadioModemIndication>(*this);
ASSERT_NE(nullptr, radioInd_modem.get());
@@ -154,7 +152,6 @@
* Test IRadioModem.getBasebandVersion() for the response returned.
*/
TEST_P(RadioModemTest, getBasebandVersion) {
- LOG(DEBUG) << "getBasebandVersion";
serial = GetRandomSerialNumber();
radio_modem->getBasebandVersion(serial);
@@ -165,14 +162,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_modem->rspInfo.error);
}
- LOG(DEBUG) << "getBasebandVersion finished";
}
/*
* Test IRadioModem.getDeviceIdentity() for the response returned.
*/
TEST_P(RadioModemTest, getDeviceIdentity) {
- LOG(DEBUG) << "getDeviceIdentity";
serial = GetRandomSerialNumber();
radio_modem->getDeviceIdentity(serial);
@@ -184,7 +179,6 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error,
{RadioError::NONE, RadioError::EMPTY_RECORD}));
}
- LOG(DEBUG) << "getDeviceIdentity finished";
}
/*
@@ -198,7 +192,6 @@
ALOGI("Skipped the test since getImei is not supported on version < 2");
GTEST_SKIP();
}
- LOG(DEBUG) << "getImei";
serial = GetRandomSerialNumber();
radio_modem->getImei(serial);
@@ -210,14 +203,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error,
{RadioError::NONE, RadioError::EMPTY_RECORD}));
}
- LOG(DEBUG) << "getImei finished";
}
/*
* Test IRadioModem.nvReadItem() for the response returned.
*/
TEST_P(RadioModemTest, nvReadItem) {
- LOG(DEBUG) << "nvReadItem";
serial = GetRandomSerialNumber();
radio_modem->nvReadItem(serial, NvItem::LTE_BAND_ENABLE_25);
@@ -229,14 +220,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "nvReadItem finished";
}
/*
* Test IRadioModem.nvWriteItem() for the response returned.
*/
TEST_P(RadioModemTest, nvWriteItem) {
- LOG(DEBUG) << "nvWriteItem";
serial = GetRandomSerialNumber();
NvWriteItem item;
memset(&item, 0, sizeof(item));
@@ -251,14 +240,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "nvWriteItem finished";
}
/*
* Test IRadioModem.nvWriteCdmaPrl() for the response returned.
*/
TEST_P(RadioModemTest, nvWriteCdmaPrl) {
- LOG(DEBUG) << "nvWriteCdmaPrl";
serial = GetRandomSerialNumber();
std::vector<uint8_t> prl = {1, 2, 3, 4, 5};
@@ -271,14 +258,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "nvWriteCdmaPrl finished";
}
/*
* Test IRadioModem.nvResetConfig() for the response returned.
*/
TEST_P(RadioModemTest, nvResetConfig) {
- LOG(DEBUG) << "nvResetConfig";
serial = GetRandomSerialNumber();
radio_modem->nvResetConfig(serial, ResetNvType::FACTORY_RESET);
@@ -292,14 +277,12 @@
}
// wait until modem reset finishes
sleep(10);
- LOG(DEBUG) << "nvResetConfig finished";
}
/*
* Test IRadioModem.getHardwareConfig() for the response returned.
*/
TEST_P(RadioModemTest, getHardwareConfig) {
- LOG(DEBUG) << "getHardwareConfig";
serial = GetRandomSerialNumber();
radio_modem->getHardwareConfig(serial);
@@ -311,7 +294,6 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getHardwareConfig finished";
}
/*
@@ -337,7 +319,6 @@
* Test IRadioModem.getRadioCapability() for the response returned.
*/
TEST_P(RadioModemTest, getRadioCapability) {
- LOG(DEBUG) << "getRadioCapability";
serial = GetRandomSerialNumber();
radio_modem->getRadioCapability(serial);
@@ -348,14 +329,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_modem->rspInfo.error);
}
- LOG(DEBUG) << "getRadioCapability finished";
}
/*
* Test IRadioModem.setRadioCapability() for the response returned.
*/
TEST_P(RadioModemTest, setRadioCapability) {
- LOG(DEBUG) << "setRadioCapability";
serial = GetRandomSerialNumber();
RadioCapability rc;
memset(&rc, 0, sizeof(rc));
@@ -371,14 +350,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setRadioCapability finished";
}
/*
* Test IRadioModem.getModemActivityInfo() for the response returned.
*/
TEST_P(RadioModemTest, getModemActivityInfo) {
- LOG(DEBUG) << "getModemActivityInfo";
serial = GetRandomSerialNumber();
radio_modem->getModemActivityInfo(serial);
@@ -390,14 +367,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "getModemActivityInfo finished";
}
/*
* Test IRadioModem.sendDeviceState() for the response returned.
*/
TEST_P(RadioModemTest, sendDeviceState) {
- LOG(DEBUG) << "sendDeviceState";
serial = GetRandomSerialNumber();
radio_modem->sendDeviceState(serial, DeviceStateType::POWER_SAVE_MODE, true);
@@ -411,5 +386,4 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_modem->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "sendDeviceState finished";
}
diff --git a/radio/aidl/vts/radio_modem_utils.h b/radio/aidl/vts/radio_modem_utils.h
index d2f5a10..d47bdeb 100644
--- a/radio/aidl/vts/radio_modem_utils.h
+++ b/radio/aidl/vts/radio_modem_utils.h
@@ -112,9 +112,9 @@
};
// The main test class for Radio AIDL Modem.
-class RadioModemTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioModemTest : public RadioServiceTest {
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio modem service handle */
std::shared_ptr<IRadioModem> radio_modem;
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 0344dd6..e5da050 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -17,7 +17,6 @@
#include <aidl/android/hardware/radio/RadioAccessFamily.h>
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <aidl/android/hardware/radio/network/IndicationFilter.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_network_utils.h"
@@ -25,6 +24,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioNetworkTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -39,8 +39,6 @@
radioRsp_network = ndk::SharedRefBase::make<RadioNetworkResponse>(*this);
ASSERT_NE(nullptr, radioRsp_network.get());
- count_ = 0;
-
radioInd_network = ndk::SharedRefBase::make<RadioNetworkIndication>(*this);
ASSERT_NE(nullptr, radioInd_network.get());
@@ -1665,7 +1663,6 @@
* Test IRadioNetwork.getOperator() for the response returned.
*/
TEST_P(RadioNetworkTest, getOperator) {
- LOG(DEBUG) << "getOperator";
serial = GetRandomSerialNumber();
radio_network->getOperator(serial);
@@ -1676,14 +1673,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_network->rspInfo.error);
}
- LOG(DEBUG) << "getOperator finished";
}
/*
* Test IRadioNetwork.getNetworkSelectionMode() for the response returned.
*/
TEST_P(RadioNetworkTest, getNetworkSelectionMode) {
- LOG(DEBUG) << "getNetworkSelectionMode";
serial = GetRandomSerialNumber();
radio_network->getNetworkSelectionMode(serial);
@@ -1694,14 +1689,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_network->rspInfo.error);
}
- LOG(DEBUG) << "getNetworkSelectionMode finished";
}
/*
* Test IRadioNetwork.setNetworkSelectionModeAutomatic() for the response returned.
*/
TEST_P(RadioNetworkTest, setNetworkSelectionModeAutomatic) {
- LOG(DEBUG) << "setNetworkSelectionModeAutomatic";
serial = GetRandomSerialNumber();
radio_network->setNetworkSelectionModeAutomatic(serial);
@@ -1715,14 +1708,12 @@
RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setNetworkSelectionModeAutomatic finished";
}
/*
* Test IRadioNetwork.getAvailableNetworks() for the response returned.
*/
TEST_P(RadioNetworkTest, getAvailableNetworks) {
- LOG(DEBUG) << "getAvailableNetworks";
serial = GetRandomSerialNumber();
radio_network->getAvailableNetworks(serial);
@@ -1738,14 +1729,12 @@
RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getAvailableNetworks finished";
}
/*
* Test IRadioNetwork.setBandMode() for the response returned.
*/
TEST_P(RadioNetworkTest, setBandMode) {
- LOG(DEBUG) << "setBandMode";
serial = GetRandomSerialNumber();
radio_network->setBandMode(serial, RadioBandMode::BAND_MODE_USA);
@@ -1757,14 +1746,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setBandMode finished";
}
/*
* Test IRadioNetwork.setLocationUpdates() for the response returned.
*/
TEST_P(RadioNetworkTest, setLocationUpdates) {
- LOG(DEBUG) << "setLocationUpdates";
serial = GetRandomSerialNumber();
radio_network->setLocationUpdates(serial, true);
@@ -1776,14 +1763,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::SIM_ABSENT}));
}
- LOG(DEBUG) << "setLocationUpdates finished";
}
/*
* Test IRadioNetwork.setCdmaRoamingPreference() for the response returned.
*/
TEST_P(RadioNetworkTest, setCdmaRoamingPreference) {
- LOG(DEBUG) << "setCdmaRoamingPreference";
serial = GetRandomSerialNumber();
radio_network->setCdmaRoamingPreference(serial, CdmaRoamingType::HOME_NETWORK);
@@ -1796,14 +1781,12 @@
radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "setCdmaRoamingPreference finished";
}
/*
* Test IRadioNetwork.getCdmaRoamingPreference() for the response returned.
*/
TEST_P(RadioNetworkTest, getCdmaRoamingPreference) {
- LOG(DEBUG) << "getCdmaRoamingPreference";
serial = GetRandomSerialNumber();
radio_network->getCdmaRoamingPreference(serial);
@@ -1817,14 +1800,12 @@
{RadioError::NONE, RadioError::SIM_ABSENT, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getCdmaRoamingPreference finished";
}
/*
* Test IRadioNetwork.getVoiceRadioTechnology() for the response returned.
*/
TEST_P(RadioNetworkTest, getVoiceRadioTechnology) {
- LOG(DEBUG) << "getVoiceRadioTechnology";
serial = GetRandomSerialNumber();
radio_network->getVoiceRadioTechnology(serial);
@@ -1835,14 +1816,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_network->rspInfo.error);
}
- LOG(DEBUG) << "getVoiceRadioTechnology finished";
}
/*
* Test IRadioNetwork.setCellInfoListRate() for the response returned.
*/
TEST_P(RadioNetworkTest, setCellInfoListRate) {
- LOG(DEBUG) << "setCellInfoListRate";
serial = GetRandomSerialNumber();
radio_network->setCellInfoListRate(serial, 10);
@@ -1854,14 +1833,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "setCellInfoListRate finished";
}
/*
* Test IRadioNetwork.supplyNetworkDepersonalization() for the response returned.
*/
TEST_P(RadioNetworkTest, supplyNetworkDepersonalization) {
- LOG(DEBUG) << "supplyNetworkDepersonalization";
serial = GetRandomSerialNumber();
radio_network->supplyNetworkDepersonalization(serial, std::string("test"));
@@ -1876,7 +1853,6 @@
RadioError::INVALID_SIM_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::PASSWORD_INCORRECT, RadioError::SIM_ABSENT, RadioError::SYSTEM_ERR}));
}
- LOG(DEBUG) << "supplyNetworkDepersonalization finished";
}
/*
@@ -1891,7 +1867,6 @@
GTEST_SKIP();
}
- LOG(DEBUG) << "setEmergencyMode";
serial = GetRandomSerialNumber();
radio_network->setEmergencyMode(serial, EmergencyMode::EMERGENCY_WWAN);
@@ -1907,8 +1882,6 @@
// exit emergency mode for other tests
serial = GetRandomSerialNumber();
radio_network->exitEmergencyMode(serial);
-
- LOG(DEBUG) << "setEmergencyMode finished";
}
/*
@@ -1924,7 +1897,6 @@
GTEST_SKIP();
}
- LOG(DEBUG) << "triggerEmergencyNetworkScan";
serial = GetRandomSerialNumber();
EmergencyNetworkScanTrigger scanRequest;
@@ -1940,7 +1912,6 @@
radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::RADIO_NOT_AVAILABLE,
RadioError::MODEM_ERR, RadioError::INVALID_ARGUMENTS}));
- LOG(DEBUG) << "triggerEmergencyNetworkScan finished";
}
/*
@@ -1955,7 +1926,6 @@
GTEST_SKIP();
}
- LOG(DEBUG) << "cancelEmergencyNetworkScan";
serial = GetRandomSerialNumber();
radio_network->cancelEmergencyNetworkScan(serial, true);
@@ -1963,11 +1933,9 @@
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}));
- LOG(DEBUG) << "cancelEmergencyNetworkScan finished";
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
}
/*
@@ -1982,7 +1950,6 @@
GTEST_SKIP();
}
- LOG(DEBUG) << "exitEmergencyMode";
serial = GetRandomSerialNumber();
radio_network->exitEmergencyMode(serial);
@@ -1990,11 +1957,9 @@
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}));
- LOG(DEBUG) << "exitEmergencyMode finished";
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
+ RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
}
/*
@@ -2073,7 +2038,6 @@
GTEST_SKIP();
}
- LOG(DEBUG) << "setNullCipherAndIntegrityEnabled";
serial = GetRandomSerialNumber();
radio_network->setNullCipherAndIntegrityEnabled(serial, false);
@@ -2084,7 +2048,6 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED,
RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
- LOG(DEBUG) << "setNullCipherAndIntegrityEnabled finished";
}
/**
@@ -2100,7 +2063,6 @@
GTEST_SKIP();
}
- LOG(DEBUG) << "isNullCipherAndIntegrityEnabled";
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = radio_network->isNullCipherAndIntegrityEnabled(serial);
@@ -2113,5 +2075,4 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_network->rspInfo.error,
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
RadioError::MODEM_ERR, RadioError::REQUEST_NOT_SUPPORTED}));
- LOG(DEBUG) << "isNullCipherAndIntegrityEnabled finished";
}
diff --git a/radio/aidl/vts/radio_network_utils.h b/radio/aidl/vts/radio_network_utils.h
index 601f044..8f8f6b0 100644
--- a/radio/aidl/vts/radio_network_utils.h
+++ b/radio/aidl/vts/radio_network_utils.h
@@ -229,9 +229,9 @@
};
// The main test class for Radio AIDL Network.
-class RadioNetworkTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioNetworkTest : public RadioServiceTest {
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio network service handle */
std::shared_ptr<IRadioNetwork> radio_network;
diff --git a/radio/aidl/vts/radio_sap_test.cpp b/radio/aidl/vts/radio_sap_test.cpp
index c94379c..9a1c145 100644
--- a/radio/aidl/vts/radio_sap_test.cpp
+++ b/radio/aidl/vts/radio_sap_test.cpp
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#include <android-base/logging.h>
+
#include <android/binder_manager.h>
#include "radio_sap_utils.h"
@@ -22,9 +22,13 @@
#define TIMEOUT_PERIOD 40
void SapTest::SetUp() {
+ ALOGD("BEGIN %s#%s", ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name(),
+ ::testing::UnitTest::GetInstance()->current_test_info()->name());
+ count = 0;
+ serial = -1;
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
- LOG(DEBUG) << "Skipped the test due to device configuration.";
+ ALOGI("Skipped the test due to device configuration.");
GTEST_SKIP();
}
sap = ISap::fromBinder(ndk::SpAIBinder(AServiceManager_waitForService(serviceName.c_str())));
@@ -33,13 +37,16 @@
sapCb = ndk::SharedRefBase::make<SapCallback>(*this);
ASSERT_NE(sapCb.get(), nullptr);
- count = 0;
-
ndk::ScopedAStatus res = sap->setCallback(sapCb);
ASSERT_OK(res) << res;
}
-void SapTest::TearDown() {}
+void SapTest::TearDown() {
+ count_ = 0;
+ serial = -1;
+ ALOGD("END %s#%s", ::testing::UnitTest::GetInstance()->current_test_info()->test_suite_name(),
+ ::testing::UnitTest::GetInstance()->current_test_info()->name());
+}
::testing::AssertionResult SapTest::CheckAnyOfErrors(SapResultCode err,
std::vector<SapResultCode> errors) {
@@ -52,9 +59,9 @@
}
void SapTest::notify(int receivedSerial) {
- std::unique_lock<std::mutex> lock(mtx);
- count++;
+ std::lock_guard<std::mutex> lock(mtx);
if (serial == receivedSerial) {
+ count++;
cv.notify_one();
}
}
@@ -78,7 +85,6 @@
* Test ISap.connectReq() for the response returned.
*/
TEST_P(SapTest, connectReq) {
- LOG(DEBUG) << "connectReq";
serial = GetRandomSerialNumber();
int32_t maxMsgSize = 100;
@@ -97,7 +103,6 @@
* Test ISap.disconnectReq() for the response returned
*/
TEST_P(SapTest, disconnectReq) {
- LOG(DEBUG) << "disconnectReq";
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = sap->disconnectReq(serial);
@@ -105,14 +110,12 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(sapCb->sapResponseSerial, serial);
- LOG(DEBUG) << "disconnectReq finished";
}
/*
* Test ISap.apduReq() for the response returned.
*/
TEST_P(SapTest, apduReq) {
- LOG(DEBUG) << "apduReq";
serial = GetRandomSerialNumber();
SapApduType sapApduType = SapApduType::APDU;
std::vector<uint8_t> command = {};
@@ -128,14 +131,12 @@
{SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_ALREADY_POWERED_OFF,
SapResultCode::CARD_NOT_ACCESSSIBLE, SapResultCode::CARD_REMOVED,
SapResultCode::SUCCESS}));
- LOG(DEBUG) << "apduReq finished";
}
/*
* Test ISap.transferAtrReq() for the response returned.
*/
TEST_P(SapTest, transferAtrReq) {
- LOG(DEBUG) << "transferAtrReq";
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = sap->transferAtrReq(serial);
@@ -148,14 +149,12 @@
{SapResultCode::GENERIC_FAILURE, SapResultCode::DATA_NOT_AVAILABLE,
SapResultCode::CARD_ALREADY_POWERED_OFF,
SapResultCode::CARD_REMOVED, SapResultCode::SUCCESS}));
- LOG(DEBUG) << "transferAtrReq finished";
}
/*
* Test ISap.powerReq() for the response returned.
*/
TEST_P(SapTest, powerReq) {
- LOG(DEBUG) << "powerReq";
serial = GetRandomSerialNumber();
bool state = true;
@@ -170,14 +169,12 @@
{SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_NOT_ACCESSSIBLE,
SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED,
SapResultCode::CARD_ALREADY_POWERED_ON, SapResultCode::SUCCESS}));
- LOG(DEBUG) << "powerReq finished";
}
/*
* Test ISap.resetSimReq() for the response returned.
*/
TEST_P(SapTest, resetSimReq) {
- LOG(DEBUG) << "resetSimReq";
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = sap->resetSimReq(serial);
@@ -191,14 +188,12 @@
{SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_NOT_ACCESSSIBLE,
SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED,
SapResultCode::SUCCESS}));
- LOG(DEBUG) << "resetSimReq finished";
}
/*
* Test ISap.transferCardReaderStatusReq() for the response returned.
*/
TEST_P(SapTest, transferCardReaderStatusReq) {
- LOG(DEBUG) << "transferCardReaderStatusReq";
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res = sap->transferCardReaderStatusReq(serial);
@@ -210,14 +205,12 @@
ASSERT_TRUE(CheckAnyOfErrors(sapCb->sapResultCode,
{SapResultCode::GENERIC_FAILURE, SapResultCode::DATA_NOT_AVAILABLE,
SapResultCode::SUCCESS}));
- LOG(DEBUG) << "transferCardReaderStatusReq finished";
}
/*
* Test ISap.setTransferProtocolReq() for the response returned.
*/
TEST_P(SapTest, setTransferProtocolReq) {
- LOG(DEBUG) << "setTransferProtocolReq";
serial = GetRandomSerialNumber();
SapTransferProtocol sapTransferProtocol = SapTransferProtocol::T0;
@@ -229,5 +222,4 @@
ASSERT_TRUE(CheckAnyOfErrors(sapCb->sapResultCode,
{SapResultCode::NOT_SUPPORTED, SapResultCode::SUCCESS}));
- LOG(DEBUG) << "setTransferProtocolReq finished";
}
diff --git a/radio/aidl/vts/radio_sim_test.cpp b/radio/aidl/vts/radio_sim_test.cpp
index f657142..d906588 100644
--- a/radio/aidl/vts/radio_sim_test.cpp
+++ b/radio/aidl/vts/radio_sim_test.cpp
@@ -16,7 +16,6 @@
#include <aidl/android/hardware/radio/RadioConst.h>
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_sim_utils.h"
@@ -24,6 +23,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioSimTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -38,8 +38,6 @@
radioRsp_sim = ndk::SharedRefBase::make<RadioSimResponse>(*this);
ASSERT_NE(nullptr, radioRsp_sim.get());
- count_ = 0;
-
radioInd_sim = ndk::SharedRefBase::make<RadioSimIndication>(*this);
ASSERT_NE(nullptr, radioInd_sim.get());
@@ -481,19 +479,16 @@
* Test IRadioSim.getIccCardStatus() for the response returned.
*/
TEST_P(RadioSimTest, getIccCardStatus) {
- LOG(DEBUG) << "getIccCardStatus";
EXPECT_LE(cardStatus.applications.size(), RadioConst::CARD_MAX_APPS);
EXPECT_LT(cardStatus.gsmUmtsSubscriptionAppIndex, RadioConst::CARD_MAX_APPS);
EXPECT_LT(cardStatus.cdmaSubscriptionAppIndex, RadioConst::CARD_MAX_APPS);
EXPECT_LT(cardStatus.imsSubscriptionAppIndex, RadioConst::CARD_MAX_APPS);
- LOG(DEBUG) << "getIccCardStatus finished";
}
/*
* Test IRadioSim.supplyIccPinForApp() for the response returned
*/
TEST_P(RadioSimTest, supplyIccPinForApp) {
- LOG(DEBUG) << "supplyIccPinForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -513,14 +508,12 @@
{RadioError::PASSWORD_INCORRECT, RadioError::REQUEST_NOT_SUPPORTED}));
}
}
- LOG(DEBUG) << "supplyIccPinForApp finished";
}
/*
* Test IRadioSim.supplyIccPukForApp() for the response returned.
*/
TEST_P(RadioSimTest, supplyIccPukForApp) {
- LOG(DEBUG) << "supplyIccPukForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -540,14 +533,12 @@
{RadioError::PASSWORD_INCORRECT, RadioError::INVALID_SIM_STATE}));
}
}
- LOG(DEBUG) << "supplyIccPukForApp finished";
}
/*
* Test IRadioSim.supplyIccPin2ForApp() for the response returned.
*/
TEST_P(RadioSimTest, supplyIccPin2ForApp) {
- LOG(DEBUG) << "supplyIccPin2ForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -568,14 +559,12 @@
RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_PUK2}));
}
}
- LOG(DEBUG) << "supplyIccPin2ForApp finished";
}
/*
* Test IRadioSim.supplyIccPuk2ForApp() for the response returned.
*/
TEST_P(RadioSimTest, supplyIccPuk2ForApp) {
- LOG(DEBUG) << "supplyIccPuk2ForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -595,14 +584,12 @@
{RadioError::PASSWORD_INCORRECT, RadioError::INVALID_SIM_STATE}));
}
}
- LOG(DEBUG) << "supplyIccPuk2ForApp finished";
}
/*
* Test IRadioSim.changeIccPinForApp() for the response returned.
*/
TEST_P(RadioSimTest, changeIccPinForApp) {
- LOG(DEBUG) << "changeIccPinForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -622,14 +609,12 @@
{RadioError::PASSWORD_INCORRECT, RadioError::REQUEST_NOT_SUPPORTED}));
}
}
- LOG(DEBUG) << "changeIccPinForApp finished";
}
/*
* Test IRadioSim.changeIccPin2ForApp() for the response returned.
*/
TEST_P(RadioSimTest, changeIccPin2ForApp) {
- LOG(DEBUG) << "changeIccPin2ForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -650,14 +635,12 @@
RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_PUK2}));
}
}
- LOG(DEBUG) << "changeIccPin2ForApp finished";
}
/*
* Test IRadioSim.getImsiForApp() for the response returned.
*/
TEST_P(RadioSimTest, getImsiForApp) {
- LOG(DEBUG) << "getImsiForApp";
serial = GetRandomSerialNumber();
// Check success returned while getting imsi for 3GPP and 3GPP2 apps only
@@ -681,14 +664,12 @@
}
}
}
- LOG(DEBUG) << "getImsiForApp finished";
}
/*
* Test IRadioSim.iccIoForApp() for the response returned.
*/
TEST_P(RadioSimTest, iccIoForApp) {
- LOG(DEBUG) << "iccIoForApp";
serial = GetRandomSerialNumber();
for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
@@ -708,14 +689,12 @@
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_sim->rspInfo.type);
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
}
- LOG(DEBUG) << "iccIoForApp finished";
}
/*
* Test IRadioSim.iccTransmitApduBasicChannel() for the response returned.
*/
TEST_P(RadioSimTest, iccTransmitApduBasicChannel) {
- LOG(DEBUG) << "iccTransmitApduBasicChannel";
serial = GetRandomSerialNumber();
SimApdu msg;
memset(&msg, 0, sizeof(msg));
@@ -725,14 +704,12 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_sim->rspInfo.type);
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
- LOG(DEBUG) << "iccTransmitApduBasicChannel finished";
}
/*
* Test IRadioSim.iccOpenLogicalChannel() for the response returned.
*/
TEST_P(RadioSimTest, iccOpenLogicalChannel) {
- LOG(DEBUG) << "iccOpenLogicalChannel";
serial = GetRandomSerialNumber();
int p2 = 0x04;
// Specified in ISO 7816-4 clause 7.1.1 0x04 means that FCP template is requested.
@@ -742,14 +719,12 @@
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_sim->rspInfo.type);
}
- LOG(DEBUG) << "iccOpenLogicalChannel finished";
}
/*
* Test IRadioSim.iccCloseLogicalChannel() for the response returned.
*/
TEST_P(RadioSimTest, iccCloseLogicalChannel) {
- LOG(DEBUG) << "iccCloseLogicalChannel";
serial = GetRandomSerialNumber();
// Try closing invalid channel and check INVALID_ARGUMENTS returned as error
radio_sim->iccCloseLogicalChannel(serial, 0);
@@ -758,7 +733,6 @@
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp_sim->rspInfo.error);
- LOG(DEBUG) << "iccCloseLogicalChannel finished";
}
/*
@@ -773,7 +747,6 @@
" iccCloseLogicalChannelWithSessionInfo is not supported on version < 2");
GTEST_SKIP();
}
- LOG(DEBUG) << "iccCloseLogicalChannelWithSessionInfo";
serial = GetRandomSerialNumber();
SessionInfo info;
memset(&info, 0, sizeof(info));
@@ -787,14 +760,12 @@
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp_sim->rspInfo.error);
- LOG(DEBUG) << "iccCloseLogicalChannelWithSessionInfo finished";
}
/*
* Test IRadioSim.iccTransmitApduLogicalChannel() for the response returned.
*/
TEST_P(RadioSimTest, iccTransmitApduLogicalChannel) {
- LOG(DEBUG) << "iccTransmitApduLogicalChannel";
serial = GetRandomSerialNumber();
SimApdu msg;
memset(&msg, 0, sizeof(msg));
@@ -804,14 +775,12 @@
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_sim->rspInfo.type);
EXPECT_EQ(serial, radioRsp_sim->rspInfo.serial);
- LOG(DEBUG) << "iccTransmitApduLogicalChannel finished";
}
/*
* Test IRadioSim.requestIccSimAuthentication() for the response returned.
*/
TEST_P(RadioSimTest, requestIccSimAuthentication) {
- LOG(DEBUG) << "requestIccSimAuthentication";
serial = GetRandomSerialNumber();
// Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS
@@ -826,7 +795,6 @@
radioRsp_sim->rspInfo.error,
{RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "requestIccSimAuthentication finished";
}
/*
@@ -880,7 +848,6 @@
* Test IRadioSim.getCdmaSubscription() for the response returned.
*/
TEST_P(RadioSimTest, getCdmaSubscription) {
- LOG(DEBUG) << "getCdmaSubscription";
serial = GetRandomSerialNumber();
radio_sim->getCdmaSubscription(serial);
@@ -893,14 +860,12 @@
radioRsp_sim->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
- LOG(DEBUG) << "getCdmaSubscription finished";
}
/*
* Test IRadioSim.getCdmaSubscriptionSource() for the response returned.
*/
TEST_P(RadioSimTest, getCdmaSubscriptionSource) {
- LOG(DEBUG) << "getCdmaSubscriptionSource";
serial = GetRandomSerialNumber();
radio_sim->getCdmaSubscriptionSource(serial);
@@ -913,14 +878,12 @@
radioRsp_sim->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
- LOG(DEBUG) << "getCdmaSubscriptionSource finished";
}
/*
* Test IRadioSim.setCdmaSubscriptionSource() for the response returned.
*/
TEST_P(RadioSimTest, setCdmaSubscriptionSource) {
- LOG(DEBUG) << "setCdmaSubscriptionSource";
serial = GetRandomSerialNumber();
radio_sim->setCdmaSubscriptionSource(serial, CdmaSubscriptionSource::RUIM_SIM);
@@ -934,14 +897,12 @@
{RadioError::NONE, RadioError::SIM_ABSENT, RadioError::SUBSCRIPTION_NOT_AVAILABLE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setCdmaSubscriptionSource finished";
}
/*
* Test IRadioSim.setUiccSubscription() for the response returned.
*/
TEST_P(RadioSimTest, setUiccSubscription) {
- LOG(DEBUG) << "setUiccSubscription";
serial = GetRandomSerialNumber();
SelectUiccSub item;
memset(&item, 0, sizeof(item));
@@ -958,14 +919,12 @@
RadioError::MODEM_ERR, RadioError::SUBSCRIPTION_NOT_SUPPORTED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setUiccSubscription finished";
}
/*
* Test IRadioSim.sendEnvelope() for the response returned.
*/
TEST_P(RadioSimTest, sendEnvelope) {
- LOG(DEBUG) << "sendEnvelope";
serial = GetRandomSerialNumber();
// Test with sending empty string
@@ -983,14 +942,12 @@
RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendEnvelope finished";
}
/*
* Test IRadioSim.sendTerminalResponseToSim() for the response returned.
*/
TEST_P(RadioSimTest, sendTerminalResponseToSim) {
- LOG(DEBUG) << "sendTerminalResponseToSim";
serial = GetRandomSerialNumber();
// Test with sending empty string
@@ -1008,14 +965,12 @@
{RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendTerminalResponseToSim finished";
}
/*
* Test IRadioSim.reportStkServiceIsRunning() for the response returned.
*/
TEST_P(RadioSimTest, reportStkServiceIsRunning) {
- LOG(DEBUG) << "reportStkServiceIsRunning";
serial = GetRandomSerialNumber();
radio_sim->reportStkServiceIsRunning(serial);
@@ -1028,7 +983,6 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_sim->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "reportStkServiceIsRunning finished";
}
/*
@@ -1036,7 +990,6 @@
* string.
*/
TEST_P(RadioSimTest, sendEnvelopeWithStatus) {
- LOG(DEBUG) << "sendEnvelopeWithStatus";
serial = GetRandomSerialNumber();
// Test with sending empty string
@@ -1054,5 +1007,4 @@
{RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendEnvelopeWithStatus finished";
}
diff --git a/radio/aidl/vts/radio_sim_utils.h b/radio/aidl/vts/radio_sim_utils.h
index 71c7eb8..7cbcc58 100644
--- a/radio/aidl/vts/radio_sim_utils.h
+++ b/radio/aidl/vts/radio_sim_utils.h
@@ -194,9 +194,9 @@
};
// The main test class for Radio AIDL SIM.
-class RadioSimTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioSimTest : public RadioServiceTest {
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* Override updateSimCardStatus in RadioServiceTest to not call setResponseFunctions */
void updateSimCardStatus();
diff --git a/radio/aidl/vts/radio_voice_test.cpp b/radio/aidl/vts/radio_voice_test.cpp
index 249ee63..397c417 100644
--- a/radio/aidl/vts/radio_voice_test.cpp
+++ b/radio/aidl/vts/radio_voice_test.cpp
@@ -16,7 +16,6 @@
#include <aidl/android/hardware/radio/config/IRadioConfig.h>
#include <aidl/android/hardware/radio/voice/EmergencyServiceCategory.h>
-#include <android-base/logging.h>
#include <android/binder_manager.h>
#include "radio_voice_utils.h"
@@ -24,6 +23,7 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
void RadioVoiceTest::SetUp() {
+ RadioServiceTest::SetUp();
std::string serviceName = GetParam();
if (!isServiceValidForDeviceConfiguration(serviceName)) {
@@ -38,8 +38,6 @@
radioRsp_voice = ndk::SharedRefBase::make<RadioVoiceResponse>(*this);
ASSERT_NE(nullptr, radioRsp_voice.get());
- count_ = 0;
-
radioInd_voice = ndk::SharedRefBase::make<RadioVoiceIndication>(*this);
ASSERT_NE(nullptr, radioInd_voice.get());
@@ -324,7 +322,6 @@
* Test IRadioVoice.getTtyMode() for the response returned.
*/
TEST_P(RadioVoiceTest, getTtyMode) {
- LOG(DEBUG) << "getTtyMode";
serial = GetRandomSerialNumber();
radio_voice->getTtyMode(serial);
@@ -335,14 +332,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_voice->rspInfo.error);
}
- LOG(DEBUG) << "getTtyMode finished";
}
/*
* Test IRadioVoice.setTtyMode() for the response returned.
*/
TEST_P(RadioVoiceTest, setTtyMode) {
- LOG(DEBUG) << "setTtyMode";
serial = GetRandomSerialNumber();
radio_voice->setTtyMode(serial, TtyMode::OFF);
@@ -353,14 +348,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_voice->rspInfo.error);
}
- LOG(DEBUG) << "setTtyMode finished";
}
/*
* Test IRadioVoice.setPreferredVoicePrivacy() for the response returned.
*/
TEST_P(RadioVoiceTest, setPreferredVoicePrivacy) {
- LOG(DEBUG) << "setPreferredVoicePrivacy";
serial = GetRandomSerialNumber();
radio_voice->setPreferredVoicePrivacy(serial, true);
@@ -372,14 +365,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_voice->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "setPreferredVoicePrivacy finished";
}
/*
* Test IRadioVoice.getPreferredVoicePrivacy() for the response returned.
*/
TEST_P(RadioVoiceTest, getPreferredVoicePrivacy) {
- LOG(DEBUG) << "getPreferredVoicePrivacy";
serial = GetRandomSerialNumber();
radio_voice->getPreferredVoicePrivacy(serial);
@@ -391,14 +382,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_voice->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
- LOG(DEBUG) << "getPreferredVoicePrivacy finished";
}
/*
* Test IRadioVoice.exitEmergencyCallbackMode() for the response returned.
*/
TEST_P(RadioVoiceTest, exitEmergencyCallbackMode) {
- LOG(DEBUG) << "exitEmergencyCallbackMode";
serial = GetRandomSerialNumber();
radio_voice->exitEmergencyCallbackMode(serial);
@@ -411,14 +400,12 @@
radioRsp_voice->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
- LOG(DEBUG) << "exitEmergencyCallbackMode finished";
}
/*
* Test IRadioVoice.handleStkCallSetupRequestFromSim() for the response returned.
*/
TEST_P(RadioVoiceTest, handleStkCallSetupRequestFromSim) {
- LOG(DEBUG) << "handleStkCallSetupRequestFromSim";
serial = GetRandomSerialNumber();
bool accept = false;
@@ -434,14 +421,12 @@
RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "handleStkCallSetupRequestFromSim finished";
}
/*
* Test IRadioVoice.dial() for the response returned.
*/
TEST_P(RadioVoiceTest, dial) {
- LOG(DEBUG) << "dial";
serial = GetRandomSerialNumber();
Dial dialInfo;
@@ -463,14 +448,12 @@
RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "dial finished";
}
/*
* Test IRadioVoice.hangup() for the response returned.
*/
TEST_P(RadioVoiceTest, hangup) {
- LOG(DEBUG) << "hangup";
serial = GetRandomSerialNumber();
radio_voice->hangup(serial, 1);
@@ -484,14 +467,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "hangup finished";
}
/*
* Test IRadioVoice.hangupWaitingOrBackground() for the response returned.
*/
TEST_P(RadioVoiceTest, hangupWaitingOrBackground) {
- LOG(DEBUG) << "hangupWaitingOrBackground";
serial = GetRandomSerialNumber();
radio_voice->hangupWaitingOrBackground(serial);
@@ -504,14 +485,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "hangupWaitingOrBackground finished";
}
/*
* Test IRadioVoice.hangupForegroundResumeBackground() for the response returned.
*/
TEST_P(RadioVoiceTest, hangupForegroundResumeBackground) {
- LOG(DEBUG) << "hangupForegroundResumeBackground";
serial = GetRandomSerialNumber();
radio_voice->hangupForegroundResumeBackground(serial);
@@ -524,14 +503,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "hangupForegroundResumeBackground finished";
}
/*
* Test IRadioVoice.switchWaitingOrHoldingAndActive() for the response returned.
*/
TEST_P(RadioVoiceTest, switchWaitingOrHoldingAndActive) {
- LOG(DEBUG) << "switchWaitingOrHoldingAndActive";
serial = GetRandomSerialNumber();
radio_voice->switchWaitingOrHoldingAndActive(serial);
@@ -544,14 +521,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "switchWaitingOrHoldingAndActive finished";
}
/*
* Test IRadioVoice.conference() for the response returned.
*/
TEST_P(RadioVoiceTest, conference) {
- LOG(DEBUG) << "conference";
serial = GetRandomSerialNumber();
radio_voice->conference(serial);
@@ -564,14 +539,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "conference finished";
}
/*
* Test IRadioVoice.rejectCall() for the response returned.
*/
TEST_P(RadioVoiceTest, rejectCall) {
- LOG(DEBUG) << "rejectCall";
serial = GetRandomSerialNumber();
radio_voice->rejectCall(serial);
@@ -584,14 +557,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "rejectCall finished";
}
/*
* Test IRadioVoice.getLastCallFailCause() for the response returned.
*/
TEST_P(RadioVoiceTest, getLastCallFailCause) {
- LOG(DEBUG) << "getLastCallFailCause";
serial = GetRandomSerialNumber();
radio_voice->getLastCallFailCause(serial);
@@ -603,14 +574,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_voice->rspInfo.error, {RadioError::NONE},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getLastCallFailCause finished";
}
/*
* Test IRadioVoice.getCallForwardStatus() for the response returned.
*/
TEST_P(RadioVoiceTest, getCallForwardStatus) {
- LOG(DEBUG) << "getCallForwardStatus";
serial = GetRandomSerialNumber();
CallForwardInfo callInfo;
memset(&callInfo, 0, sizeof(callInfo));
@@ -627,14 +596,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getCallForwardStatus finished";
}
/*
* Test IRadioVoice.setCallForward() for the response returned.
*/
TEST_P(RadioVoiceTest, setCallForward) {
- LOG(DEBUG) << "setCallForward";
serial = GetRandomSerialNumber();
CallForwardInfo callInfo;
memset(&callInfo, 0, sizeof(callInfo));
@@ -651,14 +618,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setCallForward finished";
}
/*
* Test IRadioVoice.getCallWaiting() for the response returned.
*/
TEST_P(RadioVoiceTest, getCallWaiting) {
- LOG(DEBUG) << "getCallWaiting";
serial = GetRandomSerialNumber();
radio_voice->getCallWaiting(serial, 1);
@@ -672,14 +637,12 @@
{RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "getCallWaiting finished";
}
/*
* Test IRadioVoice.setCallWaiting() for the response returned.
*/
TEST_P(RadioVoiceTest, setCallWaiting) {
- LOG(DEBUG) << "setCallWaiting";
serial = GetRandomSerialNumber();
radio_voice->setCallWaiting(serial, true, 1);
@@ -693,14 +656,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setCallWaiting finished";
}
/*
* Test IRadioVoice.acceptCall() for the response returned.
*/
TEST_P(RadioVoiceTest, acceptCall) {
- LOG(DEBUG) << "acceptCall";
serial = GetRandomSerialNumber();
radio_voice->acceptCall(serial);
@@ -713,14 +674,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "acceptCall finished";
}
/*
* Test IRadioVoice.separateConnection() for the response returned.
*/
TEST_P(RadioVoiceTest, separateConnection) {
- LOG(DEBUG) << "separateConnection";
serial = GetRandomSerialNumber();
radio_voice->separateConnection(serial, 1);
@@ -734,14 +693,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "separateConnection finished";
}
/*
* Test IRadioVoice.explicitCallTransfer() for the response returned.
*/
TEST_P(RadioVoiceTest, explicitCallTransfer) {
- LOG(DEBUG) << "explicitCallTransfer";
serial = GetRandomSerialNumber();
radio_voice->explicitCallTransfer(serial);
@@ -754,14 +711,12 @@
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "explicitCallTransfer finished";
}
/*
* Test IRadioVoice.sendCdmaFeatureCode() for the response returned.
*/
TEST_P(RadioVoiceTest, sendCdmaFeatureCode) {
- LOG(DEBUG) << "sendCdmaFeatureCode";
serial = GetRandomSerialNumber();
radio_voice->sendCdmaFeatureCode(serial, std::string());
@@ -776,14 +731,12 @@
RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendCdmaFeatureCode finished";
}
/*
* Test IRadioVoice.sendDtmf() for the response returned.
*/
TEST_P(RadioVoiceTest, sendDtmf) {
- LOG(DEBUG) << "sendDtmf";
serial = GetRandomSerialNumber();
radio_voice->sendDtmf(serial, "1");
@@ -798,14 +751,12 @@
RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendDtmf finished";
}
/*
* Test IRadioVoice.startDtmf() for the response returned.
*/
TEST_P(RadioVoiceTest, startDtmf) {
- LOG(DEBUG) << "startDtmf";
serial = GetRandomSerialNumber();
radio_voice->startDtmf(serial, "1");
@@ -820,14 +771,12 @@
RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "startDtmf finished";
}
/*
* Test IRadioVoice.stopDtmf() for the response returned.
*/
TEST_P(RadioVoiceTest, stopDtmf) {
- LOG(DEBUG) << "stopDtmf";
serial = GetRandomSerialNumber();
radio_voice->stopDtmf(serial);
@@ -841,14 +790,12 @@
RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "stopDtmf finished";
}
/*
* Test IRadioVoice.setMute() for the response returned.
*/
TEST_P(RadioVoiceTest, setMute) {
- LOG(DEBUG) << "setMute";
serial = GetRandomSerialNumber();
radio_voice->setMute(serial, true);
@@ -861,14 +808,12 @@
{RadioError::NONE, RadioError::INVALID_ARGUMENTS},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "setMute finished";
}
/*
* Test IRadioVoice.getMute() for the response returned.
*/
TEST_P(RadioVoiceTest, getMute) {
- LOG(DEBUG) << "getMute";
serial = GetRandomSerialNumber();
radio_voice->getMute(serial);
@@ -879,14 +824,12 @@
if (cardStatus.cardState == CardStatus::STATE_ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp_voice->rspInfo.error);
}
- LOG(DEBUG) << "getMute finished";
}
/*
* Test IRadioVoice.sendBurstDtmf() for the response returned.
*/
TEST_P(RadioVoiceTest, sendBurstDtmf) {
- LOG(DEBUG) << "sendBurstDtmf";
serial = GetRandomSerialNumber();
radio_voice->sendBurstDtmf(serial, "1", 0, 0);
@@ -900,14 +843,12 @@
RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendBurstDtmf finished";
}
/*
* Test IRadioVoice.sendUssd() for the response returned.
*/
TEST_P(RadioVoiceTest, sendUssd) {
- LOG(DEBUG) << "sendUssd";
serial = GetRandomSerialNumber();
radio_voice->sendUssd(serial, std::string("test"));
EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -920,14 +861,12 @@
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "sendUssd finished";
}
/*
* Test IRadioVoice.cancelPendingUssd() for the response returned.
*/
TEST_P(RadioVoiceTest, cancelPendingUssd) {
- LOG(DEBUG) << "cancelPendingUssd";
serial = GetRandomSerialNumber();
radio_voice->cancelPendingUssd(serial);
@@ -941,14 +880,12 @@
{RadioError::NONE, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
- LOG(DEBUG) << "cancelPendingUssd finished";
}
/*
* Test IRadioVoice.isVoNrEnabled() for the response returned.
*/
TEST_P(RadioVoiceTest, isVoNrEnabled) {
- LOG(DEBUG) << "isVoNrEnabled";
serial = GetRandomSerialNumber();
radio_voice->isVoNrEnabled(serial);
@@ -958,14 +895,12 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_voice->rspInfo.error,
{RadioError::REQUEST_NOT_SUPPORTED, RadioError::NONE}));
- LOG(DEBUG) << "isVoNrEnabled finished";
}
/*
* Test IRadioVoice.setVoNrEnabled() for the response returned.
*/
TEST_P(RadioVoiceTest, setVoNrEnabled) {
- LOG(DEBUG) << "setVoNrEnabled";
serial = GetRandomSerialNumber();
radio_voice->setVoNrEnabled(serial, true);
@@ -975,5 +910,4 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_voice->rspInfo.error,
{RadioError::REQUEST_NOT_SUPPORTED, RadioError::NONE}));
- LOG(DEBUG) << "setVoNrEnabled finished";
}
diff --git a/radio/aidl/vts/radio_voice_utils.h b/radio/aidl/vts/radio_voice_utils.h
index 0c3df7f..dda6c65 100644
--- a/radio/aidl/vts/radio_voice_utils.h
+++ b/radio/aidl/vts/radio_voice_utils.h
@@ -183,7 +183,7 @@
};
// The main test class for Radio AIDL Voice.
-class RadioVoiceTest : public ::testing::TestWithParam<std::string>, public RadioServiceTest {
+class RadioVoiceTest : public RadioServiceTest {
protected:
/* Clear Potential Established Calls */
virtual ndk::ScopedAStatus clearPotentialEstablishedCalls();
@@ -192,7 +192,7 @@
std::shared_ptr<RadioNetworkIndication> radioInd_network;
public:
- virtual void SetUp() override;
+ void SetUp() override;
/* radio voice service handle */
std::shared_ptr<IRadioVoice> radio_voice;
diff --git a/security/rkp/README.md b/security/rkp/README.md
index 01c90a8..7477f80 100644
--- a/security/rkp/README.md
+++ b/security/rkp/README.md
@@ -291,6 +291,24 @@
of a DKCertChain in AdditionalDKSignatures (see
[CertificateRequest](#certificaterequest)).
+#### Mode
+
+The Open Profile for DICE specifies four possible modes with the most important
+mode being `normal`. A certificate must only set the mode to `normal` when all
+of the following conditions are met when loading and verifying the software
+component that is being described by the certificate:
+
+* verified boot with anti-rollback protection is enabled
+* only the verified boot authorities for production images are enabled
+* debug ports, fuses or other debug facilities are disabled
+* device booted software from the normal primary source e.g. internal flash
+
+If any of these conditions are not met then it is recommended to explicitly
+acknowledge this fact by using the `debug` mode. The mode should never be `not
+configured`.
+
+#### Configuration descriptor
+
The Open Profile for DICE allows for an arbitrary configuration descriptor. For
BCC entries, this configuration descriptor is a CBOR map with the following
optional fields. If no fields are relevant, an empty map should be encoded.