aboutsummaryrefslogtreecommitdiff
path: root/system/stack/test/common/stack_test_packet_utils.h
Commit message (Collapse)AuthorAgeFilesLines
* legacy: Re-include stack/test mocksChris Manton2021-09-031-0/+1
| | | | | | | | Bug: 197478351 Tag: #refactor Test: gd/cert/run Change-Id: Iea02f349f09d343902a0e9bbe36f835e40519d11
* legacy: Un-include unnecessary stack/include/bt_typesChris Manton2021-08-271-1/+1
| | | | | | | | Bug: 197478351 Tag: #refactor Test: gd/cert/run Change-Id: I0d86908c31ff1fc3e3dd8824ccad15d3aee5b6e6
* RFCOMM: Add unit tests for connection scenariosJack He2018-04-241-0/+78
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