Commit graph

734 commits

Author SHA1 Message Date
Emil Gydesen
f30b46fc7b tests: Bluetooth: MCC: Add invalid testing of test_read_icon_obj_id
Add invalid testing of test_read_icon_obj_id.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
25b2e99213 tests: Bluetooth: MCC: Add invalid testing of bt_mcc_read_player_name
Add invalid testing of bt_mcc_read_player_name.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
6426a02c37 tests: Bluetooth: MCC: Add invalid testing of bt_mcc_discover_mcs
Add invalid testing of bt_mcc_discover_mcs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
9cfdd53082 tests: Bluetooth: MCC: Add invalid testing of bt_mcc_send_search
Add invalid testing of bt_mcc_send_search.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
dfe324be9c tests: Bluetooth: MCC: Add invalid testing of bt_mcc_send_cmd
Add invalid testing of bt_mcc_send_cmd.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
9dea871a7a tests: Bluetooth: MCC: Add invalid testing of bt_mcc_read_opcodes_supported
Add invalid testing of bt_mcc_read_opcodes_supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
24b3122d6a tests: Bluetooth: MCC: Add invalid testing of otc_read_object_metadata
Add invalid testing of bt_mcc_otc_read_object_metadata.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
fb89097347 tests: Bluetooth: MCC: Add invalid testing of bt_ots_client_select_id
Add invalid testing of bt_ots_client_select_id which is used by
the MCC.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
41ea39be55 tests: Bluetooth: Refactor MCC tests
Move all the test steps into smaller functions for
added readability and reusability. This will basically
group each procedure, making it easier to follow the
main test.

None of the test have been functionally changed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
0f553b5570 tests: Bluetooth: BSIM: Add MCC read supported opcodes
The supported opcodes were not previously read, so it
was added to cover it.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Emil Gydesen
da8cac0d2c tests: Bluetooth: BSIM: MCC reorder callbacks
Reorder the callbacks so that they match the order in the
struct.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-04-07 11:29:54 +02:00
Alberto Escolar Piedras
f8d747f85c bsim tests: run_parallel: Allow providing tests explicitly
Add the options to provide a file with a list of tests
to run with a possible TESTS_FILE variable,
or to provide the actual list of tests directly
in TESTS_LIST.

