summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.cpp56
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.h18
-rw-r--r--automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp2
-rw-r--r--camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp19
-rw-r--r--camera/provider/2.6/ICameraProvider.hal6
-rw-r--r--current.txt3
-rw-r--r--graphics/composer/2.1/vts/functional/Android.bp8
-rw-r--r--graphics/composer/2.2/vts/functional/Android.bp8
-rw-r--r--graphics/composer/2.3/vts/functional/Android.bp8
-rw-r--r--graphics/composer/2.4/vts/functional/Android.bp8
-rw-r--r--graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp50
-rw-r--r--identity/aidl/android/hardware/identity/IIdentityCredential.aidl10
-rw-r--r--identity/aidl/android/hardware/identity/IIdentityCredentialStore.aidl2
-rw-r--r--identity/aidl/default/IdentityCredential.cpp34
-rw-r--r--identity/aidl/vts/ReaderAuthTests.cpp38
-rw-r--r--identity/aidl/vts/VtsHalIdentityEndToEndTest.cpp39
-rw-r--r--neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp47
-rw-r--r--neuralnetworks/1.3/types.hal28
-rw-r--r--neuralnetworks/1.3/types.t8
-rw-r--r--neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp47
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp13
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_data.cpp15
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_icc.cpp31
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_misc.cpp91
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_sms.cpp29
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_stk.cpp11
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_test.cpp4
-rw-r--r--radio/1.0/vts/functional/radio_hidl_hal_voice.cpp51
-rw-r--r--radio/1.0/vts/functional/sap_hidl_hal_api.cpp17
-rw-r--r--radio/1.0/vts/functional/vts_hal_radio_target_test.xml1
-rw-r--r--radio/1.1/vts/functional/AndroidTest.xml1
-rw-r--r--radio/1.2/vts/functional/radio_hidl_hal_api.cpp2
-rw-r--r--radio/1.4/vts/functional/radio_hidl_hal_api.cpp78
-rw-r--r--radio/1.4/vts/functional/radio_hidl_hal_test.cpp6
-rw-r--r--radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h5
-rw-r--r--radio/1.5/vts/functional/radio_hidl_hal_api.cpp201
-rw-r--r--radio/1.5/vts/functional/radio_hidl_hal_test.cpp6
-rw-r--r--radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h3
-rw-r--r--rebootescrow/aidl/vts/functional/README.md7
-rw-r--r--rebootescrow/aidl/vts/functional/VtsHalRebootEscrowTargetTest.cpp26
40 files changed, 745 insertions, 292 deletions
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.cpp
index 2c2f23c4c6..ea38cb3941 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.cpp
@@ -71,35 +71,45 @@ android::base::Result<std::unique_ptr<VehiclePropValue>> EmulatedUserHal::onSetP
}
android::base::Result<std::unique_ptr<VehiclePropValue>> EmulatedUserHal::onGetProperty(
- int32_t prop) {
- ALOGV("onGetProperty(%d)", prop);
- switch (prop) {
+ const VehiclePropValue& value) {
+ ALOGV("onGetProperty(%s)", toString(value).c_str());
+ switch (value.prop) {
case INITIAL_USER_INFO:
case SWITCH_USER:
case CREATE_USER:
case REMOVE_USER:
- ALOGE("onGetProperty(): %d is only supported on SET", prop);
+ ALOGE("onGetProperty(): %d is only supported on SET", value.prop);
return android::base::Error(static_cast<int>(StatusCode::INVALID_ARG))
<< "only supported on SET";
case USER_IDENTIFICATION_ASSOCIATION:
- if (mSetUserIdentificationAssociationResponseFromCmd != nullptr) {
- ALOGI("onGetProperty(%d): returning %s", prop,
- toString(*mSetUserIdentificationAssociationResponseFromCmd).c_str());
- auto value = std::unique_ptr<VehiclePropValue>(
- new VehiclePropValue(*mSetUserIdentificationAssociationResponseFromCmd));
- return value;
- }
- ALOGE("onGetProperty(%d): USER_IDENTIFICATION_ASSOCIATION not set by lshal", prop);
- return android::base::Error(static_cast<int>(StatusCode::NOT_AVAILABLE))
- << "not set by lshal";
+ return onGetUserIdentificationAssociation(value);
default:
- ALOGE("onGetProperty(): %d is not supported", prop);
+ ALOGE("onGetProperty(): %d is not supported", value.prop);
return android::base::Error(static_cast<int>(StatusCode::INVALID_ARG))
<< "not supported by User HAL";
}
}
android::base::Result<std::unique_ptr<VehiclePropValue>>
+EmulatedUserHal::onGetUserIdentificationAssociation(const VehiclePropValue& value) {
+ if (mSetUserIdentificationAssociationResponseFromCmd != nullptr) {
+ ALOGI("get(USER_IDENTIFICATION_ASSOCIATION): returning %s",
+ toString(*mSetUserIdentificationAssociationResponseFromCmd).c_str());
+ auto newValue = std::unique_ptr<VehiclePropValue>(
+ new VehiclePropValue(*mSetUserIdentificationAssociationResponseFromCmd));
+ // Must use the same requestId
+ if (value.value.int32Values.size() > 0) {
+ newValue->value.int32Values[0] = value.value.int32Values[0];
+ } else {
+ ALOGE("get(USER_IDENTIFICATION_ASSOCIATION): no requestId on %s",
+ toString(value).c_str());
+ }
+ return newValue;
+ }
+ return defaultUserIdentificationAssociation(value);
+}
+
+android::base::Result<std::unique_ptr<VehiclePropValue>>
EmulatedUserHal::onSetInitialUserInfoResponse(const VehiclePropValue& value) {
if (value.value.int32Values.size() == 0) {
ALOGE("set(INITIAL_USER_INFO): no int32values, ignoring it: %s", toString(value).c_str());
@@ -250,16 +260,14 @@ EmulatedUserHal::onSetUserIdentificationAssociation(const VehiclePropValue& valu
}
// Returns default response
- auto updatedValue = std::unique_ptr<VehiclePropValue>(new VehiclePropValue);
- updatedValue->prop = USER_IDENTIFICATION_ASSOCIATION;
- updatedValue->timestamp = elapsedRealtimeNano();
- updatedValue->value.int32Values.resize(1);
- updatedValue->value.int32Values[0] = requestId;
- updatedValue->value.stringValue = "Response not set by LSHAL";
-
- ALOGI("no lshal response; replying with an error message: %s", toString(*updatedValue).c_str());
+ return defaultUserIdentificationAssociation(value);
+}
- return updatedValue;
+android::base::Result<std::unique_ptr<VehiclePropValue>>
+EmulatedUserHal::defaultUserIdentificationAssociation(const VehiclePropValue& request) {
+ // TODO(b/159498909): return a response with NOT_ASSOCIATED_ANY_USER for all requested types
+ ALOGE("no lshal response for %s; replying with NOT_AVAILABLE", toString(request).c_str());
+ return android::base::Error(static_cast<int>(StatusCode::NOT_AVAILABLE)) << "not set by lshal";
}
android::base::Result<std::unique_ptr<VehiclePropValue>> EmulatedUserHal::sendUserHalResponse(
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.h b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.h
index 5243b969d8..db2f117e3e 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.h
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedUserHal.h
@@ -58,7 +58,8 @@ class EmulatedUserHal {
*
* @return property value and StatusCode
*/
- android::base::Result<std::unique_ptr<VehiclePropValue>> onGetProperty(int32_t prop);
+ android::base::Result<std::unique_ptr<VehiclePropValue>> onGetProperty(
+ const VehiclePropValue& value);
/**
* Shows the User HAL emulation help.
@@ -111,12 +112,25 @@ class EmulatedUserHal {
const VehiclePropValue& value);
/**
- * Used to emulate USER_IDENTIFICATION_ASSOCIATION - see onSetInitialUserInfoResponse() for
+ * Used to emulate set USER_IDENTIFICATION_ASSOCIATION - see onSetInitialUserInfoResponse() for
* usage.
*/
android::base::Result<std::unique_ptr<VehiclePropValue>> onSetUserIdentificationAssociation(
const VehiclePropValue& value);
+ /**
+ * Used to emulate get USER_IDENTIFICATION_ASSOCIATION - see onSetInitialUserInfoResponse() for
+ * usage.
+ */
+ android::base::Result<std::unique_ptr<VehiclePropValue>> onGetUserIdentificationAssociation(
+ const VehiclePropValue& value);
+
+ /**
+ * Creates a default USER_IDENTIFICATION_ASSOCIATION when it was not set by lshal.
+ */
+ android::base::Result<std::unique_ptr<VehiclePropValue>> defaultUserIdentificationAssociation(
+ const VehiclePropValue& request);
+
android::base::Result<std::unique_ptr<VehiclePropValue>> sendUserHalResponse(
std::unique_ptr<VehiclePropValue> response, int32_t requestId);
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
index 9cfcc1c605..a0b566d1ee 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleHal.cpp
@@ -153,7 +153,7 @@ VehicleHal::VehiclePropValuePtr EmulatedVehicleHal::get(
default:
if (mEmulatedUserHal != nullptr && mEmulatedUserHal->isSupported(propId)) {
ALOGI("get(): getting value for prop %d from User HAL", propId);
- const auto& ret = mEmulatedUserHal->onGetProperty(propId);
+ const auto& ret = mEmulatedUserHal->onGetProperty(requestedPropValue);
if (!ret.ok()) {
ALOGE("get(): User HAL returned error: %s", ret.error().message().c_str());
*outStatus = StatusCode(ret.error().code());
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 3b8f833cea..f235235ab7 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -843,7 +843,7 @@ public:
void verifyRequestTemplate(const camera_metadata_t* metadata, RequestTemplate requestTemplate);
- bool isDepthOnly(camera_metadata_t* staticMeta);
+ static bool isDepthOnly(const camera_metadata_t* staticMeta);
static Status getAvailableOutputStreams(const camera_metadata_t *staticMeta,
std::vector<AvailableStream> &outputStreams,
@@ -5537,9 +5537,22 @@ static Size getMinSize(Size a, Size b) {
// TODO: Add more combinations
Status CameraHidlTest::getMandatoryConcurrentStreams(const camera_metadata_t* staticMeta,
std::vector<AvailableStream>* outputStreams) {
- if (nullptr == staticMeta) {
+ if (nullptr == staticMeta || nullptr == outputStreams) {
return Status::ILLEGAL_ARGUMENT;
}
+
+ if (isDepthOnly(staticMeta)) {
+ Size y16MaxSize(640, 480);
+ Size maxAvailableY16Size;
+ getMaxOutputSizeForFormat(staticMeta, PixelFormat::Y16, &maxAvailableY16Size);
+ Size y16ChosenSize = getMinSize(y16MaxSize, maxAvailableY16Size);
+ AvailableStream y16Stream = {.width = y16ChosenSize.width,
+ .height = y16ChosenSize.height,
+ .format = static_cast<int32_t>(PixelFormat::Y16)};
+ outputStreams->push_back(y16Stream);
+ return Status::OK;
+ }
+
Size yuvMaxSize(1280, 720);
Size jpegMaxSize(1920, 1440);
Size maxAvailableYuvSize;
@@ -6296,7 +6309,7 @@ void CameraHidlTest::configureOfflineStillStream(const std::string &name,
ASSERT_TRUE(ret.isOk());
}
-bool CameraHidlTest::isDepthOnly(camera_metadata_t* staticMeta) {
+bool CameraHidlTest::isDepthOnly(const camera_metadata_t* staticMeta) {
camera_metadata_ro_entry scalarEntry;
camera_metadata_ro_entry depthEntry;
diff --git a/camera/provider/2.6/ICameraProvider.hal b/camera/provider/2.6/ICameraProvider.hal
index b8873a6261..d720b26e5c 100644
--- a/camera/provider/2.6/ICameraProvider.hal
+++ b/camera/provider/2.6/ICameraProvider.hal
@@ -61,6 +61,12 @@ interface ICameraProvider extends @2.5::ICameraProvider {
* outputs, stream combinations mentioned above, where YUV is substituted by
* Y8 must be also supported.
*
+ * Devices whose capabilities do not include
+ * ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE, must support
+ * at least a single Y16 stream, Dataspace::DEPTH with sVGA resolution,
+ * during concurrent operation.
+ * Where sVGA - min (max output resolution for the given format, 640 X 480)
+ *
* The camera framework must call this method whenever it gets a
* cameraDeviceStatusChange callback adding a new camera device or removing
* a camera device known to it. This is so that the camera framework can get new combinations
diff --git a/current.txt b/current.txt
index 90402b4e49..669651625d 100644
--- a/current.txt
+++ b/current.txt
@@ -677,7 +677,7 @@ eb90c4d366f05a025d1d1a3672f8b4c3e33e420fa387f73f21b264645bfdf845 android.hardwar
a718c8a3acaa938de5a57923e8c4625ed7ca051e05a1d930ba6998557d7b57c8 android.hardware.camera.device@3.6::ICameraOfflineSession
a35d5151b48505f06a775b38c0e2e265f80a845d92802324c643565807f81c53 android.hardware.camera.device@3.6::types
02bdf82dba7dce273a554b4474468a8fb1fb4f61ab65da95eb16e080df63fff6 android.hardware.camera.metadata@3.5::types
-7d6b362681f4a4fd0be95535d8913d8de9a26f0765c1bdda4bd837dea8c25db6 android.hardware.camera.provider@2.6::ICameraProvider
+93cd94e47b22007bbf436c2f5c2703bb7b2859d1b714d6ae15520db55667ba6c android.hardware.camera.provider@2.6::ICameraProvider
8f8d9463508ff9cae88eb35c429fd0e2dbca0ca8f5de7fdf836cc0c4370becb6 android.hardware.camera.provider@2.6::ICameraProviderCallback
1edf7aef68ef3bd577a1175b1462fb82e3e39f01c6915dda61fba121028df283 android.hardware.camera.provider@2.6::types
c1aa508d00b66ed5feefea398fd5edf28fa651ac89773adad7dfda4e0a73a952 android.hardware.cas@1.2::ICas
@@ -722,6 +722,7 @@ ee9dc34b9925b8367b1111c72bd6d9d375432735e451572ca5a665d8516a7744 android.hardwar
eee3430cc86c97c7b407495863d8fb61da6f1a64b7721e77b9b4909b11b174e9 android.hardware.neuralnetworks@1.3::IPreparedModelCallback
acf84925f8ee0a651f2ec547ac334034de266479b93af5434f6c1f25e66aba96 android.hardware.neuralnetworks@1.3::types
e9080d04218e98512b63aace9ff3da52f0130238391f15cbbf7df396a3ec9072 android.hardware.neuralnetworks@1.3::types # b/155508675, b/155662254, b/155238914, b/155660285
+583dc88b41e702e940fd954edda1beb8b4151eab55a5c6d7e69e2781bce84b59 android.hardware.neuralnetworks@1.3::types # b/156918813
b454df853441c12f6e425e8a60dd29fda20f5e6e39b93d1103e4b37495db38aa android.hardware.radio@1.5::IRadio
fcbb0742a88215ee7a6d7ce0825d253eb2b50391fc6c8c48667f9fd7f6d4549e android.hardware.radio@1.5::IRadioIndication
b809193970a91ca637a4b0184767315601d32e3ef3d5992ffbc7a8d14a14f015 android.hardware.radio@1.5::IRadioResponse
diff --git a/graphics/composer/2.1/vts/functional/Android.bp b/graphics/composer/2.1/vts/functional/Android.bp
index dafbbf9c9e..e137afb27a 100644
--- a/graphics/composer/2.1/vts/functional/Android.bp
+++ b/graphics/composer/2.1/vts/functional/Android.bp
@@ -23,6 +23,10 @@ cc_test {
shared_libs: [
"libfmq",
"libsync",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.mapper@2.1",
+ "android.hardware.graphics.mapper@3.0",
+ "android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator@2.0",
@@ -30,13 +34,9 @@ cc_test {
"android.hardware.graphics.allocator@4.0",
"android.hardware.graphics.composer@2.1",
"android.hardware.graphics.composer@2.1-vts",
- "android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1",
"android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0",
"android.hardware.graphics.mapper@4.0-vts",
],
header_libs: [
diff --git a/graphics/composer/2.2/vts/functional/Android.bp b/graphics/composer/2.2/vts/functional/Android.bp
index e1a254dee4..d80845f9dd 100644
--- a/graphics/composer/2.2/vts/functional/Android.bp
+++ b/graphics/composer/2.2/vts/functional/Android.bp
@@ -33,6 +33,10 @@ cc_test {
"libprocessgroup",
"libsync",
"libui",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.mapper@2.1",
+ "android.hardware.graphics.mapper@3.0",
+ "android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator@2.0",
@@ -43,13 +47,9 @@ cc_test {
"android.hardware.graphics.composer@2.1-vts",
"android.hardware.graphics.composer@2.2",
"android.hardware.graphics.composer@2.2-vts",
- "android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1",
"android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0",
"android.hardware.graphics.mapper@4.0-vts",
"libgtest",
"librenderengine",
diff --git a/graphics/composer/2.3/vts/functional/Android.bp b/graphics/composer/2.3/vts/functional/Android.bp
index 18ea2aa96c..1ab6b3b88d 100644
--- a/graphics/composer/2.3/vts/functional/Android.bp
+++ b/graphics/composer/2.3/vts/functional/Android.bp
@@ -24,6 +24,10 @@ cc_test {
"libfmq",
"libhidlbase",
"libsync",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.mapper@2.1",
+ "android.hardware.graphics.mapper@3.0",
+ "android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator@2.0",
@@ -35,13 +39,9 @@ cc_test {
"android.hardware.graphics.composer@2.2-vts",
"android.hardware.graphics.composer@2.3",
"android.hardware.graphics.composer@2.3-vts",
- "android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1",
"android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0",
"android.hardware.graphics.mapper@4.0-vts",
],
header_libs: [
diff --git a/graphics/composer/2.4/vts/functional/Android.bp b/graphics/composer/2.4/vts/functional/Android.bp
index 9e7cc46c56..d0209b7af3 100644
--- a/graphics/composer/2.4/vts/functional/Android.bp
+++ b/graphics/composer/2.4/vts/functional/Android.bp
@@ -23,6 +23,10 @@ cc_test {
shared_libs: [
"libfmq",
"libsync",
+ "android.hardware.graphics.mapper@2.0",
+ "android.hardware.graphics.mapper@2.1",
+ "android.hardware.graphics.mapper@3.0",
+ "android.hardware.graphics.mapper@4.0",
],
static_libs: [
"android.hardware.graphics.allocator@2.0",
@@ -36,13 +40,9 @@ cc_test {
"android.hardware.graphics.composer@2.3-vts",
"android.hardware.graphics.composer@2.4",
"android.hardware.graphics.composer@2.4-vts",
- "android.hardware.graphics.mapper@2.0",
"android.hardware.graphics.mapper@2.0-vts",
- "android.hardware.graphics.mapper@2.1",
"android.hardware.graphics.mapper@2.1-vts",
- "android.hardware.graphics.mapper@3.0",
"android.hardware.graphics.mapper@3.0-vts",
- "android.hardware.graphics.mapper@4.0",
"android.hardware.graphics.mapper@4.0-vts",
],
header_libs: [
diff --git a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
index db06c667dd..bb775dc689 100644
--- a/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
+++ b/graphics/mapper/4.0/vts/functional/VtsHalGraphicsMapperV4_0TargetTest.cpp
@@ -661,6 +661,56 @@ TEST_P(GraphicsMapperHidlTest, Lock_YCRCB_420_SP) {
ASSERT_NO_FATAL_FAILURE(fence.reset(mGralloc->unlock(bufferHandle)));
}
+TEST_P(GraphicsMapperHidlTest, YV12SubsampleMetadata) {
+ auto info = mDummyDescriptorInfo;
+ info.format = PixelFormat::YV12;
+
+ const native_handle_t* bufferHandle;
+ uint32_t stride;
+ ASSERT_NO_FATAL_FAILURE(
+ bufferHandle = mGralloc->allocate(info, true, Tolerance::kToleranceStrict, &stride));
+
+ const IMapper::Rect region{0, 0, static_cast<int32_t>(info.width),
+ static_cast<int32_t>(info.height)};
+ unique_fd fence;
+ ASSERT_NO_FATAL_FAILURE(mGralloc->lock(bufferHandle, info.usage, region, fence.release()));
+
+ hidl_vec<uint8_t> vec;
+ ASSERT_EQ(Error::NONE, mGralloc->get(bufferHandle, gralloc4::MetadataType_PlaneLayouts, &vec));
+ std::vector<PlaneLayout> planeLayouts;
+ ASSERT_EQ(NO_ERROR, gralloc4::decodePlaneLayouts(vec, &planeLayouts));
+
+ ASSERT_EQ(3, planeLayouts.size());
+
+ auto yPlane = planeLayouts[0];
+ auto crPlane = planeLayouts[1];
+ auto cbPlane = planeLayouts[2];
+
+ constexpr uint32_t kCbCrSubSampleFactor = 2;
+ EXPECT_EQ(kCbCrSubSampleFactor, crPlane.horizontalSubsampling);
+ EXPECT_EQ(kCbCrSubSampleFactor, crPlane.verticalSubsampling);
+
+ EXPECT_EQ(kCbCrSubSampleFactor, cbPlane.horizontalSubsampling);
+ EXPECT_EQ(kCbCrSubSampleFactor, cbPlane.verticalSubsampling);
+
+ const long chromaSampleWidth = info.width / kCbCrSubSampleFactor;
+ const long chromaSampleHeight = info.height / kCbCrSubSampleFactor;
+
+ EXPECT_EQ(info.width, yPlane.widthInSamples);
+ EXPECT_EQ(info.height, yPlane.heightInSamples);
+
+ EXPECT_EQ(chromaSampleWidth, crPlane.widthInSamples);
+ EXPECT_EQ(chromaSampleHeight, crPlane.heightInSamples);
+
+ EXPECT_EQ(chromaSampleWidth, cbPlane.widthInSamples);
+ EXPECT_EQ(chromaSampleHeight, cbPlane.heightInSamples);
+
+ EXPECT_LE(crPlane.widthInSamples, crPlane.strideInBytes);
+ EXPECT_LE(cbPlane.widthInSamples, cbPlane.strideInBytes);
+
+ ASSERT_NO_FATAL_FAILURE(fence.reset(mGralloc->unlock(bufferHandle)));
+}
+
TEST_P(GraphicsMapperHidlTest, Lock_YV12) {
auto info = mDummyDescriptorInfo;
info.format = PixelFormat::YV12;
diff --git a/identity/aidl/android/hardware/identity/IIdentityCredential.aidl b/identity/aidl/android/hardware/identity/IIdentityCredential.aidl
index 3b8fbd9e1f..730b601c69 100644
--- a/identity/aidl/android/hardware/identity/IIdentityCredential.aidl
+++ b/identity/aidl/android/hardware/identity/IIdentityCredential.aidl
@@ -151,8 +151,8 @@ interface IIdentityCredential {
* IntentToRetain = bool
*
* For the readerSignature parameter, this can either be empty or if non-empty it
- * must be a COSE_Sign1 structure with an ECDSA signature over the content of the
- * CBOR conforming to the following CDDL:
+ * must be a COSE_Sign1 where the payload is the bytes of the
+ * ReaderAuthenticationBytes CBOR defined below:
*
* ReaderAuthentication = [
* "ReaderAuthentication",
@@ -164,6 +164,8 @@ interface IIdentityCredential {
*
* ItemsRequestBytes = #6.24(bstr .cbor ItemsRequest)
*
+ * ReaderAuthenticationBytes = #6.24(bstr .cbor ReaderAuthentication)
+ *
* The public key corresponding to the key used to made signature, can be found in the
* 'x5chain' unprotected header element of the COSE_Sign1 structure (as as described
* in 'draft-ietf-cose-x509-04'). There will be at least one certificate in said element
@@ -278,7 +280,7 @@ interface IIdentityCredential {
*
* @param out mac is empty if signingKeyBlob or the sessionTranscript passed to
* startRetrieval() is empty. Otherwise it is a COSE_Mac0 with empty payload
- * and the detached content is set to DeviceAuthentication as defined below.
+ * and the detached content is set to DeviceAuthenticationBytes as defined below.
* This code is produced by using the key agreement and key derivation function
* from the ciphersuite with the authentication private key and the reader
* ephemeral public key to compute a shared message authentication code (MAC)
@@ -299,6 +301,8 @@ interface IIdentityCredential {
*
* DeviceNameSpacesBytes = #6.24(bstr .cbor DeviceNameSpaces)
*
+ * DeviceAuthenticationBytes = #6.24(bstr .cbor DeviceAuthentication)
+ *
* where
*
* DeviceNameSpaces = {
diff --git a/identity/aidl/android/hardware/identity/IIdentityCredentialStore.aidl b/identity/aidl/android/hardware/identity/IIdentityCredentialStore.aidl
index bd664e86ea..33e25b1adf 100644
--- a/identity/aidl/android/hardware/identity/IIdentityCredentialStore.aidl
+++ b/identity/aidl/android/hardware/identity/IIdentityCredentialStore.aidl
@@ -99,7 +99,7 @@ import android.hardware.identity.CipherSuite;
* Various fields need to be encoded as precisely-specified byte arrays. Where existing standards
* define appropriate encodings, those are used. For example, X.509 certificates. Where new
* encodings are needed, CBOR is used. CBOR maps are described in CDDL notation
- * (https://tools.ietf.org/html/draft-ietf-cbor-cddl-06).
+ * (https://tools.ietf.org/html/rfc8610).
*
* All binder calls in the HAL may return a ServiceSpecificException with statuses from the
* STATUS_* integers defined in this interface. Each method states which status can be returned
diff --git a/identity/aidl/default/IdentityCredential.cpp b/identity/aidl/default/IdentityCredential.cpp
index f3c4bbfc28..10f9aa5886 100644
--- a/identity/aidl/default/IdentityCredential.cpp
+++ b/identity/aidl/default/IdentityCredential.cpp
@@ -39,6 +39,10 @@ using ::std::optional;
using namespace ::android::hardware::identity;
int IdentityCredential::initialize() {
+ if (credentialData_.size() == 0) {
+ LOG(ERROR) << "CredentialData is empty";
+ return IIdentityCredentialStore::STATUS_INVALID_DATA;
+ }
auto [item, _, message] = cppbor::parse(credentialData_);
if (item == nullptr) {
LOG(ERROR) << "CredentialData is not valid CBOR: " << message;
@@ -316,13 +320,16 @@ ndk::ScopedAStatus IdentityCredential::startRetrieval(
}
const vector<uint8_t>& itemsRequestBytes = itemsRequest;
- vector<uint8_t> dataThatWasSigned = cppbor::Array()
- .add("ReaderAuthentication")
- .add(sessionTranscriptItem_->clone())
- .add(cppbor::Semantic(24, itemsRequestBytes))
- .encode();
+ vector<uint8_t> encodedReaderAuthentication =
+ cppbor::Array()
+ .add("ReaderAuthentication")
+ .add(sessionTranscriptItem_->clone())
+ .add(cppbor::Semantic(24, itemsRequestBytes))
+ .encode();
+ vector<uint8_t> encodedReaderAuthenticationBytes =
+ cppbor::Semantic(24, encodedReaderAuthentication).encode();
if (!support::coseCheckEcDsaSignature(readerSignature,
- dataThatWasSigned, // detached content
+ encodedReaderAuthenticationBytes, // detached content
readerPublicKey.value())) {
return ndk::ScopedAStatus(AStatus_fromServiceSpecificErrorWithMessage(
IIdentityCredentialStore::STATUS_READER_SIGNATURE_CHECK_FAILED,
@@ -779,7 +786,7 @@ ndk::ScopedAStatus IdentityCredential::finishRetrieval(vector<int8_t>* outMac,
array.add(sessionTranscriptItem_->clone());
array.add(docType_);
array.add(cppbor::Semantic(24, encodedDeviceNameSpaces));
- vector<uint8_t> encodedDeviceAuthentication = array.encode();
+ vector<uint8_t> deviceAuthenticationBytes = cppbor::Semantic(24, array.encode()).encode();
vector<uint8_t> docTypeAsBlob(docType_.begin(), docType_.end());
optional<vector<uint8_t>> signingKey =
@@ -797,17 +804,24 @@ ndk::ScopedAStatus IdentityCredential::finishRetrieval(vector<int8_t>* outMac,
IIdentityCredentialStore::STATUS_FAILED, "Error doing ECDH"));
}
+ // Mix-in SessionTranscriptBytes
+ vector<uint8_t> sessionTranscriptBytes = cppbor::Semantic(24, sessionTranscript_).encode();
+ vector<uint8_t> sharedSecretWithSessionTranscriptBytes = sharedSecret.value();
+ std::copy(sessionTranscriptBytes.begin(), sessionTranscriptBytes.end(),
+ std::back_inserter(sharedSecretWithSessionTranscriptBytes));
+
vector<uint8_t> salt = {0x00};
vector<uint8_t> info = {};
- optional<vector<uint8_t>> derivedKey = support::hkdf(sharedSecret.value(), salt, info, 32);
+ optional<vector<uint8_t>> derivedKey =
+ support::hkdf(sharedSecretWithSessionTranscriptBytes, salt, info, 32);
if (!derivedKey) {
return ndk::ScopedAStatus(AStatus_fromServiceSpecificErrorWithMessage(
IIdentityCredentialStore::STATUS_FAILED,
"Error deriving key from shared secret"));
}
- mac = support::coseMac0(derivedKey.value(), {}, // payload
- encodedDeviceAuthentication); // additionalData
+ mac = support::coseMac0(derivedKey.value(), {}, // payload
+ deviceAuthenticationBytes); // detached content
if (!mac) {
return ndk::ScopedAStatus(AStatus_fromServiceSpecificErrorWithMessage(
IIdentityCredentialStore::STATUS_FAILED, "Error MACing data"));
diff --git a/identity/aidl/vts/ReaderAuthTests.cpp b/identity/aidl/vts/ReaderAuthTests.cpp
index 680ba5b7f9..b11f6c5e8f 100644
--- a/identity/aidl/vts/ReaderAuthTests.cpp
+++ b/identity/aidl/vts/ReaderAuthTests.cpp
@@ -289,16 +289,19 @@ void ReaderAuthTests::retrieveData(const vector<uint8_t>& readerPrivateKey,
.add("Accessible by None", false)))
.encode();
}
- vector<uint8_t> dataToSign = cppbor::Array()
- .add("ReaderAuthentication")
- .add(sessionTranscript.clone())
- .add(cppbor::Semantic(24, itemsRequestBytes))
- .encode();
+ vector<uint8_t> encodedReaderAuthentication =
+ cppbor::Array()
+ .add("ReaderAuthentication")
+ .add(sessionTranscript.clone())
+ .add(cppbor::Semantic(24, itemsRequestBytes))
+ .encode();
+ vector<uint8_t> encodedReaderAuthenticationBytes =
+ cppbor::Semantic(24, encodedReaderAuthentication).encode();
optional<vector<uint8_t>> readerSignature =
- support::coseSignEcDsa(readerPrivateKey, // private key for reader
- {}, // content
- dataToSign, // detached content
+ support::coseSignEcDsa(readerPrivateKey, // private key for reader
+ {}, // content
+ encodedReaderAuthenticationBytes, // detached content
support::certificateChainJoin(readerCertChain));
ASSERT_TRUE(readerSignature);
@@ -528,17 +531,20 @@ TEST_P(ReaderAuthTests, ephemeralKeyNotInSessionTranscript) {
.add("Accessible by C", false)
.add("Accessible by None", false)))
.encode();
- vector<uint8_t> dataToSign = cppbor::Array()
- .add("ReaderAuthentication")
- .add(sessionTranscript.clone())
- .add(cppbor::Semantic(24, itemsRequestBytes))
- .encode();
+ vector<uint8_t> encodedReaderAuthentication =
+ cppbor::Array()
+ .add("ReaderAuthentication")
+ .add(sessionTranscript.clone())
+ .add(cppbor::Semantic(24, itemsRequestBytes))
+ .encode();
+ vector<uint8_t> encodedReaderAuthenticationBytes =
+ cppbor::Semantic(24, encodedReaderAuthentication).encode();
vector<vector<uint8_t>> readerCertChain = {cert_reader_SelfSigned_};
optional<vector<uint8_t>> readerSignature =
- support::coseSignEcDsa(readerPrivateKey_, // private key for reader
- {}, // content
- dataToSign, // detached content
+ support::coseSignEcDsa(readerPrivateKey_, // private key for reader
+ {}, // content
+ encodedReaderAuthenticationBytes, // detached content
support::certificateChainJoin(readerCertChain));
ASSERT_TRUE(readerSignature);
diff --git a/identity/aidl/vts/VtsHalIdentityEndToEndTest.cpp b/identity/aidl/vts/VtsHalIdentityEndToEndTest.cpp
index a0c4416115..1577293521 100644
--- a/identity/aidl/vts/VtsHalIdentityEndToEndTest.cpp
+++ b/identity/aidl/vts/VtsHalIdentityEndToEndTest.cpp
@@ -319,7 +319,7 @@ TEST_P(IdentityAidl, createAndRetrieveCredential) {
cppbor::Array sessionTranscript = cppbor::Array()
.add(cppbor::Semantic(24, deviceEngagementBytes))
.add(cppbor::Semantic(24, eReaderPubBytes));
- vector<uint8_t> sessionTranscriptBytes = sessionTranscript.encode();
+ vector<uint8_t> sessionTranscriptEncoded = sessionTranscript.encode();
vector<uint8_t> itemsRequestBytes =
cppbor::Map("nameSpaces",
@@ -347,14 +347,17 @@ TEST_P(IdentityAidl, createAndRetrieveCredential) {
" },\n"
"}",
cborPretty);
- vector<uint8_t> dataToSign = cppbor::Array()
- .add("ReaderAuthentication")
- .add(sessionTranscript.clone())
- .add(cppbor::Semantic(24, itemsRequestBytes))
- .encode();
+ vector<uint8_t> encodedReaderAuthentication =
+ cppbor::Array()
+ .add("ReaderAuthentication")
+ .add(sessionTranscript.clone())
+ .add(cppbor::Semantic(24, itemsRequestBytes))
+ .encode();
+ vector<uint8_t> encodedReaderAuthenticationBytes =
+ cppbor::Semantic(24, encodedReaderAuthentication).encode();
optional<vector<uint8_t>> readerSignature =
- support::coseSignEcDsa(readerKey, {}, // content
- dataToSign, // detached content
+ support::coseSignEcDsa(readerKey, {}, // content
+ encodedReaderAuthenticationBytes, // detached content
readerCertificate.value());
ASSERT_TRUE(readerSignature);
@@ -388,7 +391,7 @@ TEST_P(IdentityAidl, createAndRetrieveCredential) {
credential->setVerificationToken(verificationToken);
ASSERT_TRUE(credential
->startRetrieval(secureProfiles.value(), authToken, itemsRequestBytes,
- signingKeyBlob, sessionTranscriptBytes,
+ signingKeyBlob, sessionTranscriptEncoded,
readerSignature.value(), testEntriesEntryCounts)
.isOk());
@@ -432,7 +435,7 @@ TEST_P(IdentityAidl, createAndRetrieveCredential) {
" },\n"
"}",
cborPretty);
- // The data that is MACed is ["DeviceAuthentication", sessionTranscriptBytes, docType,
+ // The data that is MACed is ["DeviceAuthentication", sessionTranscript, docType,
// deviceNameSpacesBytes] so build up that structure
cppbor::Array deviceAuthentication;
deviceAuthentication.add("DeviceAuthentication");
@@ -441,7 +444,8 @@ TEST_P(IdentityAidl, createAndRetrieveCredential) {
string docType = "org.iso.18013-5.2019.mdl";
deviceAuthentication.add(docType);
deviceAuthentication.add(cppbor::Semantic(24, deviceNameSpacesBytes));
- vector<uint8_t> encodedDeviceAuthentication = deviceAuthentication.encode();
+ vector<uint8_t> deviceAuthenticationBytes =
+ cppbor::Semantic(24, deviceAuthentication.encode()).encode();
// Derive the key used for MACing.
optional<vector<uint8_t>> readerEphemeralPrivateKey =
@@ -449,13 +453,20 @@ TEST_P(IdentityAidl, createAndRetrieveCredential) {
optional<vector<uint8_t>> sharedSecret =
support::ecdh(signingPubKey.value(), readerEphemeralPrivateKey.value());
ASSERT_TRUE(sharedSecret);
+ // Mix-in SessionTranscriptBytes
+ vector<uint8_t> sessionTranscriptBytes =
+ cppbor::Semantic(24, sessionTranscript.encode()).encode();
+ vector<uint8_t> sharedSecretWithSessionTranscriptBytes = sharedSecret.value();
+ std::copy(sessionTranscriptBytes.begin(), sessionTranscriptBytes.end(),
+ std::back_inserter(sharedSecretWithSessionTranscriptBytes));
vector<uint8_t> salt = {0x00};
vector<uint8_t> info = {};
- optional<vector<uint8_t>> derivedKey = support::hkdf(sharedSecret.value(), salt, info, 32);
+ optional<vector<uint8_t>> derivedKey =
+ support::hkdf(sharedSecretWithSessionTranscriptBytes, salt, info, 32);
ASSERT_TRUE(derivedKey);
optional<vector<uint8_t>> calculatedMac =
- support::coseMac0(derivedKey.value(), {}, // payload
- encodedDeviceAuthentication); // detached content
+ support::coseMac0(derivedKey.value(), {}, // payload
+ deviceAuthenticationBytes); // detached content
ASSERT_TRUE(calculatedMac);
EXPECT_EQ(mac, calculatedMac);
}
diff --git a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
index 16b313a855..449b8f369d 100644
--- a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
@@ -315,8 +315,7 @@ class CompilationCachingTestBase : public testing::Test {
void saveModelToCache(const Model& model, const hidl_vec<hidl_handle>& modelCache,
const hidl_vec<hidl_handle>& dataCache,
- sp<IPreparedModel>* preparedModel = nullptr,
- bool allowGeneralFailure = false) {
+ sp<IPreparedModel>* preparedModel = nullptr) {
if (preparedModel != nullptr) *preparedModel = nullptr;
// Launch prepare model.
@@ -330,10 +329,7 @@ class CompilationCachingTestBase : public testing::Test {
// Retrieve prepared model.
preparedModelCallback->wait();
- const auto prepareCallbackStatus = preparedModelCallback->getStatus();
- if (!allowGeneralFailure || prepareCallbackStatus != ErrorStatus::GENERAL_FAILURE) {
- ASSERT_EQ(prepareCallbackStatus, ErrorStatus::NONE);
- }
+ ASSERT_EQ(preparedModelCallback->getStatus(), ErrorStatus::NONE);
if (preparedModel != nullptr) {
*preparedModel = IPreparedModel::castFrom(preparedModelCallback->getPreparedModel())
.withDefault(nullptr);
@@ -1026,8 +1022,7 @@ static void copyCacheFiles(const std::vector<std::vector<std::string>>& from,
// Number of operations in the large test model.
constexpr uint32_t kLargeModelSize = 100;
-constexpr uint32_t kNumSuccessfulIterationsTOCTOU = 100;
-constexpr uint32_t kMaxNumFailedIterationsTOCTOU = 100;
+constexpr uint32_t kNumIterationsTOCTOU = 100;
TEST_P(CompilationCachingTest, SaveToCache_TOCTOU) {
if (!mIsCachingSupported) return;
@@ -1055,30 +1050,18 @@ TEST_P(CompilationCachingTest, SaveToCache_TOCTOU) {
// Use a different token for modelAdd.
mToken[0]++;
- // This test is probabilistic, so we run it multiple times. We allow the compilation to fail
- // because it is not related to the security aspect of the TOCTOU test. However, we need to have
- // enough successful iterations to ensure the test coverage.
- uint32_t numSuccessfulIterations = 0, numFailedIterations = 0;
- while (numSuccessfulIterations < kNumSuccessfulIterationsTOCTOU) {
+ // This test is probabilistic, so we run it multiple times.
+ for (uint32_t i = 0; i < kNumIterationsTOCTOU; i++) {
// Save the modelAdd compilation to cache.
{
hidl_vec<hidl_handle> modelCache, dataCache;
createCacheHandles(mModelCache, AccessMode::READ_WRITE, &modelCache);
createCacheHandles(mDataCache, AccessMode::READ_WRITE, &dataCache);
- sp<IPreparedModel> preparedModel = nullptr;
// Spawn a thread to copy the cache content concurrently while saving to cache.
std::thread thread(copyCacheFiles, std::cref(modelCacheMul), std::cref(mModelCache));
- saveModelToCache(modelAdd, modelCache, dataCache, &preparedModel,
- /*allowGeneralFailure=*/true);
+ saveModelToCache(modelAdd, modelCache, dataCache);
thread.join();
-
- if (preparedModel == nullptr) {
- numFailedIterations++;
- ASSERT_LE(numFailedIterations, kMaxNumFailedIterationsTOCTOU);
- } else {
- numSuccessfulIterations++;
- }
}
// Retrieve preparedModel from cache.
@@ -1129,26 +1112,14 @@ TEST_P(CompilationCachingTest, PrepareFromCache_TOCTOU) {
// Use a different token for modelAdd.
mToken[0]++;
- // This test is probabilistic, so we run it multiple times. We allow the compilation to fail
- // because it is not related to the security aspect of the TOCTOU test. However, we need to have
- // enough successful iterations to ensure the test coverage.
- uint32_t numSuccessfulIterations = 0, numFailedIterations = 0;
- while (numSuccessfulIterations < kNumSuccessfulIterationsTOCTOU) {
+ // This test is probabilistic, so we run it multiple times.
+ for (uint32_t i = 0; i < kNumIterationsTOCTOU; i++) {
// Save the modelAdd compilation to cache.
{
hidl_vec<hidl_handle> modelCache, dataCache;
createCacheHandles(mModelCache, AccessMode::READ_WRITE, &modelCache);
createCacheHandles(mDataCache, AccessMode::READ_WRITE, &dataCache);
- sp<IPreparedModel> preparedModel = nullptr;
- saveModelToCache(modelAdd, modelCache, dataCache, &preparedModel,
- /*allowGeneralFailure=*/true);
-
- if (preparedModel == nullptr) {
- numFailedIterations++;
- ASSERT_LE(numFailedIterations, kMaxNumFailedIterationsTOCTOU);
- } else {
- numSuccessfulIterations++;
- }
+ saveModelToCache(modelAdd, modelCache, dataCache);
}
// Retrieve preparedModel from cache.
diff --git a/neuralnetworks/1.3/types.hal b/neuralnetworks/1.3/types.hal
index 39ea4c24f2..3b2b14c98c 100644
--- a/neuralnetworks/1.3/types.hal
+++ b/neuralnetworks/1.3/types.hal
@@ -5102,11 +5102,15 @@ enum OperationType : int32_t {
* The inputs and outputs of the two referenced subgraphs must agree with the
* signature of this operation. That is, if the operation has (3 + n) inputs
* and m outputs, both subgraphs must have n inputs and m outputs with the same
- * types as the corresponding operation inputs and outputs.
+ * types, ranks, dimensions, scales,
+ * zeroPoints, and extraParams as the corresponding operation inputs and
+ * outputs.
+ * All of the operands mentioned must have fully specified dimensions.
*
* Inputs:
* * 0: A value of type {@link OperandType::TENSOR_BOOL8} and shape [1]
* that determines which of the two referenced subgraphs to execute.
+ * The operand must have fully specified dimensions.
* * 1: A {@link OperandType::SUBGRAPH} reference to the subgraph to be
* executed if the condition is true.
* * 2: A {@link OperandType::SUBGRAPH} reference to the subgraph to be
@@ -5165,13 +5169,17 @@ enum OperationType : int32_t {
* Inputs:
* * 0: A {@link OperandType::SUBGRAPH} reference to the condition
* subgraph. The subgraph must have (m + k + n) inputs with
- * the same types as the corresponding inputs of the WHILE operation
- * and exactly one output of {@link OperandType::TENSOR_BOOL8}
- * and shape [1].
+ * the same types, ranks, dimensions,
+ * scales, zeroPoints, and extraParams as the corresponding inputs of
+ * the WHILE operation and exactly one output of
+ * {@link OperandType::TENSOR_BOOL8} and shape [1].
+ * All of the operands mentioned must have fully specified dimensions.
* * 1: A {@link OperandType::SUBGRAPH} reference to the body subgraph.
* The subgraph must have (m + k + n) inputs and (m + k) outputs with
- * the same types as the corresponding inputs and outputs of the WHILE
- * operation.
+ * the same types, ranks, dimensions,
+ * scales, zeroPoints, and extraParams as the corresponding inputs and
+ * outputs of the WHILE operation.
+ * All of the operands mentioned must have fully specified dimensions.
* * (m inputs): Initial values for input-output operands.
* * (k inputs): Initial values for state-only operands.
* * (n inputs): Values for input-only operands.
@@ -5491,7 +5499,9 @@ struct Operand {
* If a tensor operand's dimensions are not fully specified, the
* dimensions of the operand are deduced from the operand
* dimensions and values of the operation for which that operand
- * is an output.
+ * is an output or from the corresponding {@link OperationType::IF} or
+ * {@link OperationType::WHILE} operation input operand dimensions in the
+ * case of referenced subgraph input operands.
*
* In the following situations, a tensor operand's dimensions must
* be fully specified:
@@ -5499,8 +5509,8 @@ struct Operand {
* . The operand has lifetime CONSTANT_COPY or
* CONSTANT_REFERENCE.
*
- * . The operand has lifetime SUBGRAPH_INPUT. Fully
- * specified dimensions must either be present in the
+ * . The operand has lifetime SUBGRAPH_INPUT and belongs to the main
+ * subgraph. Fully specified dimensions must either be present in the
* Operand or they must be provided in the corresponding
* RequestArgument.
* EXCEPTION: If the input is optional and omitted
diff --git a/neuralnetworks/1.3/types.t b/neuralnetworks/1.3/types.t
index 0a6e45e487..7220e372a7 100644
--- a/neuralnetworks/1.3/types.t
+++ b/neuralnetworks/1.3/types.t
@@ -264,7 +264,9 @@ struct Operand {
* If a tensor operand's dimensions are not fully specified, the
* dimensions of the operand are deduced from the operand
* dimensions and values of the operation for which that operand
- * is an output.
+ * is an output or from the corresponding {@link OperationType::IF} or
+ * {@link OperationType::WHILE} operation input operand dimensions in the
+ * case of referenced subgraph input operands.
*
* In the following situations, a tensor operand's dimensions must
* be fully specified:
@@ -272,8 +274,8 @@ struct Operand {
* . The operand has lifetime CONSTANT_COPY or
* CONSTANT_REFERENCE.
*
- * . The operand has lifetime SUBGRAPH_INPUT. Fully
- * specified dimensions must either be present in the
+ * . The operand has lifetime SUBGRAPH_INPUT and belongs to the main
+ * subgraph. Fully specified dimensions must either be present in the
* Operand or they must be provided in the corresponding
* RequestArgument.
* EXCEPTION: If the input is optional and omitted
diff --git a/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp
index 382fc767f7..ac18c8ffcc 100644
--- a/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp
+++ b/neuralnetworks/1.3/vts/functional/CompilationCachingTests.cpp
@@ -318,8 +318,7 @@ class CompilationCachingTestBase : public testing::Test {
void saveModelToCache(const Model& model, const hidl_vec<hidl_handle>& modelCache,
const hidl_vec<hidl_handle>& dataCache,
- sp<IPreparedModel>* preparedModel = nullptr,
- bool allowGeneralFailure = false) {
+ sp<IPreparedModel>* preparedModel = nullptr) {
if (preparedModel != nullptr) *preparedModel = nullptr;
// Launch prepare model.
@@ -333,10 +332,7 @@ class CompilationCachingTestBase : public testing::Test {
// Retrieve prepared model.
preparedModelCallback->wait();
- const auto prepareCallbackStatus = preparedModelCallback->getStatus();
- if (!allowGeneralFailure || prepareCallbackStatus != ErrorStatus::GENERAL_FAILURE) {
- ASSERT_EQ(prepareCallbackStatus, ErrorStatus::NONE);
- }
+ ASSERT_EQ(preparedModelCallback->getStatus(), ErrorStatus::NONE);
if (preparedModel != nullptr) {
*preparedModel = IPreparedModel::castFrom(preparedModelCallback->getPreparedModel())
.withDefault(nullptr);
@@ -1017,8 +1013,7 @@ static void copyCacheFiles(const std::vector<std::vector<std::string>>& from,
// Number of operations in the large test model.
constexpr uint32_t kLargeModelSize = 100;
-constexpr uint32_t kNumSuccessfulIterationsTOCTOU = 100;
-constexpr uint32_t kMaxNumFailedIterationsTOCTOU = 100;
+constexpr uint32_t kNumIterationsTOCTOU = 100;
TEST_P(CompilationCachingTest, SaveToCache_TOCTOU) {
if (!mIsCachingSupported) return;
@@ -1046,30 +1041,18 @@ TEST_P(CompilationCachingTest, SaveToCache_TOCTOU) {
// Use a different token for modelAdd.
mToken[0]++;
- // This test is probabilistic, so we run it multiple times. We allow the compilation to fail
- // because it is not related to the security aspect of the TOCTOU test. However, we need to have
- // enough successful iterations to ensure the test coverage.
- uint32_t numSuccessfulIterations = 0, numFailedIterations = 0;
- while (numSuccessfulIterations < kNumSuccessfulIterationsTOCTOU) {
+ // This test is probabilistic, so we run it multiple times.
+ for (uint32_t i = 0; i < kNumIterationsTOCTOU; i++) {
// Save the modelAdd compilation to cache.
{
hidl_vec<hidl_handle> modelCache, dataCache;
createCacheHandles(mModelCache, AccessMode::READ_WRITE, &modelCache);
createCacheHandles(mDataCache, AccessMode::READ_WRITE, &dataCache);
- sp<IPreparedModel> preparedModel = nullptr;
// Spawn a thread to copy the cache content concurrently while saving to cache.
std::thread thread(copyCacheFiles, std::cref(modelCacheMul), std::cref(mModelCache));
- saveModelToCache(modelAdd, modelCache, dataCache, &preparedModel,
- /*allowGeneralFailure=*/true);
+ saveModelToCache(modelAdd, modelCache, dataCache);
thread.join();
-
- if (preparedModel == nullptr) {
- numFailedIterations++;
- ASSERT_LE(numFailedIterations, kMaxNumFailedIterationsTOCTOU);
- } else {
- numSuccessfulIterations++;
- }
}
// Retrieve preparedModel from cache.
@@ -1120,26 +1103,14 @@ TEST_P(CompilationCachingTest, PrepareFromCache_TOCTOU) {
// Use a different token for modelAdd.
mToken[0]++;
- // This test is probabilistic, so we run it multiple times. We allow the compilation to fail
- // because it is not related to the security aspect of the TOCTOU test. However, we need to have
- // enough successful iterations to ensure the test coverage.
- uint32_t numSuccessfulIterations = 0, numFailedIterations = 0;
- while (numSuccessfulIterations < kNumSuccessfulIterationsTOCTOU) {
+ // This test is probabilistic, so we run it multiple times.
+ for (uint32_t i = 0; i < kNumIterationsTOCTOU; i++) {
// Save the modelAdd compilation to cache.
{
hidl_vec<hidl_handle> modelCache, dataCache;
createCacheHandles(mModelCache, AccessMode::READ_WRITE, &modelCache);
createCacheHandles(mDataCache, AccessMode::READ_WRITE, &dataCache);
- sp<IPreparedModel> preparedModel = nullptr;
- saveModelToCache(modelAdd, modelCache, dataCache, &preparedModel,
- /*allowGeneralFailure=*/true);
-
- if (preparedModel == nullptr) {
- numFailedIterations++;
- ASSERT_LE(numFailedIterations, kMaxNumFailedIterationsTOCTOU);
- } else {
- numSuccessfulIterations++;
- }
+ saveModelToCache(modelAdd, modelCache, dataCache);
}
// Retrieve preparedModel from cache.
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
index 125ea0cce6..8e6cf860af 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_cell_broadcast.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -22,6 +23,7 @@ using namespace ::android::hardware::radio::V1_0;
* Test IRadio.setGsmBroadcastConfig() for the response returned.
*/
TEST_P(RadioHidlTest, setGsmBroadcastConfig) {
+ LOG(DEBUG) << "setGsmBroadcastConfig";
serial = GetRandomSerialNumber();
// Create GsmBroadcastSmsConfigInfo #1
@@ -79,12 +81,14 @@ TEST_P(RadioHidlTest, setGsmBroadcastConfig) {
RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setGsmBroadcastConfig finished";
}
/*
* Test IRadio.getGsmBroadcastConfig() for the response returned.
*/
TEST_P(RadioHidlTest, getGsmBroadcastConfig) {
+ LOG(DEBUG) << "getGsmBroadcastConfig";
serial = GetRandomSerialNumber();
radio->getGsmBroadcastConfig(serial);
@@ -99,12 +103,14 @@ TEST_P(RadioHidlTest, getGsmBroadcastConfig) {
{RadioError::NONE, RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getGsmBroadcastConfig finished";
}
/*
* Test IRadio.setCdmaBroadcastConfig() for the response returned.
*/
TEST_P(RadioHidlTest, setCdmaBroadcastConfig) {
+ LOG(DEBUG) << "setCdmaBroadcastConfig";
serial = GetRandomSerialNumber();
CdmaBroadcastSmsConfigInfo cbSmsConfig;
@@ -126,12 +132,14 @@ TEST_P(RadioHidlTest, setCdmaBroadcastConfig) {
{RadioError::NONE, RadioError::INVALID_MODEM_STATE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setCdmaBroadcastConfig finished";
}
/*
* Test IRadio.getCdmaBroadcastConfig() for the response returned.
*/
TEST_P(RadioHidlTest, getCdmaBroadcastConfig) {
+ LOG(DEBUG) << "getCdmaBroadcastConfig";
serial = GetRandomSerialNumber();
radio->getCdmaBroadcastConfig(serial);
@@ -144,12 +152,14 @@ TEST_P(RadioHidlTest, getCdmaBroadcastConfig) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getCdmaBroadcastConfig finished";
}
/*
* Test IRadio.setCdmaBroadcastActivation() for the response returned.
*/
TEST_P(RadioHidlTest, setCdmaBroadcastActivation) {
+ LOG(DEBUG) << "setCdmaBroadcastActivation";
serial = GetRandomSerialNumber();
bool activate = false;
@@ -164,12 +174,14 @@ TEST_P(RadioHidlTest, setCdmaBroadcastActivation) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setCdmaBroadcastActivation finished";
}
/*
* Test IRadio.setGsmBroadcastActivation() for the response returned.
*/
TEST_P(RadioHidlTest, setGsmBroadcastActivation) {
+ LOG(DEBUG) << "setGsmBroadcastActivation";
serial = GetRandomSerialNumber();
bool activate = false;
@@ -186,4 +198,5 @@ TEST_P(RadioHidlTest, setGsmBroadcastActivation) {
RadioError::INVALID_STATE, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setGsmBroadcastActivation finished";
}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
index d937d74403..e3ee9d4ff3 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_data.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -22,6 +23,7 @@ using namespace ::android::hardware::radio::V1_0;
* Test IRadio.getDataRegistrationState() for the response returned.
*/
TEST_P(RadioHidlTest, getDataRegistrationState) {
+ LOG(DEBUG) << "getDataRegistrationState";
serial = GetRandomSerialNumber();
radio->getDataRegistrationState(serial);
@@ -94,12 +96,14 @@ TEST_P(RadioHidlTest, getDataRegistrationState) {
}
}
}
+ LOG(DEBUG) << "getDataRegistrationState finished";
}
/*
* Test IRadio.setupDataCall() for the response returned.
*/
TEST_P(RadioHidlTest, setupDataCall) {
+ LOG(DEBUG) << "setupDataCall";
serial = GetRandomSerialNumber();
RadioTechnology radioTechnology = RadioTechnology::LTE;
@@ -142,12 +146,14 @@ TEST_P(RadioHidlTest, setupDataCall) {
RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT},
CHECK_OEM_ERROR));
}
+ LOG(DEBUG) << "setupDataCall finished";
}
/*
* Test IRadio.deactivateDataCall() for the response returned.
*/
TEST_P(RadioHidlTest, deactivateDataCall) {
+ LOG(DEBUG) << "deactivateDataCall";
serial = GetRandomSerialNumber();
int cid = 1;
bool reasonRadioShutDown = false;
@@ -164,12 +170,14 @@ TEST_P(RadioHidlTest, deactivateDataCall) {
RadioError::SIM_ABSENT, RadioError::INVALID_CALL_ID},
CHECK_OEM_ERROR));
}
+ LOG(DEBUG) << "deactivateDataCall finished";
}
/*
* Test IRadio.getDataCallList() for the response returned.
*/
TEST_P(RadioHidlTest, getDataCallList) {
+ LOG(DEBUG) << "getDataCallList";
serial = GetRandomSerialNumber();
radio->getDataCallList(serial);
@@ -183,12 +191,14 @@ TEST_P(RadioHidlTest, getDataCallList) {
radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT}));
}
+ LOG(DEBUG) << "getDataCallList finished";
}
/*
* Test IRadio.setInitialAttachApn() for the response returned.
*/
TEST_P(RadioHidlTest, setInitialAttachApn) {
+ LOG(DEBUG) << "setInitialAttachApn";
serial = GetRandomSerialNumber();
DataProfileInfo dataProfileInfo;
@@ -226,12 +236,14 @@ TEST_P(RadioHidlTest, setInitialAttachApn) {
RadioError::SUBSCRIPTION_NOT_AVAILABLE},
CHECK_OEM_ERROR));
}
+ LOG(DEBUG) << "setInitialAttachApn finished";
}
/*
* Test IRadio.setDataAllowed() for the response returned.
*/
TEST_P(RadioHidlTest, setDataAllowed) {
+ LOG(DEBUG) << "setDataAllowed";
serial = GetRandomSerialNumber();
bool allow = true;
@@ -244,12 +256,14 @@ TEST_P(RadioHidlTest, setDataAllowed) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "setDataAllowed finished";
}
/*
* Test IRadio.setDataProfile() for the response returned.
*/
TEST_P(RadioHidlTest, setDataProfile) {
+ LOG(DEBUG) << "setDataProfile";
serial = GetRandomSerialNumber();
// Create a dataProfileInfo
@@ -289,4 +303,5 @@ TEST_P(RadioHidlTest, setDataProfile) {
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "setDataProfile finished";
}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
index 9568524f4f..8a977a91e1 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_icc.cpp
@@ -14,22 +14,26 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
/*
* Test IRadio.getIccCardStatus() for the response returned.
*/
TEST_P(RadioHidlTest, getIccCardStatus) {
+ LOG(DEBUG) << "getIccCardStatus";
EXPECT_LE(cardStatus.applications.size(), (unsigned int)RadioConst::CARD_MAX_APPS);
EXPECT_LT(cardStatus.gsmUmtsSubscriptionAppIndex, (int)RadioConst::CARD_MAX_APPS);
EXPECT_LT(cardStatus.cdmaSubscriptionAppIndex, (int)RadioConst::CARD_MAX_APPS);
EXPECT_LT(cardStatus.imsSubscriptionAppIndex, (int)RadioConst::CARD_MAX_APPS);
+ LOG(DEBUG) << "getIccCardStatus finished";
}
/*
* Test IRadio.supplyIccPinForApp() for the response returned
*/
TEST_P(RadioHidlTest, supplyIccPinForApp) {
+ LOG(DEBUG) << "supplyIccPinForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -49,12 +53,14 @@ TEST_P(RadioHidlTest, supplyIccPinForApp) {
{RadioError::PASSWORD_INCORRECT, RadioError::REQUEST_NOT_SUPPORTED}));
}
}
+ LOG(DEBUG) << "supplyIccPinForApp finished";
}
/*
* Test IRadio.supplyIccPukForApp() for the response returned.
*/
TEST_P(RadioHidlTest, supplyIccPukForApp) {
+ LOG(DEBUG) << "supplyIccPukForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -73,12 +79,14 @@ TEST_P(RadioHidlTest, supplyIccPukForApp) {
RadioError::INVALID_SIM_STATE}));
}
}
+ LOG(DEBUG) << "supplyIccPukForApp finished";
}
/*
* Test IRadio.supplyIccPin2ForApp() for the response returned.
*/
TEST_P(RadioHidlTest, supplyIccPin2ForApp) {
+ LOG(DEBUG) << "supplyIccPin2ForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -99,12 +107,14 @@ TEST_P(RadioHidlTest, supplyIccPin2ForApp) {
RadioError::SIM_PUK2}));
}
}
+ LOG(DEBUG) << "supplyIccPin2ForApp finished";
}
/*
* Test IRadio.supplyIccPuk2ForApp() for the response returned.
*/
TEST_P(RadioHidlTest, supplyIccPuk2ForApp) {
+ LOG(DEBUG) << "supplyIccPuk2ForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -123,12 +133,14 @@ TEST_P(RadioHidlTest, supplyIccPuk2ForApp) {
RadioError::INVALID_SIM_STATE}));
}
}
+ LOG(DEBUG) << "supplyIccPuk2ForApp finished";
}
/*
* Test IRadio.changeIccPinForApp() for the response returned.
*/
TEST_P(RadioHidlTest, changeIccPinForApp) {
+ LOG(DEBUG) << "changeIccPinForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -148,12 +160,14 @@ TEST_P(RadioHidlTest, changeIccPinForApp) {
{RadioError::PASSWORD_INCORRECT, RadioError::REQUEST_NOT_SUPPORTED}));
}
}
+ LOG(DEBUG) << "changeIccPinForApp finished";
}
/*
* Test IRadio.changeIccPin2ForApp() for the response returned.
*/
TEST_P(RadioHidlTest, changeIccPin2ForApp) {
+ LOG(DEBUG) << "changeIccPin2ForApp";
serial = GetRandomSerialNumber();
// Pass wrong password and check PASSWORD_INCORRECT returned for 3GPP and
@@ -174,6 +188,7 @@ TEST_P(RadioHidlTest, changeIccPin2ForApp) {
RadioError::SIM_PUK2}));
}
}
+ LOG(DEBUG) << "changeIccPin2ForApp finished";
}
/*
@@ -182,6 +197,7 @@ TEST_P(RadioHidlTest, changeIccPin2ForApp) {
* Test IRadio.getImsiForApp() for the response returned.
*/
TEST_P(RadioHidlTest, DISABLED_getImsiForApp) {
+ LOG(DEBUG) << "DISABLED_getImsiForApp";
serial = GetRandomSerialNumber();
// Check success returned while getting imsi for 3GPP and 3GPP2 apps only
@@ -205,12 +221,14 @@ TEST_P(RadioHidlTest, DISABLED_getImsiForApp) {
}
}
}
+ LOG(DEBUG) << "DISABLED_getImsiForApp finished";
}
/*
* Test IRadio.iccIOForApp() for the response returned.
*/
TEST_P(RadioHidlTest, iccIOForApp) {
+ LOG(DEBUG) << "iccIOForApp";
serial = GetRandomSerialNumber();
for (int i = 0; i < (int)cardStatus.applications.size(); i++) {
@@ -230,12 +248,14 @@ TEST_P(RadioHidlTest, iccIOForApp) {
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
}
+ LOG(DEBUG) << "iccIOForApp finished";
}
/*
* Test IRadio.iccTransmitApduBasicChannel() for the response returned.
*/
TEST_P(RadioHidlTest, iccTransmitApduBasicChannel) {
+ LOG(DEBUG) << "iccTransmitApduBasicChannel";
serial = GetRandomSerialNumber();
SimApdu msg;
memset(&msg, 0, sizeof(msg));
@@ -247,12 +267,14 @@ TEST_P(RadioHidlTest, iccTransmitApduBasicChannel) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
// TODO(sanketpadawe): Add test for error code
+ LOG(DEBUG) << "iccTransmitApduBasicChannel finished";
}
/*
* Test IRadio.iccOpenLogicalChannel() for the response returned.
*/
TEST_P(RadioHidlTest, 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.
@@ -262,12 +284,14 @@ TEST_P(RadioHidlTest, iccOpenLogicalChannel) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
}
+ LOG(DEBUG) << "iccOpenLogicalChannel finished";
}
/*
* Test IRadio.iccCloseLogicalChannel() for the response returned.
*/
TEST_P(RadioHidlTest, iccCloseLogicalChannel) {
+ LOG(DEBUG) << "iccCloseLogicalChannel";
serial = GetRandomSerialNumber();
// Try closing invalid channel and check INVALID_ARGUMENTS returned as error
radio->iccCloseLogicalChannel(serial, 0);
@@ -276,12 +300,14 @@ TEST_P(RadioHidlTest, iccCloseLogicalChannel) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
EXPECT_EQ(RadioError::INVALID_ARGUMENTS, radioRsp->rspInfo.error);
+ LOG(DEBUG) << "iccCloseLogicalChannel finished";
}
/*
* Test IRadio.iccTransmitApduLogicalChannel() for the response returned.
*/
TEST_P(RadioHidlTest, iccTransmitApduLogicalChannel) {
+ LOG(DEBUG) << "iccTransmitApduLogicalChannel";
serial = GetRandomSerialNumber();
SimApdu msg;
memset(&msg, 0, sizeof(msg));
@@ -293,12 +319,14 @@ TEST_P(RadioHidlTest, iccTransmitApduLogicalChannel) {
EXPECT_EQ(serial, radioRsp->rspInfo.serial);
// TODO(sanketpadawe): Add test for error code
+ LOG(DEBUG) << "iccTransmitApduLogicalChannel finished";
}
/*
* Test IRadio.requestIccSimAuthentication() for the response returned.
*/
TEST_P(RadioHidlTest, requestIccSimAuthentication) {
+ LOG(DEBUG) << "requestIccSimAuthentication";
serial = GetRandomSerialNumber();
// Pass wrong challenge string and check RadioError::INVALID_ARGUMENTS
@@ -312,12 +340,14 @@ TEST_P(RadioHidlTest, requestIccSimAuthentication) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "requestIccSimAuthentication finished";
}
/*
* Test IRadio.supplyNetworkDepersonalization() for the response returned.
*/
TEST_P(RadioHidlTest, supplyNetworkDepersonalization) {
+ LOG(DEBUG) << "supplyNetworkDepersonalization";
serial = GetRandomSerialNumber();
radio->supplyNetworkDepersonalization(serial, hidl_string("test"));
@@ -332,4 +362,5 @@ TEST_P(RadioHidlTest, supplyNetworkDepersonalization) {
RadioError::INVALID_SIM_STATE, RadioError::MODEM_ERR, RadioError::NO_MEMORY,
RadioError::PASSWORD_INCORRECT, RadioError::SIM_ABSENT, RadioError::SYSTEM_ERR}));
}
+ LOG(DEBUG) << "supplyNetworkDepersonalization finished";
}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
index 7228fb086b..3f964732f6 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_misc.cpp
@@ -14,12 +14,14 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
/*
* Test IRadio.getSignalStrength() for the response returned.
*/
TEST_P(RadioHidlTest, getSignalStrength) {
+ LOG(DEBUG) << "getSignalStrength";
serial = GetRandomSerialNumber();
radio->getSignalStrength(serial);
@@ -30,12 +32,14 @@ TEST_P(RadioHidlTest, getSignalStrength) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getSignalStrength finished";
}
/*
* Test IRadio.getVoiceRegistrationState() for the response returned.
*/
TEST_P(RadioHidlTest, getVoiceRegistrationState) {
+ LOG(DEBUG) << "getVoiceRegistrationState";
serial = GetRandomSerialNumber();
radio->getVoiceRegistrationState(serial);
@@ -46,12 +50,14 @@ TEST_P(RadioHidlTest, getVoiceRegistrationState) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getVoiceRegistrationState finished";
}
/*
* Test IRadio.getOperator() for the response returned.
*/
TEST_P(RadioHidlTest, getOperator) {
+ LOG(DEBUG) << "getOperator";
serial = GetRandomSerialNumber();
radio->getOperator(serial);
@@ -62,12 +68,14 @@ TEST_P(RadioHidlTest, getOperator) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getOperator finished";
}
/*
* Test IRadio.setRadioPower() for the response returned.
*/
TEST_P(RadioHidlTest, setRadioPower) {
+ LOG(DEBUG) << "setRadioPower";
serial = GetRandomSerialNumber();
radio->setRadioPower(serial, 1);
@@ -78,12 +86,14 @@ TEST_P(RadioHidlTest, setRadioPower) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "setRadioPower finished";
}
/*
* Test IRadio.getNetworkSelectionMode() for the response returned.
*/
TEST_P(RadioHidlTest, getNetworkSelectionMode) {
+ LOG(DEBUG) << "getNetworkSelectionMode";
serial = GetRandomSerialNumber();
radio->getNetworkSelectionMode(serial);
@@ -94,12 +104,14 @@ TEST_P(RadioHidlTest, getNetworkSelectionMode) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getNetworkSelectionMode finished";
}
/*
* Test IRadio.setNetworkSelectionModeAutomatic() for the response returned.
*/
TEST_P(RadioHidlTest, setNetworkSelectionModeAutomatic) {
+ LOG(DEBUG) << "setNetworkSelectionModeAutomatic";
serial = GetRandomSerialNumber();
radio->setNetworkSelectionModeAutomatic(serial);
@@ -113,12 +125,14 @@ TEST_P(RadioHidlTest, setNetworkSelectionModeAutomatic) {
{RadioError::NONE, RadioError::ILLEGAL_SIM_OR_ME, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setNetworkSelectionModeAutomatic finished";
}
/*
* Test IRadio.setNetworkSelectionModeManual() for the response returned.
*/
TEST_P(RadioHidlTest, setNetworkSelectionModeManual) {
+ LOG(DEBUG) << "setNetworkSelectionModeManual";
serial = GetRandomSerialNumber();
radio->setNetworkSelectionModeManual(serial, "123456");
@@ -132,12 +146,14 @@ TEST_P(RadioHidlTest, setNetworkSelectionModeManual) {
RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setNetworkSelectionModeManual finished";
}
/*
* Test IRadio.getAvailableNetworks() for the response returned.
*/
TEST_P(RadioHidlTest, getAvailableNetworks) {
+ LOG(DEBUG) << "getAvailableNetworks";
serial = GetRandomSerialNumber();
radio->getAvailableNetworks(serial);
@@ -153,12 +169,14 @@ TEST_P(RadioHidlTest, getAvailableNetworks) {
RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getAvailableNetworks finished";
}
/*
* Test IRadio.getBasebandVersion() for the response returned.
*/
TEST_P(RadioHidlTest, getBasebandVersion) {
+ LOG(DEBUG) << "getBasebandVersion";
serial = GetRandomSerialNumber();
radio->getBasebandVersion(serial);
@@ -169,12 +187,14 @@ TEST_P(RadioHidlTest, getBasebandVersion) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getBasebandVersion finished";
}
/*
* Test IRadio.setBandMode() for the response returned.
*/
TEST_P(RadioHidlTest, setBandMode) {
+ LOG(DEBUG) << "setBandMode";
serial = GetRandomSerialNumber();
radio->setBandMode(serial, RadioBandMode::BAND_MODE_USA);
@@ -186,12 +206,14 @@ TEST_P(RadioHidlTest, setBandMode) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setBandMode finished";
}
/*
* Test IRadio.getAvailableBandModes() for the response returned.
*/
TEST_P(RadioHidlTest, getAvailableBandModes) {
+ LOG(DEBUG) << "getAvailableBandModes";
serial = GetRandomSerialNumber();
radio->getAvailableBandModes(serial);
@@ -202,12 +224,14 @@ TEST_P(RadioHidlTest, getAvailableBandModes) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getAvailableBandModes finished";
}
/*
* Test IRadio.setPreferredNetworkType() for the response returned.
*/
TEST_P(RadioHidlTest, setPreferredNetworkType) {
+ LOG(DEBUG) << "setPreferredNetworkType";
serial = GetRandomSerialNumber();
radio->setPreferredNetworkType(serial, PreferredNetworkType::GSM_ONLY);
@@ -219,12 +243,14 @@ TEST_P(RadioHidlTest, setPreferredNetworkType) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setPreferredNetworkType finished";
}
/*
* Test IRadio.getPreferredNetworkType() for the response returned.
*/
TEST_P(RadioHidlTest, getPreferredNetworkType) {
+ LOG(DEBUG) << "getPreferredNetworkType";
serial = GetRandomSerialNumber();
radio->getPreferredNetworkType(serial);
@@ -235,12 +261,14 @@ TEST_P(RadioHidlTest, getPreferredNetworkType) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getPreferredNetworkType finished";
}
/*
* Test IRadio.getNeighboringCids() for the response returned.
*/
TEST_P(RadioHidlTest, getNeighboringCids) {
+ LOG(DEBUG) << "getNeighboringCids";
serial = GetRandomSerialNumber();
radio->getNeighboringCids(serial);
@@ -253,12 +281,14 @@ TEST_P(RadioHidlTest, getNeighboringCids) {
{RadioError::NONE, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getNeighboringCids finished";
}
/*
* Test IRadio.setLocationUpdates() for the response returned.
*/
TEST_P(RadioHidlTest, setLocationUpdates) {
+ LOG(DEBUG) << "setLocationUpdates";
serial = GetRandomSerialNumber();
radio->setLocationUpdates(serial, true);
@@ -270,12 +300,14 @@ TEST_P(RadioHidlTest, setLocationUpdates) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE, RadioError::SIM_ABSENT}));
}
+ LOG(DEBUG) << "setLocationUpdates finished";
}
/*
* Test IRadio.setCdmaRoamingPreference() for the response returned.
*/
TEST_P(RadioHidlTest, setCdmaRoamingPreference) {
+ LOG(DEBUG) << "setCdmaRoamingPreference";
serial = GetRandomSerialNumber();
radio->setCdmaRoamingPreference(serial, CdmaRoamingType::HOME_NETWORK);
@@ -288,12 +320,14 @@ TEST_P(RadioHidlTest, setCdmaRoamingPreference) {
radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::SIM_ABSENT, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "setCdmaRoamingPreference finished";
}
/*
* Test IRadio.getCdmaRoamingPreference() for the response returned.
*/
TEST_P(RadioHidlTest, getCdmaRoamingPreference) {
+ LOG(DEBUG) << "getCdmaRoamingPreference";
serial = GetRandomSerialNumber();
radio->getCdmaRoamingPreference(serial);
@@ -307,12 +341,14 @@ TEST_P(RadioHidlTest, getCdmaRoamingPreference) {
{RadioError::NONE, RadioError::SIM_ABSENT, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getCdmaRoamingPreference finished";
}
/*
* Test IRadio.getTTYMode() for the response returned.
*/
TEST_P(RadioHidlTest, getTTYMode) {
+ LOG(DEBUG) << "getTTYMode";
serial = GetRandomSerialNumber();
radio->getTTYMode(serial);
@@ -323,12 +359,14 @@ TEST_P(RadioHidlTest, getTTYMode) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getTTYMode finished";
}
/*
* Test IRadio.setTTYMode() for the response returned.
*/
TEST_P(RadioHidlTest, setTTYMode) {
+ LOG(DEBUG) << "setTTYMode";
serial = GetRandomSerialNumber();
radio->setTTYMode(serial, TtyMode::OFF);
@@ -339,12 +377,14 @@ TEST_P(RadioHidlTest, setTTYMode) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "setTTYMode finished";
}
/*
* Test IRadio.setPreferredVoicePrivacy() for the response returned.
*/
TEST_P(RadioHidlTest, setPreferredVoicePrivacy) {
+ LOG(DEBUG) << "setPreferredVoicePrivacy";
serial = GetRandomSerialNumber();
radio->setPreferredVoicePrivacy(serial, true);
@@ -356,12 +396,14 @@ TEST_P(RadioHidlTest, setPreferredVoicePrivacy) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "setPreferredVoicePrivacy finished";
}
/*
* Test IRadio.getPreferredVoicePrivacy() for the response returned.
*/
TEST_P(RadioHidlTest, getPreferredVoicePrivacy) {
+ LOG(DEBUG) << "getPreferredVoicePrivacy";
serial = GetRandomSerialNumber();
radio->getPreferredVoicePrivacy(serial);
@@ -373,12 +415,14 @@ TEST_P(RadioHidlTest, getPreferredVoicePrivacy) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "getPreferredVoicePrivacy finished";
}
/*
* Test IRadio.getCDMASubscription() for the response returned.
*/
TEST_P(RadioHidlTest, getCDMASubscription) {
+ LOG(DEBUG) << "getCDMASubscription";
serial = GetRandomSerialNumber();
radio->getCDMASubscription(serial);
@@ -391,12 +435,14 @@ TEST_P(RadioHidlTest, getCDMASubscription) {
radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
+ LOG(DEBUG) << "getCDMASubscription finished";
}
/*
* Test IRadio.getDeviceIdentity() for the response returned.
*/
TEST_P(RadioHidlTest, getDeviceIdentity) {
+ LOG(DEBUG) << "getDeviceIdentity";
serial = GetRandomSerialNumber();
radio->getDeviceIdentity(serial);
@@ -408,12 +454,14 @@ TEST_P(RadioHidlTest, getDeviceIdentity) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::EMPTY_RECORD}));
}
+ LOG(DEBUG) << "getDeviceIdentity finished";
}
/*
* Test IRadio.exitEmergencyCallbackMode() for the response returned.
*/
TEST_P(RadioHidlTest, exitEmergencyCallbackMode) {
+ LOG(DEBUG) << "exitEmergencyCallbackMode";
serial = GetRandomSerialNumber();
radio->exitEmergencyCallbackMode(serial);
@@ -426,12 +474,14 @@ TEST_P(RadioHidlTest, exitEmergencyCallbackMode) {
radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
+ LOG(DEBUG) << "exitEmergencyCallbackMode finished";
}
/*
* Test IRadio.getCdmaSubscriptionSource() for the response returned.
*/
TEST_P(RadioHidlTest, getCdmaSubscriptionSource) {
+ LOG(DEBUG) << "getCdmaSubscriptionSource";
serial = GetRandomSerialNumber();
radio->getCdmaSubscriptionSource(serial);
@@ -444,12 +494,14 @@ TEST_P(RadioHidlTest, getCdmaSubscriptionSource) {
radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
+ LOG(DEBUG) << "getCdmaSubscriptionSource finished";
}
/*
* Test IRadio.setCdmaSubscriptionSource() for the response returned.
*/
TEST_P(RadioHidlTest, setCdmaSubscriptionSource) {
+ LOG(DEBUG) << "setCdmaSubscriptionSource";
serial = GetRandomSerialNumber();
radio->setCdmaSubscriptionSource(serial, CdmaSubscriptionSource::RUIM_SIM);
@@ -463,12 +515,14 @@ TEST_P(RadioHidlTest, setCdmaSubscriptionSource) {
{RadioError::NONE, RadioError::SIM_ABSENT, RadioError::SUBSCRIPTION_NOT_AVAILABLE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setCdmaSubscriptionSource finished";
}
/*
* Test IRadio.getVoiceRadioTechnology() for the response returned.
*/
TEST_P(RadioHidlTest, getVoiceRadioTechnology) {
+ LOG(DEBUG) << "getVoiceRadioTechnology";
serial = GetRandomSerialNumber();
radio->getVoiceRadioTechnology(serial);
@@ -479,12 +533,14 @@ TEST_P(RadioHidlTest, getVoiceRadioTechnology) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getVoiceRadioTechnology finished";
}
/*
* Test IRadio.getCellInfoList() for the response returned.
*/
TEST_P(RadioHidlTest, getCellInfoList) {
+ LOG(DEBUG) << "getCellInfoList";
serial = GetRandomSerialNumber();
radio->getCellInfoList(serial);
@@ -497,12 +553,14 @@ TEST_P(RadioHidlTest, getCellInfoList) {
{RadioError::NONE, RadioError::NO_NETWORK_FOUND},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getCellInfoList finished";
}
/*
* Test IRadio.setCellInfoListRate() for the response returned.
*/
TEST_P(RadioHidlTest, setCellInfoListRate) {
+ LOG(DEBUG) << "setCellInfoListRate";
serial = GetRandomSerialNumber();
// TODO(sanketpadawe): RIL crashes with value of rate = 10
@@ -515,12 +573,14 @@ TEST_P(RadioHidlTest, setCellInfoListRate) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "setCellInfoListRate finished";
}
/*
* Test IRadio.nvReadItem() for the response returned.
*/
TEST_P(RadioHidlTest, nvReadItem) {
+ LOG(DEBUG) << "nvReadItem";
serial = GetRandomSerialNumber();
radio->nvReadItem(serial, NvItem::LTE_BAND_ENABLE_25);
@@ -532,12 +592,14 @@ TEST_P(RadioHidlTest, nvReadItem) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "nvReadItem finished";
}
/*
* Test IRadio.nvWriteItem() for the response returned.
*/
TEST_P(RadioHidlTest, nvWriteItem) {
+ LOG(DEBUG) << "nvWriteItem";
serial = GetRandomSerialNumber();
NvWriteItem item;
memset(&item, 0, sizeof(item));
@@ -552,12 +614,14 @@ TEST_P(RadioHidlTest, nvWriteItem) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "nvWriteItem finished";
}
/*
* Test IRadio.nvWriteCdmaPrl() for the response returned.
*/
TEST_P(RadioHidlTest, nvWriteCdmaPrl) {
+ LOG(DEBUG) << "nvWriteCdmaPrl";
serial = GetRandomSerialNumber();
std::vector<uint8_t> prl = {1, 2, 3, 4, 5};
@@ -570,12 +634,14 @@ TEST_P(RadioHidlTest, nvWriteCdmaPrl) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "nvWriteCdmaPrl finished";
}
/*
* Test IRadio.nvResetConfig() for the response returned.
*/
TEST_P(RadioHidlTest, nvResetConfig) {
+ LOG(DEBUG) << "nvResetConfig";
serial = GetRandomSerialNumber();
radio->nvResetConfig(serial, ResetNvType::FACTORY_RESET);
@@ -587,12 +653,14 @@ TEST_P(RadioHidlTest, nvResetConfig) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "nvResetConfig finished";
}
/*
* Test IRadio.setUiccSubscription() for the response returned.
*/
TEST_P(RadioHidlTest, setUiccSubscription) {
+ LOG(DEBUG) << "setUiccSubscription";
serial = GetRandomSerialNumber();
SelectUiccSub item;
memset(&item, 0, sizeof(item));
@@ -609,12 +677,14 @@ TEST_P(RadioHidlTest, setUiccSubscription) {
RadioError::MODEM_ERR, RadioError::SUBSCRIPTION_NOT_SUPPORTED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setUiccSubscription finished";
}
/*
* Test IRadio.getHardwareConfig() for the response returned.
*/
TEST_P(RadioHidlTest, getHardwareConfig) {
+ LOG(DEBUG) << "getHardwareConfig";
serial = GetRandomSerialNumber();
radio->getHardwareConfig(serial);
@@ -626,6 +696,7 @@ TEST_P(RadioHidlTest, getHardwareConfig) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getHardwareConfig finished";
}
/*
@@ -651,6 +722,7 @@ TEST_P(RadioHidlTest, DISABLED_requestShutdown) {
* Test IRadio.getRadioCapability() for the response returned.
*/
TEST_P(RadioHidlTest, getRadioCapability) {
+ LOG(DEBUG) << "getRadioCapability";
serial = GetRandomSerialNumber();
radio->getRadioCapability(serial);
@@ -661,12 +733,14 @@ TEST_P(RadioHidlTest, getRadioCapability) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getRadioCapability finished";
}
/*
* Test IRadio.setRadioCapability() for the response returned.
*/
TEST_P(RadioHidlTest, setRadioCapability) {
+ LOG(DEBUG) << "setRadioCapability";
serial = GetRandomSerialNumber();
RadioCapability rc;
memset(&rc, 0, sizeof(rc));
@@ -682,12 +756,14 @@ TEST_P(RadioHidlTest, setRadioCapability) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setRadioCapability finished";
}
/*
* Test IRadio.startLceService() for the response returned.
*/
TEST_P(RadioHidlTest, startLceService) {
+ LOG(DEBUG) << "startLceService";
serial = GetRandomSerialNumber();
radio->startLceService(serial, 5, true);
@@ -701,12 +777,14 @@ TEST_P(RadioHidlTest, startLceService) {
{RadioError::INTERNAL_ERR, RadioError::LCE_NOT_SUPPORTED,
RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT, RadioError::NONE}));
}
+ LOG(DEBUG) << "startLceService finished";
}
/*
* Test IRadio.stopLceService() for the response returned.
*/
TEST_P(RadioHidlTest, stopLceService) {
+ LOG(DEBUG) << "stopLceService";
serial = GetRandomSerialNumber();
radio->stopLceService(serial);
@@ -719,12 +797,14 @@ TEST_P(RadioHidlTest, stopLceService) {
{RadioError::NONE, RadioError::LCE_NOT_SUPPORTED,
RadioError::REQUEST_NOT_SUPPORTED, RadioError::SIM_ABSENT}));
}
+ LOG(DEBUG) << "stopLceService finished";
}
/*
* Test IRadio.pullLceData() for the response returned.
*/
TEST_P(RadioHidlTest, pullLceData) {
+ LOG(DEBUG) << "pullLceData";
serial = GetRandomSerialNumber();
radio->pullLceData(serial);
@@ -738,12 +818,14 @@ TEST_P(RadioHidlTest, pullLceData) {
RadioError::RADIO_NOT_AVAILABLE, RadioError::SIM_ABSENT},
CHECK_OEM_ERROR));
}
+ LOG(DEBUG) << "pullLceData finished";
}
/*
* Test IRadio.getModemActivityInfo() for the response returned.
*/
TEST_P(RadioHidlTest, getModemActivityInfo) {
+ LOG(DEBUG) << "getModemActivityInfo";
serial = GetRandomSerialNumber();
radio->getModemActivityInfo(serial);
@@ -755,6 +837,7 @@ TEST_P(RadioHidlTest, getModemActivityInfo) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "getModemActivityInfo finished";
}
/*
@@ -840,6 +923,7 @@ TEST_P(RadioHidlTest, DISABLED_setAllowedCarriers) {
* Test IRadio.getAllowedCarriers() for the response returned.
*/
TEST_P(RadioHidlTest, getAllowedCarriers) {
+ LOG(DEBUG) << "getAllowedCarriers";
serial = GetRandomSerialNumber();
radio->getAllowedCarriers(serial);
@@ -851,12 +935,14 @@ TEST_P(RadioHidlTest, getAllowedCarriers) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "getAllowedCarriers finished";
}
/*
* Test IRadio.sendDeviceState() for the response returned.
*/
TEST_P(RadioHidlTest, sendDeviceState) {
+ LOG(DEBUG) << "sendDeviceState";
serial = GetRandomSerialNumber();
radio->sendDeviceState(serial, DeviceStateType::POWER_SAVE_MODE, true);
@@ -870,12 +956,14 @@ TEST_P(RadioHidlTest, sendDeviceState) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "sendDeviceState finished";
}
/*
* Test IRadio.setIndicationFilter() for the response returned.
*/
TEST_P(RadioHidlTest, setIndicationFilter) {
+ LOG(DEBUG) << "setIndicationFilter";
serial = GetRandomSerialNumber();
radio->setIndicationFilter(serial, 1);
@@ -889,12 +977,14 @@ TEST_P(RadioHidlTest, setIndicationFilter) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "setIndicationFilter finished";
}
/*
* Test IRadio.setSimCardPower() for the response returned.
*/
TEST_P(RadioHidlTest, setSimCardPower) {
+ LOG(DEBUG) << "setSimCardPower";
serial = GetRandomSerialNumber();
radio->setSimCardPower(serial, true);
@@ -906,4 +996,5 @@ TEST_P(RadioHidlTest, setSimCardPower) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
{RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
}
+ LOG(DEBUG) << "setSimCardPower finished";
}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
index 58c3bbd7de..0807deec2d 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_sms.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -22,6 +23,7 @@ using namespace ::android::hardware::radio::V1_0;
* Test IRadio.sendSms() for the response returned.
*/
TEST_P(RadioHidlTest, sendSms) {
+ LOG(DEBUG) << "sendSms";
serial = GetRandomSerialNumber();
GsmSmsMessage msg;
msg.smscPdu = "";
@@ -40,12 +42,14 @@ TEST_P(RadioHidlTest, sendSms) {
CHECK_GENERAL_ERROR));
EXPECT_EQ(0, radioRsp->sendSmsResult.errorCode);
}
+ LOG(DEBUG) << "sendSms finished";
}
/*
* Test IRadio.sendSMSExpectMore() for the response returned.
*/
TEST_P(RadioHidlTest, sendSMSExpectMore) {
+ LOG(DEBUG) << "sendSMSExpectMore";
serial = GetRandomSerialNumber();
GsmSmsMessage msg;
msg.smscPdu = "";
@@ -66,12 +70,14 @@ TEST_P(RadioHidlTest, sendSMSExpectMore) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendSMSExpectMore finished";
}
/*
* Test IRadio.acknowledgeLastIncomingGsmSms() for the response returned.
*/
TEST_P(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
+ LOG(DEBUG) << "acknowledgeLastIncomingGsmSms";
serial = GetRandomSerialNumber();
bool success = true;
@@ -87,12 +93,14 @@ TEST_P(RadioHidlTest, acknowledgeLastIncomingGsmSms) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "acknowledgeLastIncomingGsmSms finished";
}
/*
* Test IRadio.acknowledgeIncomingGsmSmsWithPdu() for the response returned.
*/
TEST_P(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
+ LOG(DEBUG) << "acknowledgeIncomingGsmSmsWithPdu";
serial = GetRandomSerialNumber();
bool success = true;
std::string ackPdu = "";
@@ -106,12 +114,14 @@ TEST_P(RadioHidlTest, acknowledgeIncomingGsmSmsWithPdu) {
if (cardStatus.cardState == CardState::ABSENT) {
// TODO(shuoq): Will add error check when we know the expected error from QC
}
+ LOG(DEBUG) << "acknowledgeIncomingGsmSmsWithPdu finished";
}
/*
* Test IRadio.sendCdmaSms() for the response returned.
*/
TEST_P(RadioHidlTest, sendCdmaSms) {
+ LOG(DEBUG) << "sendCdmaSms";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAddress
@@ -150,12 +160,14 @@ TEST_P(RadioHidlTest, sendCdmaSms) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendCdmaSms finished";
}
/*
* Test IRadio.acknowledgeLastIncomingCdmaSms() for the response returned.
*/
TEST_P(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
+ LOG(DEBUG) << "acknowledgeLastIncomingCdmaSms";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAck
@@ -174,12 +186,14 @@ TEST_P(RadioHidlTest, acknowledgeLastIncomingCdmaSms) {
{RadioError::INVALID_ARGUMENTS, RadioError::NO_SMS_TO_ACK},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "acknowledgeLastIncomingCdmaSms finished";
}
/*
* Test IRadio.sendImsSms() for the response returned.
*/
TEST_P(RadioHidlTest, sendImsSms) {
+ LOG(DEBUG) << "sendImsSms";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAddress
@@ -224,12 +238,14 @@ TEST_P(RadioHidlTest, sendImsSms) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::INVALID_ARGUMENTS},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendImsSms finished";
}
/*
* Test IRadio.getSmscAddress() for the response returned.
*/
TEST_P(RadioHidlTest, getSmscAddress) {
+ LOG(DEBUG) << "getSmscAddress";
serial = GetRandomSerialNumber();
radio->getSmscAddress(serial);
@@ -244,12 +260,14 @@ TEST_P(RadioHidlTest, getSmscAddress) {
{RadioError::INVALID_MODEM_STATE, RadioError::INVALID_STATE, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getSmscAddress finished";
}
/*
* Test IRadio.setSmscAddress() for the response returned.
*/
TEST_P(RadioHidlTest, setSmscAddress) {
+ LOG(DEBUG) << "setSmscAddress";
serial = GetRandomSerialNumber();
hidl_string address = hidl_string("smscAddress");
@@ -265,12 +283,14 @@ TEST_P(RadioHidlTest, setSmscAddress) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_SMS_FORMAT, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setSmscAddress finished";
}
/*
* Test IRadio.writeSmsToSim() for the response returned.
*/
TEST_P(RadioHidlTest, writeSmsToSim) {
+ LOG(DEBUG) << "writeSmsToSim";
serial = GetRandomSerialNumber();
SmsWriteArgs smsWriteArgs;
smsWriteArgs.status = SmsWriteArgsStatus::REC_UNREAD;
@@ -291,12 +311,14 @@ TEST_P(RadioHidlTest, writeSmsToSim) {
RadioError::NO_RESOURCES, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "writeSmsToSim finished";
}
/*
* Test IRadio.deleteSmsOnSim() for the response returned.
*/
TEST_P(RadioHidlTest, deleteSmsOnSim) {
+ LOG(DEBUG) << "deleteSmsOnSim";
serial = GetRandomSerialNumber();
int index = 1;
@@ -314,12 +336,14 @@ TEST_P(RadioHidlTest, deleteSmsOnSim) {
RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "deleteSmsOnSim finished";
}
/*
* Test IRadio.writeSmsToRuim() for the response returned.
*/
TEST_P(RadioHidlTest, writeSmsToRuim) {
+ LOG(DEBUG) << "writeSmsToRuim";
serial = GetRandomSerialNumber();
// Create a CdmaSmsAddress
@@ -365,12 +389,14 @@ TEST_P(RadioHidlTest, writeSmsToRuim) {
RadioError::NO_SUCH_ENTRY, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "writeSmsToRuim finished";
}
/*
* Test IRadio.deleteSmsOnRuim() for the response returned.
*/
TEST_P(RadioHidlTest, deleteSmsOnRuim) {
+ LOG(DEBUG) << "deleteSmsOnRuim";
serial = GetRandomSerialNumber();
int index = 1;
@@ -416,12 +442,14 @@ TEST_P(RadioHidlTest, deleteSmsOnRuim) {
RadioError::MODEM_ERR, RadioError::NO_SUCH_ENTRY, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "deleteSmsOnRuim finished";
}
/*
* Test IRadio.reportSmsMemoryStatus() for the response returned.
*/
TEST_P(RadioHidlTest, reportSmsMemoryStatus) {
+ LOG(DEBUG) << "reportSmsMemoryStatus";
serial = GetRandomSerialNumber();
bool available = true;
@@ -437,4 +465,5 @@ TEST_P(RadioHidlTest, reportSmsMemoryStatus) {
RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "reportSmsMemoryStatus finished";
}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
index 1170111fba..193c25dcc0 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_stk.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
using namespace ::android::hardware::radio::V1_0;
@@ -22,6 +23,7 @@ using namespace ::android::hardware::radio::V1_0;
* Test IRadio.sendEnvelope() for the response returned.
*/
TEST_P(RadioHidlTest, sendEnvelope) {
+ LOG(DEBUG) << "sendEnvelope";
serial = GetRandomSerialNumber();
// Test with sending empty string
@@ -39,12 +41,14 @@ TEST_P(RadioHidlTest, sendEnvelope) {
RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendEnvelope finished";
}
/*
* Test IRadio.sendTerminalResponseToSim() for the response returned.
*/
TEST_P(RadioHidlTest, sendTerminalResponseToSim) {
+ LOG(DEBUG) << "sendTerminalResponseToSim";
serial = GetRandomSerialNumber();
// Test with sending empty string
@@ -62,12 +66,14 @@ TEST_P(RadioHidlTest, sendTerminalResponseToSim) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendTerminalResponseToSim finished";
}
/*
* Test IRadio.handleStkCallSetupRequestFromSim() for the response returned.
*/
TEST_P(RadioHidlTest, handleStkCallSetupRequestFromSim) {
+ LOG(DEBUG) << "handleStkCallSetupRequestFromSim";
serial = GetRandomSerialNumber();
bool accept = false;
@@ -83,12 +89,14 @@ TEST_P(RadioHidlTest, handleStkCallSetupRequestFromSim) {
RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "handleStkCallSetupRequestFromSim finished";
}
/*
* Test IRadio.reportStkServiceIsRunning() for the response returned.
*/
TEST_P(RadioHidlTest, reportStkServiceIsRunning) {
+ LOG(DEBUG) << "reportStkServiceIsRunning";
serial = GetRandomSerialNumber();
radio->reportStkServiceIsRunning(serial);
@@ -101,6 +109,7 @@ TEST_P(RadioHidlTest, reportStkServiceIsRunning) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "reportStkServiceIsRunning finished";
}
/*
@@ -108,6 +117,7 @@ TEST_P(RadioHidlTest, reportStkServiceIsRunning) {
* string.
*/
TEST_P(RadioHidlTest, sendEnvelopeWithStatus) {
+ LOG(DEBUG) << "sendEnvelopeWithStatus";
serial = GetRandomSerialNumber();
// Test with sending empty string
@@ -125,4 +135,5 @@ TEST_P(RadioHidlTest, sendEnvelopeWithStatus) {
{RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR, RadioError::SIM_ABSENT},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendEnvelopeWithStatus finished";
}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
index 3c833c0c20..3583514014 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -14,11 +14,13 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
void RadioHidlTest::SetUp() {
radio = IRadio::getService(GetParam());
if (radio == NULL) {
+ LOG(DEBUG) << "Radio is NULL, waiting 1 minute to retry";
sleep(60);
radio = IRadio::getService(GetParam());
}
@@ -70,4 +72,4 @@ void RadioHidlTest::updateSimCardStatus() {
serial = GetRandomSerialNumber();
radio->getIccCardStatus(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
-} \ No newline at end of file
+}
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
index a192a33a07..f6de2f854a 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_voice.cpp
@@ -14,12 +14,14 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <radio_hidl_hal_utils_v1_0.h>
/*
* Test IRadio.getCurrentCalls() for the response returned.
*/
TEST_P(RadioHidlTest, getCurrentCalls) {
+ LOG(DEBUG) << "getCurrentCalls";
serial = GetRandomSerialNumber();
radio->getCurrentCalls(serial);
@@ -30,12 +32,14 @@ TEST_P(RadioHidlTest, getCurrentCalls) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getCurrentCalls finished";
}
/*
* Test IRadio.dial() for the response returned.
*/
TEST_P(RadioHidlTest, dial) {
+ LOG(DEBUG) << "dial";
serial = GetRandomSerialNumber();
Dial dialInfo;
@@ -57,12 +61,14 @@ TEST_P(RadioHidlTest, dial) {
RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "dial finished";
}
/*
* Test IRadio.hangup() for the response returned.
*/
TEST_P(RadioHidlTest, hangup) {
+ LOG(DEBUG) << "hangup";
serial = GetRandomSerialNumber();
radio->hangup(serial, 1);
@@ -76,12 +82,14 @@ TEST_P(RadioHidlTest, hangup) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "hangup finished";
}
/*
* Test IRadio.hangupWaitingOrBackground() for the response returned.
*/
TEST_P(RadioHidlTest, hangupWaitingOrBackground) {
+ LOG(DEBUG) << "hangupWaitingOrBackground";
serial = GetRandomSerialNumber();
radio->hangupWaitingOrBackground(serial);
@@ -94,12 +102,14 @@ TEST_P(RadioHidlTest, hangupWaitingOrBackground) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "hangupWaitingOrBackground finished";
}
/*
* Test IRadio.hangupForegroundResumeBackground() for the response returned.
*/
TEST_P(RadioHidlTest, hangupForegroundResumeBackground) {
+ LOG(DEBUG) << "hangupForegroundResumeBackground";
serial = GetRandomSerialNumber();
radio->hangupForegroundResumeBackground(serial);
@@ -112,12 +122,14 @@ TEST_P(RadioHidlTest, hangupForegroundResumeBackground) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "hangupForegroundResumeBackground finished";
}
/*
* Test IRadio.switchWaitingOrHoldingAndActive() for the response returned.
*/
TEST_P(RadioHidlTest, switchWaitingOrHoldingAndActive) {
+ LOG(DEBUG) << "switchWaitingOrHoldingAndActive";
serial = GetRandomSerialNumber();
radio->switchWaitingOrHoldingAndActive(serial);
@@ -130,12 +142,14 @@ TEST_P(RadioHidlTest, switchWaitingOrHoldingAndActive) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "switchWaitingOrHoldingAndActive finished";
}
/*
* Test IRadio.conference() for the response returned.
*/
TEST_P(RadioHidlTest, conference) {
+ LOG(DEBUG) << "conference";
serial = GetRandomSerialNumber();
radio->conference(serial);
@@ -148,12 +162,14 @@ TEST_P(RadioHidlTest, conference) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "conference finished";
}
/*
* Test IRadio.rejectCall() for the response returned.
*/
TEST_P(RadioHidlTest, rejectCall) {
+ LOG(DEBUG) << "rejectCall";
serial = GetRandomSerialNumber();
radio->rejectCall(serial);
@@ -166,12 +182,14 @@ TEST_P(RadioHidlTest, rejectCall) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "rejectCall finished";
}
/*
* Test IRadio.getLastCallFailCause() for the response returned.
*/
TEST_P(RadioHidlTest, getLastCallFailCause) {
+ LOG(DEBUG) << "getLastCallFailCause";
serial = GetRandomSerialNumber();
radio->getLastCallFailCause(serial);
@@ -183,12 +201,14 @@ TEST_P(RadioHidlTest, getLastCallFailCause) {
ASSERT_TRUE(
CheckAnyOfErrors(radioRsp->rspInfo.error, {RadioError::NONE}, CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getLastCallFailCause finished";
}
/*
* Test IRadio.sendUssd() for the response returned.
*/
TEST_P(RadioHidlTest, sendUssd) {
+ LOG(DEBUG) << "sendUssd";
serial = GetRandomSerialNumber();
radio->sendUssd(serial, hidl_string("test"));
EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -201,12 +221,14 @@ TEST_P(RadioHidlTest, sendUssd) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendUssd finished";
}
/*
* Test IRadio.cancelPendingUssd() for the response returned.
*/
TEST_P(RadioHidlTest, cancelPendingUssd) {
+ LOG(DEBUG) << "cancelPendingUssd";
serial = GetRandomSerialNumber();
radio->cancelPendingUssd(serial);
@@ -220,12 +242,14 @@ TEST_P(RadioHidlTest, cancelPendingUssd) {
{RadioError::NONE, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "cancelPendingUssd finished";
}
/*
* Test IRadio.getCallForwardStatus() for the response returned.
*/
TEST_P(RadioHidlTest, getCallForwardStatus) {
+ LOG(DEBUG) << "getCallForwardStatus";
serial = GetRandomSerialNumber();
CallForwardInfo callInfo;
memset(&callInfo, 0, sizeof(callInfo));
@@ -242,12 +266,14 @@ TEST_P(RadioHidlTest, getCallForwardStatus) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getCallForwardStatus finished";
}
/*
* Test IRadio.setCallForward() for the response returned.
*/
TEST_P(RadioHidlTest, setCallForward) {
+ LOG(DEBUG) << "setCallForward";
serial = GetRandomSerialNumber();
CallForwardInfo callInfo;
memset(&callInfo, 0, sizeof(callInfo));
@@ -264,12 +290,14 @@ TEST_P(RadioHidlTest, setCallForward) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setCallForward finished";
}
/*
* Test IRadio.getCallWaiting() for the response returned.
*/
TEST_P(RadioHidlTest, getCallWaiting) {
+ LOG(DEBUG) << "getCallWaiting";
serial = GetRandomSerialNumber();
radio->getCallWaiting(serial, 1);
@@ -283,12 +311,14 @@ TEST_P(RadioHidlTest, getCallWaiting) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "getCallWaiting finished";
}
/*
* Test IRadio.setCallWaiting() for the response returned.
*/
TEST_P(RadioHidlTest, setCallWaiting) {
+ LOG(DEBUG) << "setCallWaiting";
serial = GetRandomSerialNumber();
radio->setCallWaiting(serial, true, 1);
@@ -302,12 +332,14 @@ TEST_P(RadioHidlTest, setCallWaiting) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setCallWaiting finished";
}
/*
* Test IRadio.acceptCall() for the response returned.
*/
TEST_P(RadioHidlTest, acceptCall) {
+ LOG(DEBUG) << "acceptCall";
serial = GetRandomSerialNumber();
radio->acceptCall(serial);
@@ -320,12 +352,14 @@ TEST_P(RadioHidlTest, acceptCall) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "acceptCall finished";
}
/*
* Test IRadio.separateConnection() for the response returned.
*/
TEST_P(RadioHidlTest, separateConnection) {
+ LOG(DEBUG) << "separateConnection";
serial = GetRandomSerialNumber();
radio->separateConnection(serial, 1);
@@ -339,12 +373,14 @@ TEST_P(RadioHidlTest, separateConnection) {
{RadioError::INVALID_ARGUMENTS, RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "separateConnection finished";
}
/*
* Test IRadio.explicitCallTransfer() for the response returned.
*/
TEST_P(RadioHidlTest, explicitCallTransfer) {
+ LOG(DEBUG) << "explicitCallTransfer";
serial = GetRandomSerialNumber();
radio->explicitCallTransfer(serial);
@@ -357,12 +393,14 @@ TEST_P(RadioHidlTest, explicitCallTransfer) {
{RadioError::INVALID_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "explicitCallTransfer finished";
}
/*
* Test IRadio.sendCDMAFeatureCode() for the response returned.
*/
TEST_P(RadioHidlTest, sendCDMAFeatureCode) {
+ LOG(DEBUG) << "sendCDMAFeatureCode";
serial = GetRandomSerialNumber();
radio->sendCDMAFeatureCode(serial, hidl_string());
@@ -377,12 +415,14 @@ TEST_P(RadioHidlTest, sendCDMAFeatureCode) {
RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendCDMAFeatureCode finished";
}
/*
* Test IRadio.sendDtmf() for the response returned.
*/
TEST_P(RadioHidlTest, sendDtmf) {
+ LOG(DEBUG) << "sendDtmf";
serial = GetRandomSerialNumber();
radio->sendDtmf(serial, "1");
@@ -397,12 +437,14 @@ TEST_P(RadioHidlTest, sendDtmf) {
RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendDtmf finished";
}
/*
* Test IRadio.startDtmf() for the response returned.
*/
TEST_P(RadioHidlTest, startDtmf) {
+ LOG(DEBUG) << "startDtmf";
serial = GetRandomSerialNumber();
radio->startDtmf(serial, "1");
@@ -417,12 +459,14 @@ TEST_P(RadioHidlTest, startDtmf) {
RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "startDtmf finished";
}
/*
* Test IRadio.stopDtmf() for the response returned.
*/
TEST_P(RadioHidlTest, stopDtmf) {
+ LOG(DEBUG) << "stopDtmf";
serial = GetRandomSerialNumber();
radio->stopDtmf(serial);
@@ -436,12 +480,14 @@ TEST_P(RadioHidlTest, stopDtmf) {
RadioError::INVALID_MODEM_STATE, RadioError::MODEM_ERR},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "stopDtmf finished";
}
/*
* Test IRadio.setMute() for the response returned.
*/
TEST_P(RadioHidlTest, setMute) {
+ LOG(DEBUG) << "setMute";
serial = GetRandomSerialNumber();
radio->setMute(serial, true);
@@ -454,12 +500,14 @@ TEST_P(RadioHidlTest, setMute) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "setMute finished";
}
/*
* Test IRadio.getMute() for the response returned.
*/
TEST_P(RadioHidlTest, getMute) {
+ LOG(DEBUG) << "getMute";
serial = GetRandomSerialNumber();
radio->getMute(serial);
@@ -470,12 +518,14 @@ TEST_P(RadioHidlTest, getMute) {
if (cardStatus.cardState == CardState::ABSENT) {
EXPECT_EQ(RadioError::NONE, radioRsp->rspInfo.error);
}
+ LOG(DEBUG) << "getMute finished";
}
/*
* Test IRadio.sendBurstDtmf() for the response returned.
*/
TEST_P(RadioHidlTest, sendBurstDtmf) {
+ LOG(DEBUG) << "sendBurstDtmf";
serial = GetRandomSerialNumber();
radio->sendBurstDtmf(serial, "1", 0, 0);
@@ -489,4 +539,5 @@ TEST_P(RadioHidlTest, sendBurstDtmf) {
RadioError::MODEM_ERR, RadioError::OPERATION_NOT_ALLOWED},
CHECK_GENERAL_ERROR));
}
+ LOG(DEBUG) << "sendBurstDtmf finished";
}
diff --git a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
index 6bd2c88a05..6c7870d399 100644
--- a/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
+++ b/radio/1.0/vts/functional/sap_hidl_hal_api.cpp
@@ -14,12 +14,14 @@
* limitations under the License.
*/
+#include <android-base/logging.h>
#include <sap_hidl_hal_utils.h>
/*
* Test ISap.connectReq() for the response returned.
*/
TEST_P(SapHidlTest, connectReq) {
+ LOG(DEBUG) << "connectReq";
token = GetRandomSerialNumber();
int32_t maxMsgSize = 100;
@@ -30,23 +32,27 @@ TEST_P(SapHidlTest, connectReq) {
// Modem side need time for connect to finish. Adding a waiting time to prevent
// disconnect being requested right after connect request.
sleep(1);
+ LOG(DEBUG) << "connectReq finished";
}
/*
* Test IRadio.disconnectReq() for the response returned
*/
TEST_P(SapHidlTest, disconnectReq) {
+ LOG(DEBUG) << "disconnectReq";
token = GetRandomSerialNumber();
sap->disconnectReq(token);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(sapCb->sapResponseToken, token);
+ LOG(DEBUG) << "disconnectReq finished";
}
/*
* Test IRadio.apduReq() for the response returned.
*/
TEST_P(SapHidlTest, apduReq) {
+ LOG(DEBUG) << "apduReq";
token = GetRandomSerialNumber();
SapApduType sapApduType = SapApduType::APDU;
android::hardware::hidl_vec<uint8_t> command = {};
@@ -59,12 +65,14 @@ TEST_P(SapHidlTest, apduReq) {
CheckAnyOfErrors(sapCb->sapResultCode,
{SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_ALREADY_POWERED_OFF,
SapResultCode::CARD_NOT_ACCESSSIBLE, SapResultCode::CARD_REMOVED}));
+ LOG(DEBUG) << "apduReq finished";
}
/*
* Test IRadio.transferAtrReq() for the response returned.
*/
TEST_P(SapHidlTest, transferAtrReq) {
+ LOG(DEBUG) << "transferAtrReq";
token = GetRandomSerialNumber();
sap->transferAtrReq(token);
@@ -75,12 +83,14 @@ TEST_P(SapHidlTest, transferAtrReq) {
CheckAnyOfErrors(sapCb->sapResultCode,
{SapResultCode::GENERIC_FAILURE, SapResultCode::DATA_NOT_AVAILABLE,
SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED}));
+ LOG(DEBUG) << "transferAtrReq finished";
}
/*
* Test IRadio.powerReq() for the response returned.
*/
TEST_P(SapHidlTest, powerReq) {
+ LOG(DEBUG) << "powerReq";
token = GetRandomSerialNumber();
bool state = true;
@@ -92,12 +102,14 @@ TEST_P(SapHidlTest, powerReq) {
sapCb->sapResultCode, {SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_NOT_ACCESSSIBLE,
SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED,
SapResultCode::CARD_ALREADY_POWERED_ON}));
+ LOG(DEBUG) << "powerReq finished";
}
/*
* Test IRadio.resetSimReq() for the response returned.
*/
TEST_P(SapHidlTest, resetSimReq) {
+ LOG(DEBUG) << "resetSimReq";
token = GetRandomSerialNumber();
sap->resetSimReq(token);
@@ -108,12 +120,14 @@ TEST_P(SapHidlTest, resetSimReq) {
CheckAnyOfErrors(sapCb->sapResultCode,
{SapResultCode::GENERIC_FAILURE, SapResultCode::CARD_NOT_ACCESSSIBLE,
SapResultCode::CARD_ALREADY_POWERED_OFF, SapResultCode::CARD_REMOVED}));
+ LOG(DEBUG) << "resetSimReq finished";
}
/*
* Test IRadio.transferCardReaderStatusReq() for the response returned.
*/
TEST_P(SapHidlTest, transferCardReaderStatusReq) {
+ LOG(DEBUG) << "transferCardReaderStatusReq";
token = GetRandomSerialNumber();
sap->transferCardReaderStatusReq(token);
@@ -122,12 +136,14 @@ TEST_P(SapHidlTest, transferCardReaderStatusReq) {
ASSERT_TRUE(CheckAnyOfErrors(
sapCb->sapResultCode, {SapResultCode::GENERIC_FAILURE, SapResultCode::DATA_NOT_AVAILABLE}));
+ LOG(DEBUG) << "transferCardReaderStatusReq finished";
}
/*
* Test IRadio.setTransferProtocolReq() for the response returned.
*/
TEST_P(SapHidlTest, setTransferProtocolReq) {
+ LOG(DEBUG) << "setTransferProtocolReq";
token = GetRandomSerialNumber();
SapTransferProtocol sapTransferProtocol = SapTransferProtocol::T0;
@@ -136,4 +152,5 @@ TEST_P(SapHidlTest, setTransferProtocolReq) {
EXPECT_EQ(sapCb->sapResponseToken, token);
EXPECT_EQ(SapResultCode::NOT_SUPPORTED, sapCb->sapResultCode);
+ LOG(DEBUG) << "setTransferProtocolReq finished";
}
diff --git a/radio/1.0/vts/functional/vts_hal_radio_target_test.xml b/radio/1.0/vts/functional/vts_hal_radio_target_test.xml
index b91119d40a..82af2ee388 100644
--- a/radio/1.0/vts/functional/vts_hal_radio_target_test.xml
+++ b/radio/1.0/vts/functional/vts_hal_radio_target_test.xml
@@ -30,5 +30,6 @@
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
<option name="module-name" value="VtsHalRadioV1_0TargetTest" />
+ <option name="native-test-timeout" value="300000" /> <!-- 5 min -->
</test>
</configuration>
diff --git a/radio/1.1/vts/functional/AndroidTest.xml b/radio/1.1/vts/functional/AndroidTest.xml
index 3699575223..f1bc7a80ed 100644
--- a/radio/1.1/vts/functional/AndroidTest.xml
+++ b/radio/1.1/vts/functional/AndroidTest.xml
@@ -29,6 +29,7 @@
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp" />
+ <option name="native-test-timeout" value="300000" /> <!-- 5 min -->
<option name="module-name" value="VtsHalRadioV1_1TargetTest" />
</test>
</configuration>
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index c81a8d9795..acb1b0ef6d 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -735,7 +735,7 @@ TEST_P(RadioHidlTest_v1_2, getDataRegistrationState) {
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial);
- ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n",
+ ALOGI("getDataRegistrationStateResponse_1_2, rspInfo.error = %s\n",
toString(radioRsp_v1_2->rspInfo.error).c_str());
ASSERT_TRUE(CheckAnyOfErrors(
radioRsp_v1_2->rspInfo.error,
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index e4c0877e45..3ba9b9db9d 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -18,6 +18,15 @@
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
+namespace {
+const RadioAccessSpecifier GERAN_SPECIFIER_P900 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
+ .geranBands = {GeranBands::BAND_P900},
+ .channels = {1, 2}};
+const RadioAccessSpecifier GERAN_SPECIFIER_850 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
+ .geranBands = {GeranBands::BAND_850},
+ .channels = {128, 129}};
+} // namespace
+
/*
* Test IRadio.emergencyDial() for the response returned.
*/
@@ -199,14 +208,10 @@ TEST_P(RadioHidlTest_v1_4, setPreferredNetworkTypeBitmap) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -234,6 +239,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
{RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
@@ -270,14 +280,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidArgument) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 4,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -307,14 +313,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 301,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -343,14 +345,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 59,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -379,14 +377,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 3601,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -415,14 +409,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 0};
@@ -451,14 +441,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 11};
@@ -487,14 +473,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
// Some vendor may not support max search time of 360s.
// This issue is tracked in b/112205669.
.maxSearchTime = 300,
@@ -518,6 +500,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
@@ -526,14 +513,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
serial = GetRandomSerialNumber();
- RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
- .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
- .channels = {1, 2}};
-
::android::hardware::radio::V1_2::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
// Some vendor may not support max search time of 360s.
// This issue is tracked in b/112205669.
.maxSearchTime = 300,
@@ -559,6 +542,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
index 15a0b24914..4ac6cc9b57 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_test.cpp
@@ -107,3 +107,9 @@ void RadioHidlTest_v1_4::updateSimCardStatus() {
radio_v1_4->getIccCardStatus(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
}
+
+void RadioHidlTest_v1_4::stopNetworkScan() {
+ serial = GetRandomSerialNumber();
+ radio_v1_4->stopNetworkScan(serial);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+}
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
index 31b7e13e29..53a584545c 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
+++ b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
@@ -721,7 +721,10 @@ class RadioHidlTest_v1_4 : public ::testing::TestWithParam<std::string> {
/* Update Sim Card Status */
void updateSimCardStatus();
- public:
+ /* Stop Network Scan Command */
+ void stopNetworkScan();
+
+ public:
virtual void SetUp() override;
/* Used as a mechanism to inform the test about data/event callback */
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index 32c02cb137..29cb1277f1 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <android-base/properties.h>
#include <radio_hidl_hal_utils_v1_5.h>
#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
@@ -502,15 +503,21 @@ TEST_P(RadioHidlTest_v1_5, areUiccApplicationsEnabled) {
TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
- Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifier});
+ Return<void> res =
+ radio_v1_5->setSystemSelectionChannels_1_5(serial, true, {specifierP900, specifier850});
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
@@ -523,7 +530,8 @@ TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
serial = GetRandomSerialNumber();
- Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(serial, false, {specifier});
+ Return<void> res = radio_v1_5->setSystemSelectionChannels_1_5(
+ serial, false, {specifierP900, specifier850});
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
@@ -540,18 +548,23 @@ TEST_P(RadioHidlTest_v1_5, setSystemSelectionChannels_1_5) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -573,6 +586,11 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan) {
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
{RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
}
+
+ if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
@@ -608,18 +626,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidArgument) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval1) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 4,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -647,18 +670,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval2) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 301,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 60,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -686,18 +714,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidInterval2) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime1) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 59,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -725,18 +758,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime2) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 3601,
.incrementalResults = false,
.incrementalResultsPeriodicity = 1};
@@ -764,18 +802,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidMaxSearchTime2) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity1) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 0};
@@ -803,18 +846,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity2) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 600,
.incrementalResults = true,
.incrementalResultsPeriodicity = 11};
@@ -842,18 +890,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_InvalidPeriodicity2) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 360,
.incrementalResults = false,
.incrementalResultsPeriodicity = 10};
@@ -873,6 +926,11 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
@@ -881,18 +939,23 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest1) {
TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest2) {
serial = GetRandomSerialNumber();
- ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands rasBands;
- rasBands.geranBands() = {GeranBands::BAND_450, GeranBands::BAND_480};
-
- ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier = {
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands bandP900;
+ bandP900.geranBands() = {GeranBands::BAND_P900};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier::Bands band850;
+ band850.geranBands() = {GeranBands::BAND_850};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifierP900 = {
.radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
- .bands = rasBands,
+ .bands = bandP900,
.channels = {1, 2}};
+ ::android::hardware::radio::V1_5::RadioAccessSpecifier specifier850 = {
+ .radioAccessNetwork = ::android::hardware::radio::V1_5::RadioAccessNetworks::GERAN,
+ .bands = band850,
+ .channels = {128, 129}};
::android::hardware::radio::V1_5::NetworkScanRequest request = {
.type = ScanType::ONE_SHOT,
.interval = 60,
- .specifiers = {specifier},
+ .specifiers = {specifierP900, specifier850},
.maxSearchTime = 360,
.incrementalResults = false,
.incrementalResultsPeriodicity = 10,
@@ -913,6 +976,11 @@ TEST_P(RadioHidlTest_v1_5, startNetworkScan_GoodRequest2) {
{RadioError::NONE, RadioError::INVALID_ARGUMENTS,
RadioError::REQUEST_NOT_SUPPORTED}));
}
+
+ if (radioRsp_v1_5->rspInfo.error == RadioError::NONE) {
+ ALOGI("Stop Network Scan");
+ stopNetworkScan();
+ }
}
/*
@@ -1174,6 +1242,17 @@ TEST_P(RadioHidlTest_v1_5, getBarringInfo) {
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
+ int32_t firstApiLevel = android::base::GetIntProperty<int32_t>("ro.product.first_api_level", 0);
+ // Allow devices shipping with Radio::1_5 and Android 11 to not support barring info.
+ if (firstApiLevel > 0 && firstApiLevel <= 30) {
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+ // Early exit for devices that don't support barring info.
+ if (radioRsp_v1_5->rspInfo.error != RadioError::NONE) {
+ return;
+ }
+ }
+
ASSERT_TRUE(radioRsp_v1_5->barringInfos.size() > 0);
std::set<BarringInfo::ServiceType> reportedServices;
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_test.cpp b/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
index 7313de4ede..4155550572 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_test.cpp
@@ -78,3 +78,9 @@ void RadioHidlTest_v1_5::updateSimCardStatus() {
radio_v1_5->getIccCardStatus(serial);
EXPECT_EQ(std::cv_status::no_timeout, wait());
}
+
+void RadioHidlTest_v1_5::stopNetworkScan() {
+ serial = GetRandomSerialNumber();
+ radio_v1_5->stopNetworkScan(serial);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+}
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
index 6a369cc2e2..87ce675c5c 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
+++ b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
@@ -831,6 +831,9 @@ class RadioHidlTest_v1_5 : public ::testing::TestWithParam<std::string> {
/* Update Sim Card Status */
void updateSimCardStatus();
+ /* Stop Network Scan Command */
+ void stopNetworkScan();
+
public:
virtual void SetUp() override;
diff --git a/rebootescrow/aidl/vts/functional/README.md b/rebootescrow/aidl/vts/functional/README.md
new file mode 100644
index 0000000000..9ae5caffad
--- /dev/null
+++ b/rebootescrow/aidl/vts/functional/README.md
@@ -0,0 +1,7 @@
+Many of the tests in this directory may require that TEE Keymaster
+"EARLY_BOOT_ONLY" keys be usable when this test runs. In order to accomplish
+this, a build of "vold" that omits the call to "earlyBootEnded()" function
+should be made. Then these DISABLED tests may be run successfully.
+
+The CTS test ResumeOnRebootHostTests will test the functionality without a
+special build.
diff --git a/rebootescrow/aidl/vts/functional/VtsHalRebootEscrowTargetTest.cpp b/rebootescrow/aidl/vts/functional/VtsHalRebootEscrowTargetTest.cpp
index cd8cc3eaa1..809a3b502a 100644
--- a/rebootescrow/aidl/vts/functional/VtsHalRebootEscrowTargetTest.cpp
+++ b/rebootescrow/aidl/vts/functional/VtsHalRebootEscrowTargetTest.cpp
@@ -60,7 +60,10 @@ class RebootEscrowAidlTest : public testing::TestWithParam<std::string> {
};
};
-TEST_P(RebootEscrowAidlTest, StoreAndRetrieve_Success) {
+// This test assumes that it can retrieve keys immediately, but some
+// implementations use the TEE's EARLY_BOOT_ONLY keys. This means that the
+// earlyBootEnded() calls will need to be disabled to test this correctly.
+TEST_P(RebootEscrowAidlTest, DISABLED_StoreAndRetrieve_Success) {
SKIP_UNSUPPORTED;
ASSERT_TRUE(rebootescrow->storeKey(KEY_1).isOk());
@@ -70,7 +73,10 @@ TEST_P(RebootEscrowAidlTest, StoreAndRetrieve_Success) {
EXPECT_EQ(actualKey, KEY_1);
}
-TEST_P(RebootEscrowAidlTest, StoreAndRetrieve_SecondRetrieveSucceeds) {
+// This test assumes that it can retrieve keys immediately, but some
+// implementations use the TEE's EARLY_BOOT_ONLY keys. This means that the
+// earlyBootEnded() calls will need to be disabled to test this correctly.
+TEST_P(RebootEscrowAidlTest, DISABLED_StoreAndRetrieve_SecondRetrieveSucceeds) {
SKIP_UNSUPPORTED;
ASSERT_TRUE(rebootescrow->storeKey(KEY_1).isOk());
@@ -83,7 +89,10 @@ TEST_P(RebootEscrowAidlTest, StoreAndRetrieve_SecondRetrieveSucceeds) {
EXPECT_EQ(actualKey, KEY_1);
}
-TEST_P(RebootEscrowAidlTest, StoreTwiceOverwrites_Success) {
+// This test assumes that it can retrieve keys immediately, but some
+// implementations use the TEE's EARLY_BOOT_ONLY keys. This means that the
+// earlyBootEnded() calls will need to be disabled to test this correctly.
+TEST_P(RebootEscrowAidlTest, DISABLED_StoreTwiceOverwrites_Success) {
SKIP_UNSUPPORTED;
ASSERT_TRUE(rebootescrow->storeKey(KEY_1).isOk());
@@ -94,7 +103,10 @@ TEST_P(RebootEscrowAidlTest, StoreTwiceOverwrites_Success) {
EXPECT_EQ(actualKey, KEY_2);
}
-TEST_P(RebootEscrowAidlTest, StoreEmpty_AfterGetEmptyKey_Success) {
+// This test assumes that it can retrieve keys immediately, but some
+// implementations use the TEE's EARLY_BOOT_ONLY keys. This means that the
+// earlyBootEnded() calls will need to be disabled to test this correctly.
+TEST_P(RebootEscrowAidlTest, DISABLED_StoreEmpty_AfterGetEmptyKey_Success) {
SKIP_UNSUPPORTED;
rebootescrow->storeKey(KEY_1);
@@ -105,6 +117,12 @@ TEST_P(RebootEscrowAidlTest, StoreEmpty_AfterGetEmptyKey_Success) {
EXPECT_EQ(actualKey, EMPTY_KEY);
}
+TEST_P(RebootEscrowAidlTest, Store_Success) {
+ SKIP_UNSUPPORTED;
+
+ rebootescrow->storeKey(KEY_1);
+}
+
INSTANTIATE_TEST_SUITE_P(
RebootEscrow, RebootEscrowAidlTest,
testing::ValuesIn(android::getAidlHalInstanceNames(IRebootEscrow::descriptor)),