Loading radio/1.4/vts/functional/radio_hidl_hal_api.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,12 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial) { ALOGI("emergencyDial, rspInfo.error = %s\n", toString(radioRsp_v1_4->rspInfo.error).c_str()); EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error); // Give some time for modem to establish the emergency call channel. sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME); // Disconnect all the potential established calls to prevent them affecting other tests. clearPotentialEstablishedCalls(); } /* Loading @@ -67,6 +73,12 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial_withServices) { ALOGI("emergencyDial_withServices, rspInfo.error = %s\n", toString(radioRsp_v1_4->rspInfo.error).c_str()); EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error); // Give some time for modem to establish the emergency call channel. sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME); // Disconnect all the potential established calls to prevent them affecting other tests. clearPotentialEstablishedCalls(); } /* Loading @@ -93,6 +105,12 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial_withEmergencyRouting) { ALOGI("emergencyDial_withEmergencyRouting, rspInfo.error = %s\n", toString(radioRsp_v1_4->rspInfo.error).c_str()); EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error); // Give some time for modem to establish the emergency call channel. sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME); // Disconnect all the potential established calls to prevent them affecting other tests. clearPotentialEstablishedCalls(); } /* Loading radio/1.4/vts/functional/radio_hidl_hal_test.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,23 @@ std::cv_status RadioHidlTest_v1_4::wait() { return status; } void RadioHidlTest_v1_4::clearPotentialEstablishedCalls() { // Get the current call Id to hangup the established emergency call. serial = GetRandomSerialNumber(); radio_v1_4->getCurrentCalls(serial); EXPECT_EQ(std::cv_status::no_timeout, wait()); // Hang up to disconnect the established call channels. for (const ::android::hardware::radio::V1_2::Call& call : radioRsp_v1_4->currentCalls) { serial = GetRandomSerialNumber(); radio_v1_4->hangup(serial, call.base.index); ALOGI("Hang up to disconnect the established call channel: %d", call.base.index); EXPECT_EQ(std::cv_status::no_timeout, wait()); // Give some time for modem to disconnect the established call channel. sleep(MODEM_EMERGENCY_CALL_DISCONNECT_TIME); } } void RadioHidlTest_v1_4::updateSimCardStatus() { serial = GetRandomSerialNumber(); radio_v1_4->getIccCardStatus(serial); Loading radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h +9 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,9 @@ using ::android::hardware::Return; using ::android::hardware::Void; #define TIMEOUT_PERIOD 75 #define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3 #define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3 #define RADIO_SERVICE_NAME "slot1" class RadioHidlTest_v1_4; Loading @@ -59,6 +62,9 @@ class RadioResponse_v1_4 : public ::android::hardware::radio::V1_4::IRadioRespon RadioResponseInfo rspInfo; // Call hidl_vec<::android::hardware::radio::V1_2::Call> currentCalls; // Modem bool isModemEnabled; bool enableModemResponseToggle; Loading Loading @@ -725,6 +731,9 @@ class RadioHidlTest_v1_4 : public ::testing::VtsHalHidlTargetTestBase { /* Serial number for radio request */ int serial; /* Clear Potential Established Calls */ void clearPotentialEstablishedCalls(); /* Update Sim Card Status */ void updateSimCardStatus(); Loading radio/1.4/vts/functional/radio_response.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,9 @@ Return<void> RadioResponse_v1_4::getIMSIForAppResponse( return Void(); } Return<void> RadioResponse_v1_4::hangupConnectionResponse(const RadioResponseInfo& /*info*/) { Return<void> RadioResponse_v1_4::hangupConnectionResponse(const RadioResponseInfo& info) { rspInfo = info; parent_v1_4.notify(info.serial); return Void(); } Loading Loading @@ -729,9 +731,10 @@ Return<void> RadioResponse_v1_4::getIccCardStatusResponse_1_2( Return<void> RadioResponse_v1_4::getCurrentCallsResponse_1_2( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& /*calls*/) { const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& calls) { rspInfo = info; parent_v1_4.notify(info.serial); currentCalls = calls; return Void(); } Loading sensors/2.0/vts/functional/VtsHalSensorsV2_0TargetTest.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -683,11 +683,16 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfo>& sensors, bool Result flushResult = flush(sensor.sensorHandle); ASSERT_EQ(flushResult, expectedResponse); } activate(sensor.sensorHandle, false); } // Wait up to one second for the flush events callback.waitForFlushEvents(sensors, flushCalls, 1000 /* timeoutMs */); // Deactivate all sensors after waiting for flush events so pending flush events are not // abandoned by the HAL. for (const SensorInfo& sensor : sensors) { activate(sensor.sensorHandle, false); } getEnvironment()->unregisterCallback(); // Check that the correct number of flushes are present for each sensor Loading Loading
radio/1.4/vts/functional/radio_hidl_hal_api.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,12 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial) { ALOGI("emergencyDial, rspInfo.error = %s\n", toString(radioRsp_v1_4->rspInfo.error).c_str()); EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error); // Give some time for modem to establish the emergency call channel. sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME); // Disconnect all the potential established calls to prevent them affecting other tests. clearPotentialEstablishedCalls(); } /* Loading @@ -67,6 +73,12 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial_withServices) { ALOGI("emergencyDial_withServices, rspInfo.error = %s\n", toString(radioRsp_v1_4->rspInfo.error).c_str()); EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error); // Give some time for modem to establish the emergency call channel. sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME); // Disconnect all the potential established calls to prevent them affecting other tests. clearPotentialEstablishedCalls(); } /* Loading @@ -93,6 +105,12 @@ TEST_F(RadioHidlTest_v1_4, emergencyDial_withEmergencyRouting) { ALOGI("emergencyDial_withEmergencyRouting, rspInfo.error = %s\n", toString(radioRsp_v1_4->rspInfo.error).c_str()); EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error); // Give some time for modem to establish the emergency call channel. sleep(MODEM_EMERGENCY_CALL_ESTABLISH_TIME); // Disconnect all the potential established calls to prevent them affecting other tests. clearPotentialEstablishedCalls(); } /* Loading
radio/1.4/vts/functional/radio_hidl_hal_test.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,23 @@ std::cv_status RadioHidlTest_v1_4::wait() { return status; } void RadioHidlTest_v1_4::clearPotentialEstablishedCalls() { // Get the current call Id to hangup the established emergency call. serial = GetRandomSerialNumber(); radio_v1_4->getCurrentCalls(serial); EXPECT_EQ(std::cv_status::no_timeout, wait()); // Hang up to disconnect the established call channels. for (const ::android::hardware::radio::V1_2::Call& call : radioRsp_v1_4->currentCalls) { serial = GetRandomSerialNumber(); radio_v1_4->hangup(serial, call.base.index); ALOGI("Hang up to disconnect the established call channel: %d", call.base.index); EXPECT_EQ(std::cv_status::no_timeout, wait()); // Give some time for modem to disconnect the established call channel. sleep(MODEM_EMERGENCY_CALL_DISCONNECT_TIME); } } void RadioHidlTest_v1_4::updateSimCardStatus() { serial = GetRandomSerialNumber(); radio_v1_4->getIccCardStatus(serial); Loading
radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h +9 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,9 @@ using ::android::hardware::Return; using ::android::hardware::Void; #define TIMEOUT_PERIOD 75 #define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3 #define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3 #define RADIO_SERVICE_NAME "slot1" class RadioHidlTest_v1_4; Loading @@ -59,6 +62,9 @@ class RadioResponse_v1_4 : public ::android::hardware::radio::V1_4::IRadioRespon RadioResponseInfo rspInfo; // Call hidl_vec<::android::hardware::radio::V1_2::Call> currentCalls; // Modem bool isModemEnabled; bool enableModemResponseToggle; Loading Loading @@ -725,6 +731,9 @@ class RadioHidlTest_v1_4 : public ::testing::VtsHalHidlTargetTestBase { /* Serial number for radio request */ int serial; /* Clear Potential Established Calls */ void clearPotentialEstablishedCalls(); /* Update Sim Card Status */ void updateSimCardStatus(); Loading
radio/1.4/vts/functional/radio_response.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -77,7 +77,9 @@ Return<void> RadioResponse_v1_4::getIMSIForAppResponse( return Void(); } Return<void> RadioResponse_v1_4::hangupConnectionResponse(const RadioResponseInfo& /*info*/) { Return<void> RadioResponse_v1_4::hangupConnectionResponse(const RadioResponseInfo& info) { rspInfo = info; parent_v1_4.notify(info.serial); return Void(); } Loading Loading @@ -729,9 +731,10 @@ Return<void> RadioResponse_v1_4::getIccCardStatusResponse_1_2( Return<void> RadioResponse_v1_4::getCurrentCallsResponse_1_2( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& /*calls*/) { const ::android::hardware::hidl_vec<::android::hardware::radio::V1_2::Call>& calls) { rspInfo = info; parent_v1_4.notify(info.serial); currentCalls = calls; return Void(); } Loading
sensors/2.0/vts/functional/VtsHalSensorsV2_0TargetTest.cpp +6 −1 Original line number Diff line number Diff line Loading @@ -683,11 +683,16 @@ void SensorsHidlTest::runFlushTest(const std::vector<SensorInfo>& sensors, bool Result flushResult = flush(sensor.sensorHandle); ASSERT_EQ(flushResult, expectedResponse); } activate(sensor.sensorHandle, false); } // Wait up to one second for the flush events callback.waitForFlushEvents(sensors, flushCalls, 1000 /* timeoutMs */); // Deactivate all sensors after waiting for flush events so pending flush events are not // abandoned by the HAL. for (const SensorInfo& sensor : sensors) { activate(sensor.sensorHandle, false); } getEnvironment()->unregisterCallback(); // Check that the correct number of flushes are present for each sensor Loading