History log of /system/bt/stack/test/common/stack_test_packet_utils.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
272534fc2ce4433c89352d84fb07a5a8fc52ed50 21-Apr-2018 Jack He <siyuanh@google.com> RFCOMM: Add unit tests for connection scenarios

Unit tests:
* Add net_test_stack_rfcomm
* Use a compiler trick to compile production RFCOMM code against L2CAP
and BTM header, but fake L2CAP and BTM source code so that we can stub
statically defined L2CAP and BTM code using mocks
* Rename net_test_rfcomm to net_test_rfcomm_suite
* Add mocked L2CAP and BTM layer to allow packet replay from L2CAP layer
to RFCOMM layer in order to reproduce time dependent issues such as
connection collision
* Add a number of utility methods that generates RFCOMM packet bytes
using supported parameters
* Add unit test for above utility methods
* Add suite of unit tests named StackRfcommTest, including:
- SingleServerConnectionHelloWorld
- MultiServerPortSameDeviceHelloWorld
- SameServerPortMultiDeviceHelloWorld
- SingleClientConnectionHelloWorld
- SameClientPortMultiDeviceHelloWorld
* These tests supply L2CAP packets and API calls to trigger RFCOMM
connection setup in various scenarios
* Added logging method to output debug log via VLOG(1) logging level and
allow compile time configuration of these logs through a constant flag

Bug: 77224743
Test: ./test/run_unit_tests.sh net_test_stack_rfcomm
testplans/details/158641/3975
Change-Id: I9d59843603cd36394c3736670bcf3c39dea26674
Merged-In: I9d59843603cd36394c3736670bcf3c39dea26674
(cherry picked from commit 9b423ecfc85f22d355d9f10b347083f9d9bfe02d)
/system/bt/stack/test/common/stack_test_packet_utils.cc