summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp')
-rw-r--r--bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp48
1 files changed, 26 insertions, 22 deletions
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
index 439c5fb1..ae84ec2b 100644
--- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
+++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp
@@ -28,13 +28,13 @@
28#include <VtsHalHidlTargetTestEnvBase.h> 28#include <VtsHalHidlTargetTestEnvBase.h>
29#include <queue> 29#include <queue>
30 30
31using ::android::hardware::bluetooth::V1_0::IBluetoothHci; 31using ::android::sp;
32using ::android::hardware::bluetooth::V1_0::IBluetoothHciCallbacks;
33using ::android::hardware::bluetooth::V1_0::Status;
34using ::android::hardware::hidl_vec; 32using ::android::hardware::hidl_vec;
35using ::android::hardware::Return; 33using ::android::hardware::Return;
36using ::android::hardware::Void; 34using ::android::hardware::Void;
37using ::android::sp; 35using ::android::hardware::bluetooth::V1_0::IBluetoothHci;
36using ::android::hardware::bluetooth::V1_0::IBluetoothHciCallbacks;
37using ::android::hardware::bluetooth::V1_0::Status;
38 38
39#define HCI_MINIMUM_HCI_VERSION 5 // Bluetooth Core Specification 3.0 + HS 39#define HCI_MINIMUM_HCI_VERSION 5 // Bluetooth Core Specification 3.0 + HS
40#define HCI_MINIMUM_LMP_VERSION 5 // Bluetooth Core Specification 3.0 + HS 40#define HCI_MINIMUM_LMP_VERSION 5 // Bluetooth Core Specification 3.0 + HS
@@ -191,12 +191,12 @@ class BluetoothHidlTest : public ::testing::VtsHalHidlTargetTestBase {
191 } 191 }
192 192
193 virtual void TearDown() override { 193 virtual void TearDown() override {
194 // Should not be checked in production code 194 // Should not be checked in production code
195 ASSERT_TRUE(bluetooth->close().isOk()); 195 ASSERT_TRUE(bluetooth->close().isOk());
196 handle_no_ops(); 196 handle_no_ops();
197 EXPECT_EQ(static_cast<size_t>(0), event_queue.size()); 197 EXPECT_EQ(static_cast<size_t>(0), event_queue.size());
198 EXPECT_EQ(static_cast<size_t>(0), sco_queue.size()); 198 EXPECT_EQ(static_cast<size_t>(0), sco_queue.size());
199 EXPECT_EQ(static_cast<size_t>(0), acl_queue.size()); 199 EXPECT_EQ(static_cast<size_t>(0), acl_queue.size());
200 } 200 }
201 201
202 void setBufferSizes(); 202 void setBufferSizes();
@@ -659,10 +659,11 @@ TEST_F(BluetoothHidlTest, LoopbackModeSinglePackets) {
659 EXPECT_LT(0, max_sco_data_packet_length); 659 EXPECT_LT(0, max_sco_data_packet_length);
660 sendAndCheckSCO(1, max_sco_data_packet_length, sco_connection_handles[0]); 660 sendAndCheckSCO(1, max_sco_data_packet_length, sco_connection_handles[0]);
661 int sco_packets_sent = 1; 661 int sco_packets_sent = 1;
662 int completed_packets = wait_for_completed_packets_event(sco_connection_handles[0]); 662 int completed_packets =
663 wait_for_completed_packets_event(sco_connection_handles[0]);
663 if (sco_packets_sent != completed_packets) { 664 if (sco_packets_sent != completed_packets) {
664 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, sco_packets_sent, 665 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__,
665 completed_packets); 666 sco_packets_sent, completed_packets);
666 } 667 }
667 } 668 }
668 669
@@ -670,10 +671,11 @@ TEST_F(BluetoothHidlTest, LoopbackModeSinglePackets) {
670 EXPECT_LT(0, max_acl_data_packet_length); 671 EXPECT_LT(0, max_acl_data_packet_length);
671 sendAndCheckACL(1, max_acl_data_packet_length, acl_connection_handles[0]); 672 sendAndCheckACL(1, max_acl_data_packet_length, acl_connection_handles[0]);
672 int acl_packets_sent = 1; 673 int acl_packets_sent = 1;
673 int completed_packets = wait_for_completed_packets_event(acl_connection_handles[0]); 674 int completed_packets =
675 wait_for_completed_packets_event(acl_connection_handles[0]);
674 if (acl_packets_sent != completed_packets) { 676 if (acl_packets_sent != completed_packets) {
675 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, acl_packets_sent, 677 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__,
676 completed_packets); 678 acl_packets_sent, completed_packets);
677 } 679 }
678 } 680 }
679} 681}
@@ -695,10 +697,11 @@ TEST_F(BluetoothHidlTest, LoopbackModeBandwidth) {
695 sendAndCheckSCO(NUM_SCO_PACKETS_BANDWIDTH, max_sco_data_packet_length, 697 sendAndCheckSCO(NUM_SCO_PACKETS_BANDWIDTH, max_sco_data_packet_length,
696 sco_connection_handles[0]); 698 sco_connection_handles[0]);
697 int sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH; 699 int sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH;
698 int completed_packets = wait_for_completed_packets_event(sco_connection_handles[0]); 700 int completed_packets =
701 wait_for_completed_packets_event(sco_connection_handles[0]);
699 if (sco_packets_sent != completed_packets) { 702 if (sco_packets_sent != completed_packets) {
700 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, sco_packets_sent, 703 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__,
701 completed_packets); 704 sco_packets_sent, completed_packets);
702 } 705 }
703 } 706 }
704 707
@@ -707,10 +710,11 @@ TEST_F(BluetoothHidlTest, LoopbackModeBandwidth) {
707 sendAndCheckACL(NUM_ACL_PACKETS_BANDWIDTH, max_acl_data_packet_length, 710 sendAndCheckACL(NUM_ACL_PACKETS_BANDWIDTH, max_acl_data_packet_length,
708 acl_connection_handles[0]); 711 acl_connection_handles[0]);
709 int acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH; 712 int acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH;
710 int completed_packets = wait_for_completed_packets_event(acl_connection_handles[0]); 713 int completed_packets =
714 wait_for_completed_packets_event(acl_connection_handles[0]);
711 if (acl_packets_sent != completed_packets) { 715 if (acl_packets_sent != completed_packets) {
712 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, acl_packets_sent, 716 ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__,
713 completed_packets); 717 acl_packets_sent, completed_packets);
714 } 718 }
715 } 719 }
716} 720}