If a file is provided, comments (#) and empty lines will be
skipped.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-05 16:46:11 +02:00
Alberto Escolar Piedras
03db441d3d tests bsim: Remove unnecessary BT_TINYCRYPT_ECC selection
There is no need to select BT_TINYCRYPT_ECC as it will
be selected by default if the controller does not
provide BT_CTLR_ECDH[_SUPPORT].
But setting it in the prj.conf will break
for controllers that provide it,
as both host and controller will provide the same APIs.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-03 09:50:30 +02:00
Alberto Escolar Piedras
271fea3386 tests bsim: Remove unnecessary controller selection
There is only one controller in upstream Zephyr,
there is no need to explicitly select it, as it
will default to it.
But selecting it prevents other controllers from being
used downstream or with other targets => remove it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-04-03 09:50:30 +02:00
Szymon Czapracki
89751f31c9 tests: bluetooth: Expand TBS testing
Add more server side tests
Add more client side tests

Signed-off-by: Szymon Czapracki <szymon.czapracki@codecoup.pl>
2023-03-29 15:52:32 +00:00
Szymon Janc
6b12ad91d2 tests/bsim: Disable some broken EDTT GATT tests
Disable tests that are failing due to invalid test implementation.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2023-03-28 16:15:58 +00:00
Aleksandr Khromykh
5ed6245f84 tests: Bluetooth: Mesh: bsim to check parallel work in remote provisioning
The commit adds bsim test to check ability to handle proviosioning
and scanning in parallel in remote provisioning models.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-03-27 13:20:33 +00:00
Alberto Escolar Piedras
b6c6de386c tests bsim/net: Add simple echo test over OpenThread
Expand the tests/bsim/net/sockets/echo_test
with a variant using OpenThread

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Alberto Escolar Piedras
fc3d8a83aa tests bsim/net: Add simple echo test over 802.15.4
Add a simple selfchecking test for the 15.4 stack,
based on the echo client / server sample apps.
It relies on the bs_tests hooks to register a test timer
callback, which after a deadline will check how many
packets the echo client has got back as expected, and if
over a threshold considers the test passed.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 14:09:03 +01:00
Alberto Escolar Piedras
147aada0b5 tests controller permute build: Move to ll folder
This is a controller test.
Let's move it to the controller folder.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-22 06:54:00 -04:00
Magdalena Kasenberg
57784df5f0 LE Audio: Refactor server ASE callbacks to return rsp object
From now app layer is able to return explicit response code and
reason that will appear in ASE Control Point notification.

Fixes issues of ASCS/SR/SPE/BI-(07/08/09)-C PTS test cases, where
PTS was receiving wrong response codes and reasons.

Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-03-22 11:38:37 +01:00
Andries Kruithof
05e78fa128 Tests: bsim: update permutations compilation script
The script that compiles different permutations of Kconfig
settings for the control procedures must build each
permutation in sequence. The current implementation of the
compile-script starts each build in the background.

This PR fixes that so that each build now is run sequentially.

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2023-03-22 09:34:13 +01:00
Alberto Escolar Piedras
a20046b5b0 tests/bsim compile: Do not provide prj conf if default
Do not provide the defautl prj.conf to cmake, as that
causes it to not use the board overlays, which is not
what users would normally expect.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-21 14:59:09 +01:00
Alberto Escolar Piedras
40f0ea9f74 tests/bsim compile: Add support for multiple conf files
And configuration files with paths, quotes, etc.
Now it is possible to do, for example
conf_file='myprj.conf;boards/board_name.conf'
to provide both a project configuration and an overlay

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-21 14:59:09 +01:00
Alberto Escolar Piedras
ef6c91411c tests bsim bap_unicast_audio: Avoid randomness failure
The current seed causes a failure with the updated HW models
due to a change in the random draw, that happens to unluckily
cause the test to fail.
Avoide it with a different random seed.
This is due to a known issue in the controller, which is
being worked on by the maintainer.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-21 14:09:55 +01:00
Théo Battrel
acfe688c4e Bluetooth: Tests: Encrypted Advertising Data test
Add a new BabbleSim test that use the sample data from the Supplement to
the Bluetooth Core Specification to validate the Encrypted Advertising
Data feature implementation.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-03-21 13:39:09 +02:00
Emil Gydesen
fe03560989 Tests: Bluetooth: Add unicast stop to CAP tests
Add test of the unicast stop procedure for the CAP
initiator.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-21 09:35:05 +01:00
Emil Gydesen
e1356612a9 Tests: Bluetooth: Add CAP unicast update test
Add test to run the CAP initiator unicast update API.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-21 09:35:05 +01:00
Emil Gydesen
e4d0725112 tests: Bluetooth: Audio: Add CAP unicast start BSIM test
The test only works partially until the controller and
babblesim supports ISO, as it needs that in order to
perform the unicast start procedure.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-03-21 09:35:05 +01:00
Alberto Escolar Piedras
6b4b0d4ca6 tests/bsim: Correct default build path
The default build path was the old one in some scripts and
READMEs. Correct it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-21 09:33:57 +01:00
Alberto Escolar Piedras
add1397e4a tests/bsim/bluetooth: Tests scripts refactor
Move common parts to common scripts,
and clean up some unnecessary content.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-21 09:33:57 +01:00
Alberto Escolar Piedras
f2d9b74da1 tests bsim: Move common scripts one level up
These scripts are common for bluetooth and other tests
Let's move them one level up.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-20 14:02:50 +00:00
Krzysztof Kopyściński
018bdf5022 tests: Bluetooth: Mesh: Test DFU Server update phase and img recovery
This adds BSim tests for DFU Server, where Firmware Distribution
procedure is stopped at given point. DFU Server is expected to save
phase and image index in persistent storage. Then new test is executed
that simulates reboot of device. Settings file is not cleared and after
setup device is expected to restore its DFU Server with correct phase
and idx.

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2023-03-20 13:38:40 +01:00
Alberto Escolar Piedras
f27c0b4905 tests bsim: Change folder structure
Bsim won't be limited anymore to BT tests.
In preparation for adding more tests in network areas
swap the tests/bluetooth/bsim with tests/bsim/bluetooth

There is no other changes in this commit beyond that.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-03-17 19:59:50 +01:00