Merge "EvsCamera: %zd -> %zu for size_t print"
diff --git a/audio/2.0/vts/functional/Android.bp b/audio/2.0/vts/functional/Android.bp
index cee69ef..02f9330 100644
--- a/audio/2.0/vts/functional/Android.bp
+++ b/audio/2.0/vts/functional/Android.bp
@@ -17,7 +17,6 @@
cc_test {
name: "VtsHalAudioV2_0TargetTest",
defaults: ["hidl_defaults"],
- gtest: true,
srcs: ["AudioPrimaryHidlHalTest.cpp"],
shared_libs: [
"libbase",
@@ -28,7 +27,7 @@
"android.hardware.audio@2.0",
"android.hardware.audio.common@2.0",
],
- static_libs: ["libgtest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
index a3f0d27..a339f99 100644
--- a/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
+++ b/audio/2.0/vts/functional/AudioPrimaryHidlHalTest.cpp
@@ -26,7 +26,7 @@
#include <type_traits>
#include <vector>
-#include <gtest/gtest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <android-base/logging.h>
@@ -113,7 +113,7 @@
// Instance to register global tearDown
static Environment* environment;
-class HidlTest : public ::testing::Test {
+class HidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
// Convenient member to store results
Result res;
@@ -131,7 +131,7 @@
if (devicesFactory == nullptr) {
environment->registerTearDown([]{ devicesFactory.clear(); });
- devicesFactory = IDevicesFactory::getService();
+ devicesFactory = ::testing::VtsHalHidlTargetTestBase::getService<IDevicesFactory>();
}
ASSERT_TRUE(devicesFactory != nullptr);
}
diff --git a/audio/effect/2.0/vts/functional/Android.bp b/audio/effect/2.0/vts/functional/Android.bp
index 4d50201..1bc3f39 100644
--- a/audio/effect/2.0/vts/functional/Android.bp
+++ b/audio/effect/2.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.audio.effect@2.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp b/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp
index 6c5b980..063243b 100644
--- a/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp
+++ b/audio/effect/2.0/vts/functional/VtsHalAudioEffectV2_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
#include <android/hardware/audio/effect/2.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
using ::android::hardware::audio::common::V2_0::Uuid;
using ::android::hardware::audio::effect::V2_0::EffectDescriptor;
@@ -35,10 +35,10 @@
using ::android::sp;
// The main test class for Audio Effect HIDL HAL.
-class AudioEffectHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class AudioEffectHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- effectsFactory = ::testing::VtsHalHidlTargetBaseTest::getService<IEffectsFactory>();
+ effectsFactory = ::testing::VtsHalHidlTargetTestBase::getService<IEffectsFactory>();
ASSERT_NE(effectsFactory, nullptr);
}
diff --git a/biometrics/fingerprint/2.1/vts/functional/Android.bp b/biometrics/fingerprint/2.1/vts/functional/Android.bp
index 729282d..27b7157 100644
--- a/biometrics/fingerprint/2.1/vts/functional/Android.bp
+++ b/biometrics/fingerprint/2.1/vts/functional/Android.bp
@@ -27,7 +27,7 @@
"libutils",
"android.hardware.biometrics.fingerprint@2.1",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp b/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp
index 17bc247..c07c3e3 100644
--- a/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp
+++ b/biometrics/fingerprint/2.1/vts/functional/VtsHalBiometricsFingerprintV2_1TargetTest.cpp
@@ -22,7 +22,7 @@
#include <android/hardware/biometrics/fingerprint/2.1/IBiometricsFingerprintClientCallback.h>
#include <hidl/HidlSupport.h>
#include <hidl/HidlTransportSupport.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
using android::Condition;
using android::hardware::biometrics::fingerprint::V2_1::IBiometricsFingerprint;
@@ -35,7 +35,7 @@
using android::Mutex;
using android::sp;
-class FingerprintHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class FingerprintHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
class MyCallback : public IBiometricsFingerprintClientCallback {
@@ -123,7 +123,7 @@
FingerprintHidlTest (): mCallbackCalled(false) {}
virtual void SetUp() override {
- mService = ::testing::VtsHalHidlTargetBaseTest::getService<IBiometricsFingerprint>(SERVICE_NAME);
+ mService = ::testing::VtsHalHidlTargetTestBase::getService<IBiometricsFingerprint>(SERVICE_NAME);
ASSERT_NE(mService, nullptr);
clearErr();
diff --git a/bluetooth/1.0/vts/functional/Android.bp b/bluetooth/1.0/vts/functional/Android.bp
index cb1abe8..d2e6553 100644
--- a/bluetooth/1.0/vts/functional/Android.bp
+++ b/bluetooth/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.bluetooth@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index c8c7cb5..9a4efae 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -23,7 +23,7 @@
#include <hardware/bluetooth.h>
#include <utils/Log.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <condition_variable>
#include <mutex>
#include <queue>
@@ -117,11 +117,11 @@
};
// The main test class for Bluetooth HIDL HAL.
-class BluetoothHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class BluetoothHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
// currently test passthrough mode only
- bluetooth = ::testing::VtsHalHidlTargetBaseTest::getService<IBluetoothHci>();
+ bluetooth = ::testing::VtsHalHidlTargetTestBase::getService<IBluetoothHci>();
ASSERT_NE(bluetooth, nullptr);
ALOGI("%s: getService() for bluetooth is %s", __func__,
bluetooth->isRemote() ? "remote" : "local");
diff --git a/boot/1.0/vts/functional/Android.bp b/boot/1.0/vts/functional/Android.bp
index e77eb5c..5b14f54 100644
--- a/boot/1.0/vts/functional/Android.bp
+++ b/boot/1.0/vts/functional/Android.bp
@@ -27,7 +27,7 @@
"libutils",
"android.hardware.boot@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp b/boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp
index 49eefb1..9789ee6 100644
--- a/boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp
+++ b/boot/1.0/vts/functional/VtsHalBootV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/boot/1.0/IBootControl.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
using ::android::hardware::boot::V1_0::IBootControl;
using ::android::hardware::boot::V1_0::CommandResult;
@@ -32,10 +32,10 @@
using ::android::sp;
// The main test class for the Boot HIDL HAL.
-class BootHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class BootHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- boot = ::testing::VtsHalHidlTargetBaseTest::getService<IBootControl>();
+ boot = ::testing::VtsHalHidlTargetTestBase::getService<IBootControl>();
ASSERT_NE(boot, nullptr);
}
diff --git a/broadcastradio/1.0/vts/functional/Android.bp b/broadcastradio/1.0/vts/functional/Android.bp
index 190dfa1..cf52f49 100644
--- a/broadcastradio/1.0/vts/functional/Android.bp
+++ b/broadcastradio/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.broadcastradio@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
index 9d56164..74911f0 100644
--- a/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
+++ b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
@@ -15,7 +15,7 @@
*/
#define LOG_TAG "BroadcastRadioHidlHalTest"
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <android-base/logging.h>
#include <cutils/native_handle.h>
#include <cutils/properties.h>
@@ -51,11 +51,11 @@
// The main test class for Broadcast Radio HIDL HAL.
-class BroadcastRadioHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class BroadcastRadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
virtual void SetUp() override {
sp<IBroadcastRadioFactory> factory =
- ::testing::VtsHalHidlTargetBaseTest::getService<IBroadcastRadioFactory>();
+ ::testing::VtsHalHidlTargetTestBase::getService<IBroadcastRadioFactory>();
if (factory != 0) {
factory->connectModule(Class::AM_FM,
[&](Result retval, const ::android::sp<IBroadcastRadio>& result) {
diff --git a/broadcastradio/1.1/vts/functional/Android.bp b/broadcastradio/1.1/vts/functional/Android.bp
index 172e684..a4c0849 100644
--- a/broadcastradio/1.1/vts/functional/Android.bp
+++ b/broadcastradio/1.1/vts/functional/Android.bp
@@ -29,7 +29,7 @@
"android.hardware.broadcastradio@1.0",
"android.hardware.broadcastradio@1.1",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
index b980d31..aad01f6 100644
--- a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
+++ b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
@@ -15,7 +15,7 @@
*/
#define LOG_TAG "BroadcastRadioHidlHalTest"
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <android-base/logging.h>
#include <cutils/native_handle.h>
#include <cutils/properties.h>
@@ -52,10 +52,10 @@
// The main test class for Broadcast Radio HIDL HAL.
-class BroadcastRadioHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class BroadcastRadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
virtual void SetUp() override {
- auto factory = ::testing::VtsHalHidlTargetBaseTest::getService<IBroadcastRadioFactory>();
+ auto factory = ::testing::VtsHalHidlTargetTestBase::getService<IBroadcastRadioFactory>();
if (factory != 0) {
factory->connectModule(Class::AM_FM,
[&](Result retval, const ::android::sp<IBroadcastRadio>& result) {
diff --git a/camera/provider/2.4/vts/functional/Android.bp b/camera/provider/2.4/vts/functional/Android.bp
index 3e5d996..f1215b8 100644
--- a/camera/provider/2.4/vts/functional/Android.bp
+++ b/camera/provider/2.4/vts/functional/Android.bp
@@ -29,7 +29,7 @@
"libcamera_metadata",
"libui"
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 846d9a4..ce195f8 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -19,7 +19,7 @@
#include <android/hardware/camera/device/3.2/ICameraDevice.h>
#include <android/log.h>
#include <ui/GraphicBuffer.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <regex>
#include "system/camera_metadata.h"
#include <hardware/gralloc.h>
@@ -131,7 +131,7 @@
void CameraHidlEnvironment::SetUp() {
// TODO: test the binderized mode
- mProvider = ::testing::VtsHalHidlTargetBaseTest::getService<ICameraProvider>(CAMERA_PASSTHROUGH_SERVICE_NAME);
+ mProvider = ::testing::VtsHalHidlTargetTestBase::getService<ICameraProvider>(CAMERA_PASSTHROUGH_SERVICE_NAME);
// TODO: handle the device doesn't have any camera case
ALOGI_IF(mProvider, "provider is not nullptr, %p", mProvider.get());
ASSERT_NE(mProvider, nullptr);
@@ -142,7 +142,7 @@
}
// The main test class for camera HIDL HAL.
-class CameraHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class CameraHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {}
virtual void TearDown() override {}
diff --git a/contexthub/1.0/vts/functional/Android.bp b/contexthub/1.0/vts/functional/Android.bp
index 69aad30..c35386d 100644
--- a/contexthub/1.0/vts/functional/Android.bp
+++ b/contexthub/1.0/vts/functional/Android.bp
@@ -25,7 +25,7 @@
"libutils",
"android.hardware.contexthub@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp b/contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp
index 40a05e6..765857f 100644
--- a/contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp
+++ b/contexthub/1.0/vts/functional/VtsHalContexthubV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/contexthub/1.0/IContexthubCallback.h>
#include <android/hardware/contexthub/1.0/types.h>
#include <android/log.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <cinttypes>
#include <future>
@@ -78,7 +78,7 @@
static std::vector<uint32_t> hubIds;
if (hubIds.size() == 0) {
- sp<IContexthub> hubApi = ::testing::VtsHalHidlTargetBaseTest::getService<IContexthub>();
+ sp<IContexthub> hubApi = ::testing::VtsHalHidlTargetTestBase::getService<IContexthub>();
if (hubApi != nullptr) {
for (ContextHub hub : getHubsSync(hubApi)) {
@@ -93,10 +93,10 @@
// Base test fixture that initializes the HAL and makes the context hub API
// handle available
-class ContexthubHidlTestBase : public ::testing::VtsHalHidlTargetBaseTest {
+class ContexthubHidlTestBase : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- hubApi = ::testing::VtsHalHidlTargetBaseTest::getService<IContexthub>();
+ hubApi = ::testing::VtsHalHidlTargetTestBase::getService<IContexthub>();
ASSERT_NE(hubApi, nullptr);
// getHubs() must be called at least once for proper initialization of the
diff --git a/gatekeeper/1.0/vts/functional/Android.bp b/gatekeeper/1.0/vts/functional/Android.bp
index 5ece336..70cb615 100644
--- a/gatekeeper/1.0/vts/functional/Android.bp
+++ b/gatekeeper/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.gatekeeper@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
index 8d6f726..391dea0 100644
--- a/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
+++ b/gatekeeper/1.0/vts/functional/VtsHalGatekeeperV1_0TargetTest.cpp
@@ -30,7 +30,7 @@
#include <android/hardware/gatekeeper/1.0/IGatekeeper.h>
#include <android/hardware/gatekeeper/1.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
using ::android::hardware::hidl_string;
using ::android::hardware::hidl_vec;
@@ -76,7 +76,7 @@
}
// The main test class for Gatekeeper HIDL HAL.
-class GatekeeperHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class GatekeeperHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
void setUid(uint32_t uid) { uid_ = uid; }
@@ -187,7 +187,7 @@
GatekeeperHidlTest() : uid_(0) {}
virtual void SetUp() override {
GatekeeperResponse rsp;
- gatekeeper_ = ::testing::VtsHalHidlTargetBaseTest::getService<IGatekeeper>();
+ gatekeeper_ = ::testing::VtsHalHidlTargetTestBase::getService<IGatekeeper>();
ASSERT_NE(nullptr, gatekeeper_.get());
doDeleteAllUsers(rsp);
}
diff --git a/gnss/1.0/vts/functional/Android.bp b/gnss/1.0/vts/functional/Android.bp
index b273b20..6d96059 100644
--- a/gnss/1.0/vts/functional/Android.bp
+++ b/gnss/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libnativehelper",
"libutils",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
index b813813..8f131cf 100644
--- a/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
+++ b/gnss/1.0/vts/functional/VtsHalGnssV1_0TargetTest.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/gnss/1.0/IGnss.h>
#include <android/log.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <chrono>
#include <condition_variable>
@@ -36,7 +36,7 @@
#define TIMEOUT_SECONDS 5 // for basic commands/responses
// The main test class for GNSS HAL.
-class GnssHalTest : public ::testing::VtsHalHidlTargetBaseTest {
+class GnssHalTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
/* TODO(b/35678469): Setup the init.rc for VTS such that there's a
@@ -45,7 +45,7 @@
* callbacks trigger.
*/
- gnss_hal_ = ::testing::VtsHalHidlTargetBaseTest::getService<IGnss>();
+ gnss_hal_ = ::testing::VtsHalHidlTargetTestBase::getService<IGnss>();
ASSERT_NE(gnss_hal_, nullptr);
gnss_cb_ = new GnssCallback(*this);
diff --git a/graphics/allocator/2.0/vts/functional/Android.bp b/graphics/allocator/2.0/vts/functional/Android.bp
index 392103b..fb77ab3 100644
--- a/graphics/allocator/2.0/vts/functional/Android.bp
+++ b/graphics/allocator/2.0/vts/functional/Android.bp
@@ -22,7 +22,7 @@
"android.hardware.graphics.allocator@2.0",
],
static_libs: [
- "VtsHalHidlTargetBaseTest",
+ "VtsHalHidlTargetTestBase",
],
cflags: [
"-Wall",
@@ -50,7 +50,7 @@
],
static_libs: [
"libVtsHalGraphicsAllocatorTestUtils",
- "VtsHalHidlTargetBaseTest",
+ "VtsHalHidlTargetTestBase",
],
cflags: [
"-Wall",
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp
index 141743b..0dc43be 100644
--- a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorTestUtils.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "VtsHalGraphicsAllocatorTestUtils.h"
@@ -28,7 +28,7 @@
Allocator::Allocator() { init(); }
void Allocator::init() {
- mAllocator = ::testing::VtsHalHidlTargetBaseTest::getService<IAllocator>();
+ mAllocator = ::testing::VtsHalHidlTargetTestBase::getService<IAllocator>();
ASSERT_NE(nullptr, mAllocator.get()) << "failed to get allocator service";
std::vector<IAllocator::Capability> capabilities = getCapabilities();
diff --git a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
index 2e3ed73..b1c764f 100644
--- a/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
+++ b/graphics/allocator/2.0/vts/functional/VtsHalGraphicsAllocatorV2_0TargetTest.cpp
@@ -17,7 +17,7 @@
#define LOG_TAG "graphics_allocator_hidl_hal_test"
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "VtsHalGraphicsAllocatorTestUtils.h"
@@ -40,7 +40,7 @@
} \
} while (0)
-class GraphicsAllocatorHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class GraphicsAllocatorHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(mAllocator = std::make_unique<Allocator>());
diff --git a/graphics/composer/2.1/default/ComposerClient.cpp b/graphics/composer/2.1/default/ComposerClient.cpp
index 72ba8f8..a2d5d4b 100644
--- a/graphics/composer/2.1/default/ComposerClient.cpp
+++ b/graphics/composer/2.1/default/ComposerClient.cpp
@@ -193,30 +193,30 @@
} // anonymous namespace
-BufferClone::BufferClone()
+BufferCacheEntry::BufferCacheEntry()
: mHandle(nullptr)
{
}
-BufferClone::BufferClone(BufferClone&& other)
+BufferCacheEntry::BufferCacheEntry(BufferCacheEntry&& other)
{
mHandle = other.mHandle;
other.mHandle = nullptr;
}
-BufferClone& BufferClone::operator=(buffer_handle_t handle)
+BufferCacheEntry& BufferCacheEntry::operator=(buffer_handle_t handle)
{
clear();
mHandle = handle;
return *this;
}
-BufferClone::~BufferClone()
+BufferCacheEntry::~BufferCacheEntry()
{
clear();
}
-void BufferClone::clear()
+void BufferCacheEntry::clear()
{
if (mHandle) {
sHandleImporter.freeBuffer(mHandle);
@@ -230,30 +230,69 @@
ComposerClient::~ComposerClient()
{
- ALOGD("client destroyed");
+ // We want to call hwc2_close here (and move hwc2_open to the
+ // constructor), with the assumption that hwc2_close would
+ //
+ // - clean up all resources owned by the client
+ // - make sure all displays are blank (since there is no layer)
+ //
+ // But since SF used to crash at this point, different hwcomposer2
+ // implementations behave differently on hwc2_close. Our only portable
+ // choice really is to abort(). But that is not an option anymore
+ // because we might also have VTS or VR as clients that can come and go.
+ //
+ // Below we manually clean all resources (layers and virtual
+ // displays), and perform a presentDisplay afterwards.
+ ALOGW("destroying composer client");
mHal.enableCallback(false);
- mHal.removeClient();
- // no need to grab the mutex as any in-flight hwbinder call should keep
- // the client alive
+ // no need to grab the mutex as any in-flight hwbinder call would have
+ // kept the client alive
for (const auto& dpy : mDisplayData) {
- if (!dpy.second.Layers.empty()) {
- ALOGW("client destroyed with valid layers");
- }
+ ALOGW("destroying client resources for display %" PRIu64, dpy.first);
+
for (const auto& ly : dpy.second.Layers) {
mHal.destroyLayer(dpy.first, ly.first);
}
if (dpy.second.IsVirtual) {
- ALOGW("client destroyed with valid virtual display");
mHal.destroyVirtualDisplay(dpy.first);
+ } else {
+ ALOGW("performing a final presentDisplay");
+
+ std::vector<Layer> changedLayers;
+ std::vector<IComposerClient::Composition> compositionTypes;
+ uint32_t displayRequestMask = 0;
+ std::vector<Layer> requestedLayers;
+ std::vector<uint32_t> requestMasks;
+ mHal.validateDisplay(dpy.first, &changedLayers, &compositionTypes,
+ &displayRequestMask, &requestedLayers, &requestMasks);
+
+ mHal.acceptDisplayChanges(dpy.first);
+
+ int32_t presentFence = -1;
+ std::vector<Layer> releasedLayers;
+ std::vector<int32_t> releaseFences;
+ mHal.presentDisplay(dpy.first, &presentFence, &releasedLayers, &releaseFences);
+ if (presentFence >= 0) {
+ close(presentFence);
+ }
+ for (auto fence : releaseFences) {
+ if (fence >= 0) {
+ close(fence);
+ }
+ }
}
}
mDisplayData.clear();
sHandleImporter.cleanup();
+
+ mHal.removeClient();
+
+ ALOGW("removed composer client");
}
void ComposerClient::initialize()
@@ -706,10 +745,13 @@
auto damage = readRegion((length - 4) / 4);
auto err = lookupBuffer(BufferCache::CLIENT_TARGETS,
- slot, useCache, clientTarget);
+ slot, useCache, clientTarget, &clientTarget);
if (err == Error::NONE) {
err = mHal.setClientTarget(mDisplay, clientTarget, fence,
dataspace, damage);
+
+ updateBuffer(BufferCache::CLIENT_TARGETS, slot, useCache,
+ clientTarget);
}
if (err != Error::NONE) {
close(fence);
@@ -731,9 +773,12 @@
auto fence = readFence();
auto err = lookupBuffer(BufferCache::OUTPUT_BUFFERS,
- slot, useCache, outputBuffer);
+ slot, useCache, outputBuffer, &outputBuffer);
if (err == Error::NONE) {
err = mHal.setOutputBuffer(mDisplay, outputBuffer, fence);
+
+ updateBuffer(BufferCache::OUTPUT_BUFFERS,
+ slot, useCache, outputBuffer);
}
if (err != Error::NONE) {
close(fence);
@@ -831,9 +876,12 @@
auto fence = readFence();
auto err = lookupBuffer(BufferCache::LAYER_BUFFERS,
- slot, useCache, buffer);
+ slot, useCache, buffer, &buffer);
if (err == Error::NONE) {
err = mHal.setLayerBuffer(mDisplay, mLayer, buffer, fence);
+
+ updateBuffer(BufferCache::LAYER_BUFFERS,
+ slot, useCache, buffer);
}
if (err != Error::NONE) {
close(fence);
@@ -952,9 +1000,11 @@
auto stream = readHandle();
- auto err = lookupLayerSidebandStream(stream);
+ auto err = lookupLayerSidebandStream(stream, &stream);
if (err == Error::NONE) {
err = mHal.setLayerSidebandStream(mDisplay, mLayer, stream);
+
+ updateLayerSidebandStream(stream);
}
if (err != Error::NONE) {
mWriter.setError(getCommandLoc(), err);
@@ -1053,26 +1103,24 @@
};
}
-Error ComposerClient::CommandReader::lookupBuffer(BufferCache cache,
- uint32_t slot, bool useCache, buffer_handle_t& handle)
+Error ComposerClient::CommandReader::lookupBufferCacheEntryLocked(
+ BufferCache cache, uint32_t slot, BufferCacheEntry** outEntry)
{
- std::lock_guard<std::mutex> lock(mClient.mDisplayDataMutex);
-
auto dpy = mClient.mDisplayData.find(mDisplay);
if (dpy == mClient.mDisplayData.end()) {
return Error::BAD_DISPLAY;
}
- BufferClone* clone = nullptr;
+ BufferCacheEntry* entry = nullptr;
switch (cache) {
case BufferCache::CLIENT_TARGETS:
if (slot < dpy->second.ClientTargets.size()) {
- clone = &dpy->second.ClientTargets[slot];
+ entry = &dpy->second.ClientTargets[slot];
}
break;
case BufferCache::OUTPUT_BUFFERS:
if (slot < dpy->second.OutputBuffers.size()) {
- clone = &dpy->second.OutputBuffers[slot];
+ entry = &dpy->second.OutputBuffers[slot];
}
break;
case BufferCache::LAYER_BUFFERS:
@@ -1082,7 +1130,7 @@
return Error::BAD_LAYER;
}
if (slot < ly->second.Buffers.size()) {
- clone = &ly->second.Buffers[slot];
+ entry = &ly->second.Buffers[slot];
}
}
break;
@@ -1093,7 +1141,7 @@
return Error::BAD_LAYER;
}
if (slot == 0) {
- clone = &ly->second.SidebandStream;
+ entry = &ly->second.SidebandStream;
}
}
break;
@@ -1101,25 +1149,59 @@
break;
}
- if (!clone) {
- ALOGW("invalid buffer slot");
+ if (!entry) {
+ ALOGW("invalid buffer slot %" PRIu32, slot);
return Error::BAD_PARAMETER;
}
- // use or update cache
+ *outEntry = entry;
+
+ return Error::NONE;
+}
+
+Error ComposerClient::CommandReader::lookupBuffer(BufferCache cache,
+ uint32_t slot, bool useCache, buffer_handle_t handle,
+ buffer_handle_t* outHandle)
+{
if (useCache) {
- handle = *clone;
+ std::lock_guard<std::mutex> lock(mClient.mDisplayDataMutex);
+
+ BufferCacheEntry* entry;
+ Error error = lookupBufferCacheEntryLocked(cache, slot, &entry);
+ if (error != Error::NONE) {
+ return error;
+ }
+
+ // input handle is ignored
+ *outHandle = entry->getHandle();
} else {
if (!sHandleImporter.importBuffer(handle)) {
return Error::NO_RESOURCES;
}
- *clone = handle;
+ *outHandle = handle;
}
return Error::NONE;
}
+void ComposerClient::CommandReader::updateBuffer(BufferCache cache,
+ uint32_t slot, bool useCache, buffer_handle_t handle)
+{
+ // handle was looked up from cache
+ if (useCache) {
+ return;
+ }
+
+ std::lock_guard<std::mutex> lock(mClient.mDisplayDataMutex);
+
+ BufferCacheEntry* entry = nullptr;
+ lookupBufferCacheEntryLocked(cache, slot, &entry);
+ LOG_FATAL_IF(!entry, "failed to find the cache entry to update");
+
+ *entry = handle;
+}
+
} // namespace implementation
} // namespace V2_1
} // namespace composer
diff --git a/graphics/composer/2.1/default/ComposerClient.h b/graphics/composer/2.1/default/ComposerClient.h
index d351cfb..14da1f8 100644
--- a/graphics/composer/2.1/default/ComposerClient.h
+++ b/graphics/composer/2.1/default/ComposerClient.h
@@ -31,18 +31,18 @@
namespace V2_1 {
namespace implementation {
-class BufferClone {
+class BufferCacheEntry {
public:
- BufferClone();
- BufferClone(BufferClone&& other);
+ BufferCacheEntry();
+ BufferCacheEntry(BufferCacheEntry&& other);
- BufferClone(const BufferClone& other) = delete;
- BufferClone& operator=(const BufferClone& other) = delete;
+ BufferCacheEntry(const BufferCacheEntry& other) = delete;
+ BufferCacheEntry& operator=(const BufferCacheEntry& other) = delete;
- BufferClone& operator=(buffer_handle_t handle);
- ~BufferClone();
+ BufferCacheEntry& operator=(buffer_handle_t handle);
+ ~BufferCacheEntry();
- operator buffer_handle_t() const { return mHandle; }
+ buffer_handle_t getHandle() const { return mHandle; }
private:
void clear();
@@ -108,15 +108,15 @@
protected:
struct LayerBuffers {
- std::vector<BufferClone> Buffers;
- BufferClone SidebandStream;
+ std::vector<BufferCacheEntry> Buffers;
+ BufferCacheEntry SidebandStream;
};
struct DisplayData {
bool IsVirtual;
- std::vector<BufferClone> ClientTargets;
- std::vector<BufferClone> OutputBuffers;
+ std::vector<BufferCacheEntry> ClientTargets;
+ std::vector<BufferCacheEntry> OutputBuffers;
std::unordered_map<Layer, LayerBuffers> Layers;
@@ -167,12 +167,23 @@
LAYER_BUFFERS,
LAYER_SIDEBAND_STREAMS,
};
+ Error lookupBufferCacheEntryLocked(BufferCache cache, uint32_t slot,
+ BufferCacheEntry** outEntry);
Error lookupBuffer(BufferCache cache, uint32_t slot,
- bool useCache, buffer_handle_t& handle);
+ bool useCache, buffer_handle_t handle,
+ buffer_handle_t* outHandle);
+ void updateBuffer(BufferCache cache, uint32_t slot,
+ bool useCache, buffer_handle_t handle);
- Error lookupLayerSidebandStream(buffer_handle_t& handle)
+ Error lookupLayerSidebandStream(buffer_handle_t handle,
+ buffer_handle_t* outHandle)
{
return lookupBuffer(BufferCache::LAYER_SIDEBAND_STREAMS,
+ 0, false, handle, outHandle);
+ }
+ void updateLayerSidebandStream(buffer_handle_t handle)
+ {
+ updateBuffer(BufferCache::LAYER_SIDEBAND_STREAMS,
0, false, handle);
}
diff --git a/graphics/composer/2.1/vts/functional/Android.bp b/graphics/composer/2.1/vts/functional/Android.bp
index 890cc05..8e1f925 100644
--- a/graphics/composer/2.1/vts/functional/Android.bp
+++ b/graphics/composer/2.1/vts/functional/Android.bp
@@ -20,7 +20,7 @@
srcs: ["VtsHalGraphicsComposerTestUtils.cpp"],
shared_libs: ["android.hardware.graphics.composer@2.1"],
static_libs: [
- "VtsHalHidlTargetBaseTest",
+ "VtsHalHidlTargetTestBase",
],
cflags: [
"-Wall",
@@ -55,7 +55,7 @@
"libVtsHalGraphicsAllocatorTestUtils",
"libVtsHalGraphicsComposerTestUtils",
"libVtsHalGraphicsMapperTestUtils",
- "VtsHalHidlTargetBaseTest",
+ "VtsHalHidlTargetTestBase",
],
cflags: [
"-Wall",
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp
index 5b6a108..33cf84c 100644
--- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerTestUtils.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "VtsHalGraphicsComposerTestUtils.h"
@@ -28,7 +28,7 @@
Composer::Composer() { init(); }
void Composer::init() {
- mComposer = ::testing::VtsHalHidlTargetBaseTest::getService<IComposer>();
+ mComposer = ::testing::VtsHalHidlTargetTestBase::getService<IComposer>();
ASSERT_NE(nullptr, mComposer.get()) << "failed to get composer service";
std::vector<IComposer::Capability> capabilities = getCapabilities();
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
index 0390c88..0da3a33 100644
--- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
+++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp
@@ -22,7 +22,7 @@
#include "VtsHalGraphicsComposerTestUtils.h"
#include "VtsHalGraphicsMapperTestUtils.h"
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <unistd.h>
#include <algorithm>
@@ -134,7 +134,7 @@
int mInvalidVsyncCount = 0;
};
-class GraphicsComposerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class GraphicsComposerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(mComposer = std::make_unique<Composer>());
diff --git a/graphics/mapper/2.0/vts/functional/Android.bp b/graphics/mapper/2.0/vts/functional/Android.bp
index 5b31fe5..e26f087 100644
--- a/graphics/mapper/2.0/vts/functional/Android.bp
+++ b/graphics/mapper/2.0/vts/functional/Android.bp
@@ -23,7 +23,7 @@
"android.hardware.graphics.mapper@2.0",
],
static_libs: [
- "VtsHalHidlTargetBaseTest",
+ "VtsHalHidlTargetTestBase",
"libVtsHalGraphicsAllocatorTestUtils",
],
cflags: [
@@ -56,7 +56,7 @@
static_libs: [
"libVtsHalGraphicsAllocatorTestUtils",
"libVtsHalGraphicsMapperTestUtils",
- "VtsHalHidlTargetBaseTest",
+ "VtsHalHidlTargetTestBase",
],
cflags: [
"-Wall",
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
index fc26587..f6a26ac 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperTestUtils.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "VtsHalGraphicsMapperTestUtils.h"
@@ -32,7 +32,7 @@
Mapper::Mapper() { init(); }
void Mapper::init() {
- mMapper = ::testing::VtsHalHidlTargetBaseTest::getService<IMapper>();
+ mMapper = ::testing::VtsHalHidlTargetTestBase::getService<IMapper>();
ASSERT_NE(nullptr, mMapper.get()) << "failed to get mapper service";
ASSERT_FALSE(mMapper->isRemote()) << "mapper is not in passthrough mode";
}
diff --git a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
index bd8315e..92d74d5 100644
--- a/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
+++ b/graphics/mapper/2.0/vts/functional/VtsHalGraphicsMapperV2_0TargetTest.cpp
@@ -17,7 +17,7 @@
#define LOG_TAG "graphics_mapper_hidl_hal_test"
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <sync/sync.h>
#include "VtsHalGraphicsMapperTestUtils.h"
@@ -32,7 +32,7 @@
using namespace android::hardware::graphics::allocator::V2_0;
using namespace android::hardware::graphics::allocator::V2_0::tests;
-class GraphicsMapperHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class GraphicsMapperHidlTest : public ::testing::VtsHalHidlTargetTestBase {
protected:
void SetUp() override {
ASSERT_NO_FATAL_FAILURE(mAllocator = std::make_unique<Allocator>());
diff --git a/ir/1.0/vts/functional/Android.bp b/ir/1.0/vts/functional/Android.bp
index 8076126..4aac297 100644
--- a/ir/1.0/vts/functional/Android.bp
+++ b/ir/1.0/vts/functional/Android.bp
@@ -27,7 +27,7 @@
"libutils",
"android.hardware.ir@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
index ead41c8..3dad3c1 100644
--- a/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
+++ b/ir/1.0/vts/functional/VtsHalIrV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/ir/1.0/IConsumerIr.h>
#include <android/hardware/ir/1.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <algorithm>
using ::android::hardware::ir::V1_0::IConsumerIr;
@@ -31,10 +31,10 @@
using ::android::sp;
// The main test class for IR HIDL HAL.
-class ConsumerIrHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class ConsumerIrHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- ir = ::testing::VtsHalHidlTargetBaseTest::getService<IConsumerIr>();
+ ir = ::testing::VtsHalHidlTargetTestBase::getService<IConsumerIr>();
ASSERT_NE(ir, nullptr);
}
diff --git a/light/2.0/vts/functional/Android.bp b/light/2.0/vts/functional/Android.bp
index 90f80df..0558ff2 100644
--- a/light/2.0/vts/functional/Android.bp
+++ b/light/2.0/vts/functional/Android.bp
@@ -25,7 +25,7 @@
"libutils",
"android.hardware.light@2.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp b/light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp
index 50b6d5f..3405422 100644
--- a/light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp
+++ b/light/2.0/vts/functional/VtsHalLightV2_0TargetTest.cpp
@@ -19,7 +19,7 @@
#include <android-base/logging.h>
#include <android/hardware/light/2.0/ILight.h>
#include <android/hardware/light/2.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <set>
#include <unistd.h>
@@ -72,10 +72,10 @@
Type::WIFI
};
-class LightHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class LightHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- light = ::testing::VtsHalHidlTargetBaseTest::getService<ILight>();
+ light = ::testing::VtsHalHidlTargetTestBase::getService<ILight>();
ASSERT_NE(light, nullptr);
LOG(INFO) << "Test is remote " << light->isRemote();
diff --git a/media/omx/1.0/IGraphicBufferSource.hal b/media/omx/1.0/IGraphicBufferSource.hal
index 62073ad..4dbfd32 100644
--- a/media/omx/1.0/IGraphicBufferSource.hal
+++ b/media/omx/1.0/IGraphicBufferSource.hal
@@ -29,25 +29,25 @@
*/
interface IGraphicBufferSource {
- configure(IOmxNode omxNode, Dataspace dataspace) generates (Status status);
+ configure(IOmxNode omxNode, Dataspace dataspace);
- setSuspend(bool suspend, int64_t timeUs) generates (Status status);
+ setSuspend(bool suspend, int64_t timeUs);
- setRepeatPreviousFrameDelayUs(int64_t repeatAfterUs) generates (Status status);
+ setRepeatPreviousFrameDelayUs(int64_t repeatAfterUs);
- setMaxFps(float maxFps) generates (Status status);
+ setMaxFps(float maxFps);
- setTimeLapseConfig(int64_t timePerFrameUs, int64_t timePerCaptureUs) generates (Status status);
+ setTimeLapseConfig(int64_t timePerFrameUs, int64_t timePerCaptureUs);
- setStartTimeUs(int64_t startTimeUs) generates (Status status);
+ setStartTimeUs(int64_t startTimeUs);
- setStopTimeUs(int64_t stopTimeUs) generates (Status status);
+ setStopTimeUs(int64_t stopTimeUs);
- setColorAspects(ColorAspects aspects) generates (Status status);
+ setColorAspects(ColorAspects aspects);
- setTimeOffsetUs(int64_t timeOffsetUs) generates (Status status);
+ setTimeOffsetUs(int64_t timeOffsetUs);
- signalEndOfInputStream() generates (Status status);
+ signalEndOfInputStream();
};
diff --git a/memtrack/1.0/vts/functional/Android.bp b/memtrack/1.0/vts/functional/Android.bp
index 0eba82e..71e6111 100644
--- a/memtrack/1.0/vts/functional/Android.bp
+++ b/memtrack/1.0/vts/functional/Android.bp
@@ -27,7 +27,7 @@
"libutils",
"android.hardware.memtrack@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp b/memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp
index 1113f42..a8d8aea 100644
--- a/memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp
+++ b/memtrack/1.0/vts/functional/VtsHalMemtrackV1_0TargetTest.cpp
@@ -16,9 +16,11 @@
#define LOG_TAG "memtrack_hidl_hal_test"
#include <android-base/logging.h>
+#include <android-base/unique_fd.h>
+
#include <android/hardware/memtrack/1.0/IMemtrack.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <algorithm>
#include <vector>
@@ -31,13 +33,14 @@
using ::android::hardware::hidl_vec;
using ::android::hardware::Return;
using ::android::sp;
+using ::android::base::unique_fd;
using std::vector;
using std::count_if;
-class MemtrackHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class MemtrackHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- memtrack = ::testing::VtsHalHidlTargetBaseTest::getService<IMemtrack>();
+ memtrack = ::testing::VtsHalHidlTargetTestBase::getService<IMemtrack>();
ASSERT_NE(memtrack, nullptr);
}
@@ -66,42 +69,6 @@
return std::find(statusVec.begin(), statusVec.end(), s) != statusVec.end();
}
-/* Returns a pid found in /proc for which the string read from
- * /proc/[pid]/cmdline matches cmd, or -1 if no such pid exists.
- */
-pid_t getPidFromCmd(const char cmd[], uint32_t len) {
- const char procs[] = "/proc/";
- DIR *dir = opendir(procs);
- if (!dir) {
- return -1;
- }
-
- struct dirent *proc;
- while ((proc = readdir(dir)) != NULL) {
- if (!isdigit(proc->d_name[0])) {
- continue;
- }
- char line[len];
- char fname[PATH_MAX];
- snprintf(fname, PATH_MAX, "/proc/%s/cmdline", proc->d_name);
-
- FILE *file = fopen(fname, "r");
- if (!file) {
- continue;
- }
- char *str = fgets(line, len, file);
- fclose(file);
- if (!str || strcmp(str, cmd)) {
- continue;
- } else {
- closedir(dir);
- return atoi(proc->d_name);
- }
- }
- closedir(dir);
- return -1;
-}
-
auto generate_cb(MemtrackStatus *s, hidl_vec<MemtrackRecord> *v) {
return [=](MemtrackStatus status, hidl_vec<MemtrackRecord> vec) {
*s = status;
@@ -135,15 +102,15 @@
ASSERT_TRUE(validStatus(s));
}
-/* Call memtrack on the surfaceflinger process and check that the results are
- * reasonable for all memory types, including valid flag combinations for
- * every MemtrackRecord returned.
+/* Call memtrack on this process and check that the results are reasonable
+ * for all memory types, including valid flag combinations for every
+ * MemtrackRecord returned.
*/
-TEST_F(MemtrackHidlTest, SurfaceflingerTest) {
- const char cmd[] = "/system/bin/surfaceflinger";
- const uint32_t len = sizeof(cmd);
- pid_t pid = getPidFromCmd(cmd, len);
- ASSERT_LE(0, pid) << "Surfaceflinger process not found";
+TEST_F(MemtrackHidlTest, GetMemoryTest) {
+ /* Opening this device causes the kernel to provide memtrack with memory
+ * info for this process.
+ */
+ unique_fd fd(open("/dev/kgsl-3d0", O_RDWR));
MemtrackStatus s;
hidl_vec<MemtrackRecord> v;
@@ -152,7 +119,7 @@
for (uint32_t i = 0; i < static_cast<uint32_t>(MemtrackType::NUM_TYPES);
i++) {
Return<void> ret =
- memtrack->getMemory(pid, static_cast<MemtrackType>(i), cb);
+ memtrack->getMemory(getpid(), static_cast<MemtrackType>(i), cb);
ASSERT_TRUE(ret.isOk());
switch (s) {
diff --git a/nfc/1.0/vts/functional/Android.bp b/nfc/1.0/vts/functional/Android.bp
index f0359dc..d9ba702 100644
--- a/nfc/1.0/vts/functional/Android.bp
+++ b/nfc/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.nfc@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
index 4aa6d7e..aa3bc9c 100644
--- a/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
+++ b/nfc/1.0/vts/functional/VtsHalNfcV1_0TargetTest.cpp
@@ -22,7 +22,7 @@
#include <android/hardware/nfc/1.0/types.h>
#include <hardware/nfc.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <chrono>
#include <condition_variable>
#include <mutex>
@@ -56,10 +56,10 @@
#define TIMEOUT_PERIOD 5
// The main test class for NFC HIDL HAL.
-class NfcHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class NfcHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- nfc_ = ::testing::VtsHalHidlTargetBaseTest::getService<INfc>();
+ nfc_ = ::testing::VtsHalHidlTargetTestBase::getService<INfc>();
ASSERT_NE(nfc_, nullptr);
nfc_cb_ = new NfcClientCallback(*this);
diff --git a/power/1.0/vts/functional/Android.bp b/power/1.0/vts/functional/Android.bp
index 161dacd..5ab1eb4 100644
--- a/power/1.0/vts/functional/Android.bp
+++ b/power/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.power@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
index 9309a5f..cd1a261 100644
--- a/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
+++ b/power/1.0/vts/functional/VtsHalPowerV1_0TargetTest.cpp
@@ -22,7 +22,7 @@
#include <android-base/unique_fd.h>
#include <android/hardware/power/1.0/IPower.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <algorithm>
@@ -43,10 +43,10 @@
#define AVAILABLE_GOVERNORS_PATH \
"/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors"
-class PowerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class PowerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- power = ::testing::VtsHalHidlTargetBaseTest::getService<IPower>();
+ power = ::testing::VtsHalHidlTargetTestBase::getService<IPower>();
ASSERT_NE(power, nullptr);
}
diff --git a/radio/1.0/vts/functional/Android.bp b/radio/1.0/vts/functional/Android.bp
index 67309ca..7f16163 100644
--- a/radio/1.0/vts/functional/Android.bp
+++ b/radio/1.0/vts/functional/Android.bp
@@ -33,7 +33,7 @@
"libutils",
"android.hardware.radio@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
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 50b27e9..db7356f 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
+++ b/radio/1.0/vts/functional/radio_hidl_hal_test.cpp
@@ -17,7 +17,7 @@
#include<radio_hidl_hal_utils.h>
void RadioHidlTest::SetUp() {
- radio = ::testing::VtsHalHidlTargetBaseTest::getService<IRadio>(hidl_string("rild"));
+ radio = ::testing::VtsHalHidlTargetTestBase::getService<IRadio>(hidl_string("rild"));
ASSERT_NE(radio, nullptr);
radioRsp = new RadioResponse(*this);
diff --git a/radio/1.0/vts/functional/radio_hidl_hal_utils.h b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
index 04d4563..bb693ac 100644
--- a/radio/1.0/vts/functional/radio_hidl_hal_utils.h
+++ b/radio/1.0/vts/functional/radio_hidl_hal_utils.h
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <chrono>
#include <condition_variable>
#include <mutex>
@@ -435,7 +435,7 @@
};
// The main test class for Radio HIDL.
-class RadioHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class RadioHidlTest : public ::testing::VtsHalHidlTargetTestBase {
private:
std::mutex mtx;
std::condition_variable cv;
diff --git a/sensors/1.0/default/Sensors.cpp b/sensors/1.0/default/Sensors.cpp
index 37e2b81..2457310 100644
--- a/sensors/1.0/default/Sensors.cpp
+++ b/sensors/1.0/default/Sensors.cpp
@@ -165,8 +165,9 @@
if(!lock.owns_lock()){
// cannot get the lock, hidl service will go into deadlock if it is not restarted.
// This is guaranteed to not trigger in passthrough mode.
- LOG(FATAL) <<
+ LOG(ERROR) <<
"ISensors::poll() re-entry. I do not know what to do except killing myself.";
+ ::exit(-1);
}
if (maxCount <= 0) {
diff --git a/sensors/1.0/vts/functional/Android.bp b/sensors/1.0/vts/functional/Android.bp
index f43557a..af149ba 100644
--- a/sensors/1.0/vts/functional/Android.bp
+++ b/sensors/1.0/vts/functional/Android.bp
@@ -25,7 +25,7 @@
"liblog",
"libutils",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
index 2937a43..1298e16 100644
--- a/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
+++ b/sensors/1.0/vts/functional/VtsHalSensorsV1_0TargetTest.cpp
@@ -20,7 +20,7 @@
#include <android/hardware/sensors/1.0/types.h>
#include <android/log.h>
#include <cutils/ashmem.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <hardware/sensors.h> // for sensor type strings
#include <algorithm>
@@ -80,7 +80,7 @@
};
void SensorsHidlEnvironment::SetUp() {
- sensors = ::testing::VtsHalHidlTargetBaseTest::getService<ISensors>();
+ sensors = ::testing::VtsHalHidlTargetTestBase::getService<ISensors>();
ALOGI_IF(sensors, "sensors is not nullptr, %p", sensors.get());
ASSERT_NE(sensors, nullptr);
@@ -309,7 +309,7 @@
}
// The main test class for SENSORS HIDL HAL.
-class SensorsHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class SensorsHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
}
diff --git a/soundtrigger/2.0/vts/functional/Android.bp b/soundtrigger/2.0/vts/functional/Android.bp
index b8ca2f9..8f0cc4e 100644
--- a/soundtrigger/2.0/vts/functional/Android.bp
+++ b/soundtrigger/2.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.soundtrigger@2.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp b/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp
index fcc989f..0ef4063 100644
--- a/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp
+++ b/soundtrigger/2.0/vts/functional/VtsHalSoundtriggerV2_0TargetTest.cpp
@@ -28,7 +28,7 @@
#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
#include <android/hardware/soundtrigger/2.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#define SHORT_TIMEOUT_PERIOD (1)
@@ -86,10 +86,10 @@
};
// The main test class for Sound Trigger HIDL HAL.
-class SoundTriggerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class SoundTriggerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- mSoundTriggerHal = ::testing::VtsHalHidlTargetBaseTest::getService<ISoundTriggerHw>("sound_trigger.primary");
+ mSoundTriggerHal = ::testing::VtsHalHidlTargetTestBase::getService<ISoundTriggerHw>("sound_trigger.primary");
ASSERT_NE(nullptr, mSoundTriggerHal.get());
mCallback = new SoundTriggerHwCallback(*this);
ASSERT_NE(nullptr, mCallback.get());
diff --git a/thermal/1.0/vts/functional/Android.bp b/thermal/1.0/vts/functional/Android.bp
index 95fbea8..9046882 100644
--- a/thermal/1.0/vts/functional/Android.bp
+++ b/thermal/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.thermal@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp b/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp
index 6feec73..3989c94 100644
--- a/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp
+++ b/thermal/1.0/vts/functional/VtsHalThermalV1_0TargetTest.cpp
@@ -24,7 +24,7 @@
#include <android-base/logging.h>
#include <android/hardware/thermal/1.0/IThermal.h>
#include <android/hardware/thermal/1.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <unistd.h>
using ::android::hardware::hidl_string;
@@ -46,10 +46,10 @@
#define MAX_FAN_SPEED 20000
// The main test class for THERMAL HIDL HAL.
-class ThermalHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class ThermalHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- thermal_ = ::testing::VtsHalHidlTargetBaseTest::getService<IThermal>();
+ thermal_ = ::testing::VtsHalHidlTargetTestBase::getService<IThermal>();
ASSERT_NE(thermal_, nullptr);
baseSize_ = 0;
names_.clear();
diff --git a/tv/input/1.0/vts/functional/Android.bp b/tv/input/1.0/vts/functional/Android.bp
index 57fb35e..c862429 100644
--- a/tv/input/1.0/vts/functional/Android.bp
+++ b/tv/input/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.tv.input@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp b/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp
index 6757df1..0d5110e 100644
--- a/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp
+++ b/tv/input/1.0/vts/functional/VtsHalTvInputV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/tv/input/1.0/ITvInput.h>
#include <android/hardware/tv/input/1.0/ITvInputCallback.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <utils/KeyedVector.h>
#include <mutex>
#include <vector>
@@ -43,10 +43,10 @@
#define DEFAULT_ID INT32_MIN
/* The main test class for TV Input HIDL HAL. */
-class TvInputHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class TvInputHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- tv_input_ = ::testing::VtsHalHidlTargetBaseTest::getService<ITvInput>();
+ tv_input_ = ::testing::VtsHalHidlTargetTestBase::getService<ITvInput>();
ASSERT_NE(tv_input_, nullptr);
tv_input_callback_ = new TvInputCallback(*this);
ASSERT_NE(tv_input_callback_, nullptr);
diff --git a/usb/1.0/vts/functional/Android.bp b/usb/1.0/vts/functional/Android.bp
index 1bca694..7438bc7 100644
--- a/usb/1.0/vts/functional/Android.bp
+++ b/usb/1.0/vts/functional/Android.bp
@@ -28,7 +28,7 @@
"libutils",
"android.hardware.usb@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp b/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
index 9d59fe2..54db8c2 100644
--- a/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
+++ b/usb/1.0/vts/functional/VtsHalUsbV1_0TargetTest.cpp
@@ -21,7 +21,7 @@
#include <android/hardware/usb/1.0/IUsbCallback.h>
#include <android/hardware/usb/1.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <stdlib.h>
#include <chrono>
#include <condition_variable>
@@ -50,7 +50,7 @@
#define USB_SERVICE_NAME "usb_hal"
// The main test class for the USB hidl HAL
-class UsbHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class UsbHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
// Callback class for the USB HIDL hal.
// Usb Hal will call this object upon role switch or port query.
@@ -97,7 +97,7 @@
virtual void SetUp() override {
ALOGI("Setup");
- usb = ::testing::VtsHalHidlTargetBaseTest::getService<IUsb>(USB_SERVICE_NAME);
+ usb = ::testing::VtsHalHidlTargetTestBase::getService<IUsb>(USB_SERVICE_NAME);
ASSERT_NE(usb, nullptr);
usb_cb_2 = new UsbCallback(*this, 2);
diff --git a/vibrator/1.0/vts/functional/Android.bp b/vibrator/1.0/vts/functional/Android.bp
index 07fdeea..9e25def 100644
--- a/vibrator/1.0/vts/functional/Android.bp
+++ b/vibrator/1.0/vts/functional/Android.bp
@@ -25,7 +25,7 @@
"libutils",
"android.hardware.vibrator@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp b/vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp
index c9541fe..a978f2c 100644
--- a/vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp
+++ b/vibrator/1.0/vts/functional/VtsHalVibratorV1_0TargetTest.cpp
@@ -19,7 +19,7 @@
#include <android-base/logging.h>
#include <android/hardware/vibrator/1.0/IVibrator.h>
#include <android/hardware/vibrator/1.0/types.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <unistd.h>
using ::android::hardware::vibrator::V1_0::IVibrator;
@@ -29,10 +29,10 @@
using ::android::sp;
// The main test class for VIBRATOR HIDL HAL.
-class VibratorHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class VibratorHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
- vibrator = ::testing::VtsHalHidlTargetBaseTest::getService<IVibrator>();
+ vibrator = ::testing::VtsHalHidlTargetTestBase::getService<IVibrator>();
ASSERT_NE(vibrator, nullptr);
}
diff --git a/vr/1.0/vts/functional/Android.bp b/vr/1.0/vts/functional/Android.bp
index 5c077ea..5d5a99a 100644
--- a/vr/1.0/vts/functional/Android.bp
+++ b/vr/1.0/vts/functional/Android.bp
@@ -24,7 +24,7 @@
"libutils",
"android.hardware.vr@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
index 6a7b078..a983731 100644
--- a/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
+++ b/vr/1.0/vts/functional/VtsHalVrV1_0TargetTest.cpp
@@ -18,7 +18,7 @@
#include <android-base/logging.h>
#include <android/hardware/vr/1.0/IVr.h>
#include <android/log.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <hardware/vr.h>
using ::android::hardware::vr::V1_0::IVr;
@@ -27,10 +27,10 @@
using ::android::sp;
// The main test class for VR HIDL HAL.
-class VrHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class VrHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
void SetUp() override {
- vr = ::testing::VtsHalHidlTargetBaseTest::getService<IVr>();
+ vr = ::testing::VtsHalHidlTargetTestBase::getService<IVr>();
ASSERT_NE(vr, nullptr);
}
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 98a62bf..a89f8c0 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -1898,10 +1898,12 @@
hidl_result->timeStampInUs = legacy_result.ts;
hidl_result->burstDurationInMs = legacy_result.burst_duration;
hidl_result->negotiatedBurstNum = legacy_result.negotiated_burst_num;
- if (!convertLegacyIeToHidl(*legacy_result.LCI, &hidl_result->lci)) {
+ if (legacy_result.LCI && !convertLegacyIeToHidl(*legacy_result.LCI,
+ &hidl_result->lci)) {
return false;
}
- if (!convertLegacyIeToHidl(*legacy_result.LCR, &hidl_result->lcr)) {
+ if (legacy_result.LCR && !convertLegacyIeToHidl(*legacy_result.LCR,
+ &hidl_result->lcr)) {
return false;
}
return true;
diff --git a/wifi/1.0/vts/functional/Android.bp b/wifi/1.0/vts/functional/Android.bp
index 11d0619..eab338b 100644
--- a/wifi/1.0/vts/functional/Android.bp
+++ b/wifi/1.0/vts/functional/Android.bp
@@ -38,7 +38,7 @@
"libutils",
"android.hardware.wifi@1.0",
],
- static_libs: ["VtsHalHidlTargetBaseTest"],
+ static_libs: ["VtsHalHidlTargetTestBase"],
cflags: [
"-O0",
"-g",
diff --git a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
index 51512a1..b56ed2b 100644
--- a/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
+++ b/wifi/1.0/vts/functional/VtsHalWifiV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_test_utils.h"
diff --git a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
index dd3df56..42d9a96 100644
--- a/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_ap_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiApIface.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all AP Iface HIDL interface tests.
*/
-class WifiApIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiApIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
index 465ab64..084067c 100644
--- a/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_chip_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiChip.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_call_util.h"
#include "wifi_hidl_test_utils.h"
@@ -63,7 +63,7 @@
/**
* Fixture to use for all Wifi chip HIDL interface tests.
*/
-class WifiChipHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiChipHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
wifi_chip_ = getWifiChip();
diff --git a/wifi/1.0/vts/functional/wifi_hidl_call_util.h b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
index 4797423..f3ca517 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_call_util.h
+++ b/wifi/1.0/vts/functional/wifi_hidl_call_util.h
@@ -21,7 +21,7 @@
#include <type_traits>
#include <utility>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
namespace {
namespace detail {
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
index 2f4e01e..b8e501c 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifi.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all root Wifi HIDL interface tests.
*/
-class WifiHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
index 0e10e42..2d0b081 100644
--- a/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
+++ b/wifi/1.0/vts/functional/wifi_hidl_test_utils.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_call_util.h"
#include "wifi_hidl_test_utils.h"
@@ -91,7 +91,7 @@
void startFramework() { ASSERT_EQ(std::system("start"), 0); }
sp<IWifi> getWifi() {
- sp<IWifi> wifi = ::testing::VtsHalHidlTargetBaseTest::getService<IWifi>();
+ sp<IWifi> wifi = ::testing::VtsHalHidlTargetTestBase::getService<IWifi>();
return wifi;
}
diff --git a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
index 95c0e5d..85bcccd 100644
--- a/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_nan_iface_hidl_test.cpp
@@ -19,7 +19,7 @@
#include <android/hardware/wifi/1.0/IWifiNanIface.h>
#include <android/hardware/wifi/1.0/IWifiNanIfaceEventCallback.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <chrono>
#include <condition_variable>
#include <mutex>
@@ -38,7 +38,7 @@
/**
* Fixture to use for all NAN Iface HIDL interface tests.
*/
-class WifiNanIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiNanIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
iwifiNanIface = getWifiNanIface();
diff --git a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
index d53096c..269eb6c 100644
--- a/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_p2p_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiP2pIface.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all P2P Iface HIDL interface tests.
*/
-class WifiP2pIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiP2pIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
index 4d08919..e13086d 100644
--- a/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_rtt_controller_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiRttController.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_test_utils.h"
@@ -28,7 +28,7 @@
/**
* Fixture to use for all RTT controller HIDL interface tests.
*/
-class WifiRttControllerHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiRttControllerHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {}
diff --git a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
index 0984241..95add61 100644
--- a/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
+++ b/wifi/1.0/vts/functional/wifi_sta_iface_hidl_test.cpp
@@ -18,7 +18,7 @@
#include <android/hardware/wifi/1.0/IWifiStaIface.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "wifi_hidl_call_util.h"
#include "wifi_hidl_test_utils.h"
@@ -31,7 +31,7 @@
/**
* Fixture to use for all STA Iface HIDL interface tests.
*/
-class WifiStaIfaceHidlTest : public ::testing::VtsHalHidlTargetBaseTest {
+class WifiStaIfaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
public:
virtual void SetUp() override {
wifi_sta_iface_ = getWifiStaIface();
diff --git a/wifi/supplicant/1.0/vts/functional/Android.mk b/wifi/supplicant/1.0/vts/functional/Android.mk
index 93e5250..cfcd4f8 100644
--- a/wifi/supplicant/1.0/vts/functional/Android.mk
+++ b/wifi/supplicant/1.0/vts/functional/Android.mk
@@ -37,6 +37,6 @@
libwifi-system
LOCAL_STATIC_LIBRARIES := \
libgmock \
- VtsHalHidlTargetBaseTest
+ VtsHalHidlTargetTestBase
include $(BUILD_NATIVE_TEST)
diff --git a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
index 802d11c..a69d14d 100644
--- a/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
+++ b/wifi/supplicant/1.0/vts/functional/VtsHalWifiSupplicantV1_0TargetTest.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
index eb02445..ab1b6a3 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
index 3f7ee1a..fdee0c6 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_hidl_test_utils.cpp
@@ -15,7 +15,7 @@
*/
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include <hidl/HidlTransportSupport.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
index 200845b..332b57b 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_p2p_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
index a1f5513..c50539b 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_iface_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "supplicant_hidl_test_utils.h"
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
index e2572c2..cde75fa 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -16,7 +16,7 @@
#include <android-base/logging.h>
-#include <VtsHalHidlTargetBaseTest.h>
+#include <VtsHalHidlTargetTestBase.h>
#include "supplicant_hidl_test_utils.h"