tests: bluetooth: classic: Add test suite l2cap. #88703
Open
+1,754
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IUT works as a l2cap server with basic mode. The peer device, l2cap client with basic mode, is a PC with running
bumble
on it. This test only performs the function of L2CAP basic mode.Support multiple l2cap enerties in new shell l2cap_br, which may support more test function.
In the test suite, there are two groups in test cases.
Group 1 Including case1-case8 focuses on connection and disconnection around l2cap. The impact of active and passive acl connectivity, disconnectivity and authentication as well as disconnection from ACL without l2cap disconnect is tested.
Group2 Including case9-case14 revolves around the basic parameters of L2CAPserver configuration, data transfer.
Case 9: Test l2cap connection with max MTU(0xffff). But the max mtu which the stack supports is (CONFIG_BT_BUF_ACL_RX_SIZE - 4U = 196).
Case 10: Test l2cap connection with min MTU(0x30).
Case 11: Test l2cap connection with invaild PSM.
Case 12: Test l2cap multi_channel connection and data tranfer.
Case 13: Stress Test. Repeat l2cap connect, disconnect operation.
Case 14: Stress Test. Repeat data transfer operation in a single connection.
In Case 13 and 14, if enlarging STRESS_TEST_MAX_COUNT and test fail, you can enlarge timeout in testcase.yml.
test_l2cap_server.py is a file containing real test cases. test_l2cap_common.py is a common file. It encapsulates some test function functions that are commonly used for test cases.