Shortcut a couple tests in DvrDisplayManagerTest
Those tests won't work on dedicated VR devices.
Bug: 121329335
Test: dvr_api-test
Change-Id: I056cb1c985c09c1a859b40e7a29ee373c76b7120
diff --git a/libs/vr/libdvr/tests/dvr_display_manager-test.cpp b/libs/vr/libdvr/tests/dvr_display_manager-test.cpp
index c9a5c09..ed72577 100644
--- a/libs/vr/libdvr/tests/dvr_display_manager-test.cpp
+++ b/libs/vr/libdvr/tests/dvr_display_manager-test.cpp
@@ -1,5 +1,6 @@
#include <android-base/properties.h>
#include <base/logging.h>
+#include <cutils/properties.h>
#include <gtest/gtest.h>
#include <log/log.h>
#include <poll.h>
@@ -479,6 +480,11 @@
#endif
TEST_F(DvrDisplayManagerTest, SurfaceCreateEvent) {
+ // This test doesn't apply to standalone vr devices.
+ if (property_get_bool("ro.boot.vr", false)) {
+ return;
+ }
+
// Get surface state and verify there are no surfaces.
ASSERT_STATUS_OK(manager_->UpdateSurfaceState());
ASSERT_STATUS_EQ(0u, manager_->GetSurfaceCount());
@@ -518,6 +524,11 @@
}
TEST_F(DvrDisplayManagerTest, SurfaceAttributeEvent) {
+ // This test doesn't apply to standalone vr devices.
+ if (property_get_bool("ro.boot.vr", false)) {
+ return;
+ }
+
// Get surface state and verify there are no surfaces.
ASSERT_STATUS_OK(manager_->UpdateSurfaceState());
ASSERT_STATUS_EQ(0u, manager_->GetSurfaceCount());
@@ -757,6 +768,11 @@
}
TEST_F(DvrDisplayManagerTest, SurfaceQueueEvent) {
+ // This test doesn't apply to standalone vr devices.
+ if (property_get_bool("ro.boot.vr", false)) {
+ return;
+ }
+
// Create an application surface.
auto surface_status = CreateApplicationSurface();
ASSERT_STATUS_OK(surface_status);
@@ -825,6 +841,11 @@
}
TEST_F(DvrDisplayManagerTest, MultiLayerBufferQueue) {
+ // This test doesn't apply to standalone vr devices.
+ if (property_get_bool("ro.boot.vr", false)) {
+ return;
+ }
+
// Create an application surface.
auto surface_status = CreateApplicationSurface();
ASSERT_STATUS_OK(surface_status);
diff --git a/services/vr/bufferhubd/producer_channel.cpp b/services/vr/bufferhubd/producer_channel.cpp
index 1682bfe..5c484b8 100644
--- a/services/vr/bufferhubd/producer_channel.cpp
+++ b/services/vr/bufferhubd/producer_channel.cpp
@@ -310,7 +310,7 @@
Status<RemoteChannelHandle> ProducerChannel::CreateConsumer(
Message& message, uint32_t consumer_state_mask) {
ATRACE_NAME(__FUNCTION__);
- ALOGD_IF(TRACE, "%s: buffer_id=%d", __FUNCTION__, buffer_id());
+ ALOGD("%s: buffer_id=%d", __FUNCTION__, buffer_id());
int channel_id;
auto status = message.PushChannel(0, nullptr, &channel_id);
@@ -389,7 +389,8 @@
Status<void> ProducerChannel::OnProducerPost(Message&,
LocalFence acquire_fence) {
ATRACE_NAME("ProducerChannel::OnProducerPost");
- ALOGD_IF(TRACE, "ProducerChannel::OnProducerPost: buffer_id=%d", buffer_id());
+ ALOGD("ProducerChannel::OnProducerPost: buffer_id=%d, state=0x%x",
+ buffer_id(), buffer_state_->load(std::memory_order_acquire));
epoll_event event;
event.events = 0;
@@ -433,7 +434,7 @@
Status<LocalFence> ProducerChannel::OnProducerGain(Message& /*message*/) {
ATRACE_NAME("ProducerChannel::OnGain");
- ALOGD_IF(TRACE, "ProducerChannel::OnGain: buffer_id=%d", buffer_id());
+ ALOGW("ProducerChannel::OnGain: buffer_id=%d", buffer_id());
ClearAvailable();
post_fence_.close();
@@ -542,7 +543,7 @@
if (orphaned_consumer_bit_mask_) {
ALOGW(
"%s: orphaned buffer detected during the this acquire/release cycle: "
- "id=%d orphaned=0x%" PRIx32 " queue_index=%" PRIx64 ".",
+ "id=%d orphaned=0x%" PRIx32 " queue_index=%" PRId64 ".",
__FUNCTION__, buffer_id(), orphaned_consumer_bit_mask_,
metadata_header_->queue_index);
orphaned_consumer_bit_mask_ = 0;
@@ -577,7 +578,7 @@
ALOGW(
"%s: detected new orphaned consumer buffer_id=%d "
- "consumer_state_mask=%" PRIx32 " queue_index=%" PRIx64
+ "consumer_state_mask=%" PRIx32 " queue_index=%" PRId64
" buffer_state=%" PRIx32 " fence_state=%" PRIx32 ".",
__FUNCTION__, buffer_id(), consumer_state_mask,
metadata_header_->queue_index,