diff options
author | Myles Watson | 2017-09-06 20:50:04 -0500 |
---|---|---|
committer | android-build-merger | 2017-09-06 20:50:04 -0500 |
commit | b6f71541c7f8c662960aab9069aab99670385890 (patch) | |
tree | f394ec3cb46dd10c1ae87200afac08b2d5d2025e /bluetooth/1.0 | |
parent | 94c6c15fcd2f0a22857eb0c9d41433252548a136 (diff) | |
parent | 138cf4f037c3030693f9e2d974b21f01e6a8e7ab (diff) | |
download | platform-hardware-interfaces-b6f71541c7f8c662960aab9069aab99670385890.tar.gz platform-hardware-interfaces-b6f71541c7f8c662960aab9069aab99670385890.tar.xz platform-hardware-interfaces-b6f71541c7f8c662960aab9069aab99670385890.zip |
Bluetooth: Remove credit check from Loopback tests am: 0e06a63c76 am: 8f2ea671d9
am: 138cf4f037
Change-Id: Ided5b6a7c401b0f433bd12d3ab2a9a031c94ab89
Diffstat (limited to 'bluetooth/1.0')
-rw-r--r-- | bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp | 45 |
1 files changed, 27 insertions, 18 deletions
diff --git a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp index fb53366c..6c9aa187 100644 --- a/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp +++ b/bluetooth/1.0/vts/functional/VtsHalBluetoothV1_0TargetTest.cpp | |||
@@ -464,8 +464,9 @@ void BluetoothHidlTest::sendAndCheckACL(int num_packets, size_t size, | |||
464 | 464 | ||
465 | // Return the number of completed packets reported by the controller. | 465 | // Return the number of completed packets reported by the controller. |
466 | int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) { | 466 | int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) { |
467 | EXPECT_TRUE(bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived) | 467 | if (!bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).no_timeout) { |
468 | .no_timeout); | 468 | ALOGW("%s: WaitForCallback timed out.", __func__); |
469 | } | ||
469 | int packets_processed = 0; | 470 | int packets_processed = 0; |
470 | while (event_queue.size() > 0) { | 471 | while (event_queue.size() > 0) { |
471 | hidl_vec<uint8_t> event = event_queue.front(); | 472 | hidl_vec<uint8_t> event = event_queue.front(); |
@@ -604,20 +605,24 @@ TEST_F(BluetoothHidlTest, LoopbackModeSinglePackets) { | |||
604 | 605 | ||
605 | // This should work, but breaks on some current platforms. Figure out how to | 606 | // This should work, but breaks on some current platforms. Figure out how to |
606 | // grandfather older devices but test new ones. | 607 | // grandfather older devices but test new ones. |
607 | int sco_packets_sent = 0; | ||
608 | if (0 && sco_connection_handles.size() > 0) { | 608 | if (0 && sco_connection_handles.size() > 0) { |
609 | sendAndCheckSCO(1, max_sco_data_packet_length, sco_connection_handles[0]); | 609 | sendAndCheckSCO(1, max_sco_data_packet_length, sco_connection_handles[0]); |
610 | sco_packets_sent = 1; | 610 | int sco_packets_sent = 1; |
611 | EXPECT_EQ(sco_packets_sent, | 611 | int completed_packets = wait_for_completed_packets_event(sco_connection_handles[0]); |
612 | wait_for_completed_packets_event(sco_connection_handles[0])); | 612 | if (sco_packets_sent != completed_packets) { |
613 | ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, sco_packets_sent, | ||
614 | completed_packets); | ||
615 | } | ||
613 | } | 616 | } |
614 | 617 | ||
615 | int acl_packets_sent = 0; | ||
616 | if (acl_connection_handles.size() > 0) { | 618 | if (acl_connection_handles.size() > 0) { |
617 | sendAndCheckACL(1, max_acl_data_packet_length, acl_connection_handles[0]); | 619 | sendAndCheckACL(1, max_acl_data_packet_length, acl_connection_handles[0]); |
618 | acl_packets_sent = 1; | 620 | int acl_packets_sent = 1; |
619 | EXPECT_EQ(acl_packets_sent, | 621 | int completed_packets = wait_for_completed_packets_event(acl_connection_handles[0]); |
620 | wait_for_completed_packets_event(acl_connection_handles[0])); | 622 | if (acl_packets_sent != completed_packets) { |
623 | ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, acl_packets_sent, | ||
624 | completed_packets); | ||
625 | } | ||
621 | } | 626 | } |
622 | } | 627 | } |
623 | 628 | ||
@@ -633,22 +638,26 @@ TEST_F(BluetoothHidlTest, LoopbackModeBandwidth) { | |||
633 | 638 | ||
634 | // This should work, but breaks on some current platforms. Figure out how to | 639 | // This should work, but breaks on some current platforms. Figure out how to |
635 | // grandfather older devices but test new ones. | 640 | // grandfather older devices but test new ones. |
636 | int sco_packets_sent = 0; | ||
637 | if (0 && sco_connection_handles.size() > 0) { | 641 | if (0 && sco_connection_handles.size() > 0) { |
638 | sendAndCheckSCO(NUM_SCO_PACKETS_BANDWIDTH, max_sco_data_packet_length, | 642 | sendAndCheckSCO(NUM_SCO_PACKETS_BANDWIDTH, max_sco_data_packet_length, |
639 | sco_connection_handles[0]); | 643 | sco_connection_handles[0]); |
640 | sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH; | 644 | int sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH; |
641 | EXPECT_EQ(sco_packets_sent, | 645 | int completed_packets = wait_for_completed_packets_event(sco_connection_handles[0]); |
642 | wait_for_completed_packets_event(sco_connection_handles[0])); | 646 | if (sco_packets_sent != completed_packets) { |
647 | ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, sco_packets_sent, | ||
648 | completed_packets); | ||
649 | } | ||
643 | } | 650 | } |
644 | 651 | ||
645 | int acl_packets_sent = 0; | ||
646 | if (acl_connection_handles.size() > 0) { | 652 | if (acl_connection_handles.size() > 0) { |
647 | sendAndCheckACL(NUM_ACL_PACKETS_BANDWIDTH, max_acl_data_packet_length, | 653 | sendAndCheckACL(NUM_ACL_PACKETS_BANDWIDTH, max_acl_data_packet_length, |
648 | acl_connection_handles[0]); | 654 | acl_connection_handles[0]); |
649 | acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH; | 655 | int acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH; |
650 | EXPECT_EQ(acl_packets_sent, | 656 | int completed_packets = wait_for_completed_packets_event(acl_connection_handles[0]); |
651 | wait_for_completed_packets_event(acl_connection_handles[0])); | 657 | if (acl_packets_sent != completed_packets) { |
658 | ALOGW("%s: packets_sent (%d) != completed_packets (%d)", __func__, acl_packets_sent, | ||
659 | completed_packets); | ||
660 | } | ||
652 | } | 661 | } |
653 | } | 662 | } |
654 | 663 | ||