• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/interfaces


Commit MetaInfo

修订版c7c333931cb4dc6e0f75da865d052f43828e1f17 (tree)
时间2017-09-07 22:41:58
作者Myles Watson <mylesgw@goog...>
CommiterMyles Watson

Log Message

Bluetooth: Remove credit check from Loopback tests

The Bluetooth specification doesn't require data credits
to come back within a specific timeframe, so the VTS test
can not require it.

Bug: 65269854
Test: VtsHalBlueoothV1_0TargetTest with simulated chip (no credits)
Change-Id: If2fc052d3b5236f6a3097f3d5403882226561404
(cherry picked from commit 0e06a63c76f4c02ac307c6294f3d6f61ae6406e7)

更改概述

差异

--- 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,
464464
465465 // Return the number of completed packets reported by the controller.
466466 int BluetoothHidlTest::wait_for_completed_packets_event(uint16_t handle) {
467- EXPECT_TRUE(bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived)
468- .no_timeout);
467+ if (!bluetooth_cb->WaitForCallback(kCallbackNameHciEventReceived).no_timeout) {
468+ ALOGW("%s: WaitForCallback timed out.", __func__);
469+ }
469470 int packets_processed = 0;
470471 while (event_queue.size() > 0) {
471472 hidl_vec<uint8_t> event = event_queue.front();
@@ -604,20 +605,24 @@ TEST_F(BluetoothHidlTest, LoopbackModeSinglePackets) {
604605
605606 // This should work, but breaks on some current platforms. Figure out how to
606607 // grandfather older devices but test new ones.
607- int sco_packets_sent = 0;
608608 if (0 && sco_connection_handles.size() > 0) {
609609 sendAndCheckSCO(1, max_sco_data_packet_length, sco_connection_handles[0]);
610- sco_packets_sent = 1;
611- EXPECT_EQ(sco_packets_sent,
612- wait_for_completed_packets_event(sco_connection_handles[0]));
610+ int sco_packets_sent = 1;
611+ int completed_packets = 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+ }
613616 }
614617
615- int acl_packets_sent = 0;
616618 if (acl_connection_handles.size() > 0) {
617619 sendAndCheckACL(1, max_acl_data_packet_length, acl_connection_handles[0]);
618- acl_packets_sent = 1;
619- EXPECT_EQ(acl_packets_sent,
620- wait_for_completed_packets_event(acl_connection_handles[0]));
620+ int acl_packets_sent = 1;
621+ int completed_packets = 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+ }
621626 }
622627 }
623628
@@ -633,22 +638,26 @@ TEST_F(BluetoothHidlTest, LoopbackModeBandwidth) {
633638
634639 // This should work, but breaks on some current platforms. Figure out how to
635640 // grandfather older devices but test new ones.
636- int sco_packets_sent = 0;
637641 if (0 && sco_connection_handles.size() > 0) {
638642 sendAndCheckSCO(NUM_SCO_PACKETS_BANDWIDTH, max_sco_data_packet_length,
639643 sco_connection_handles[0]);
640- sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH;
641- EXPECT_EQ(sco_packets_sent,
642- wait_for_completed_packets_event(sco_connection_handles[0]));
644+ int sco_packets_sent = NUM_SCO_PACKETS_BANDWIDTH;
645+ int completed_packets = 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+ }
643650 }
644651
645- int acl_packets_sent = 0;
646652 if (acl_connection_handles.size() > 0) {
647653 sendAndCheckACL(NUM_ACL_PACKETS_BANDWIDTH, max_acl_data_packet_length,
648654 acl_connection_handles[0]);
649- acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH;
650- EXPECT_EQ(acl_packets_sent,
651- wait_for_completed_packets_event(acl_connection_handles[0]));
655+ int acl_packets_sent = NUM_ACL_PACKETS_BANDWIDTH;
656+ int completed_packets = 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+ }
652661 }
653662 }
654663