Commit graph

2414 commits

Author SHA1 Message Date
Szymon Janc
d0b02cde2c tests: bluetooth: tester: Fix NULL pointer dereference in error path
bt_conn_unref() requires valid conn pointer but could be called with
NULL in case valid connection was not found in disconnect_eatt_chans().

Fixes #39851

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-29 10:12:55 -04:00
Yuval Peress
723bb46269 tests: BT: migrate connectionless tx to ztest register
Migrating the test suites to the register functionality allows the
main.c source to focus on the state of the system instead of "which"
test to run. In this example, test_main() now calls:
* ut_bt_setup() and updates the state
* common_create_adv_set(), updates the state, and notifies the
  registered tests that the state has been updated which would trigger
  a run.
* common_delete_adv_set(), updates the state, and again notifies
  the registered tests that the state has been updated.

Signed-off-by: Yuval Peress <peress@chromium.org>
2021-10-28 16:57:51 -04:00
Anas Nashif
59648f9001 tests: bluetooth: tester: reference autoPTS in README
Reference autoPTS documentation with more details on how to use this
test.

Fixes #1251

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-10-25 08:02:58 -04:00
Szymon Janc
349f9dfc71 tests: bluetooth: tester: Fix memory corruption in reconfigured_cb
Pass proper length when memsetting struct.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-25 12:23:14 +03:00
Jacob Siverskog
046f29a8cb Bluetooth: ATT: Fix typo in defines
Fix typo in ATT first/last attribute defines.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2021-10-23 20:39:36 -04:00
Ilhan Ates
69abe7de8c Bluetooth: tester: Add directed adv support
GAP/CONN/DCON/BV-01-C test case needs directed advertising
support.

Signed-off-by: Ilhan Ates <ilhan.ates@nordicsemi.no>
2021-10-22 16:38:13 +02:00
Szymon Janc
d7b37d8cc8 tests: bluetooth: tester: Increase ATT prepare write buffers count
GATT/SR/GAW/BV-10-C requires more buffers as it tests nested long
writes.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-22 16:37:38 +02:00
Szymon Janc
8a780680ad tests: bluetooth: tester: Add support for security_changed callback
This allows to track security levels and check for lost bond of peer
peripherals.

This was affecting GAP/SEC/AUT/BV-21-C qualification test.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-22 16:37:23 +02:00
Emil Gydesen
5c40c8005c Bluetooth: shell: Add audio infix for audio tests
Rename shell testcases from bluetooth.shell.*
to bluetooth.shell.audio.*

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-22 11:30:56 +02:00
Emil Gydesen
f49d69ee00 Bluetooth: shell: Move LE audio configuration to a new file
Move the LE audio configuration to a new audio.conf file
in the bluetooth shell project, similar to the mesh.conf
file.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-10-22 11:30:56 +02:00
Szymon Janc
17c01328b1 tests: bluetooth: tester: Add support for L2CAP channels options
This allows for better control over IUT behaviour by Upper Tester.

PTS and TS require inconsistent behaviour in terms of how IUT should
return credits. Some tests require return on explicit UT request and
some require that IUT returns credits autonomously.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-18 12:44:46 +02:00
Aleksandr Khromykh
bd925abead test: Bluetooth: Mesh: subscription tree of extended models
PR adds testing of subscription of the tree of extended models.
Extended models should share subscription list among them.

Signed-off-by: Aleksandr Khromykh <Aleksandr.Khromykh@nordicsemi.no>
2021-10-13 10:12:11 -04:00
Piotr Pryga
b61101144a tests: Bluetooth: bsim_test_iso: Change wait time in BIG receiver
The receiver and transmitter in the test are synchronized by
use of sleep functions. The change in handling of periodic
advertising synchronized event caused missmach in waiting
times. Receiver is notified about established synchronization
later that it was in the past. Due to that the wait for end
of transmitter operation was too long.

Temporary fix for the problem is decrease of receiver sleep
time by one periodic advertising interval.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-07 21:36:55 -04:00
Michał Narajowski
5d0f2fbc1d tests: bluetooth: tester: Adjust Segment Retransmit Count
In test cases MESH/NODE/TNPT/BV-04-C and MESH/NODE/TNPT/BI-01-C
the PTS is sending incomplete Seg Ack 3 times and in some cases we run
out of retransmit attempts before PTS sends complete Seg Ack. As a
workaround, increase Segment Retransmit Count to improve stability of
these tests.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-10-07 15:45:22 -04:00
Michał Narajowski
4cb935f264 tests: bluetooth: tester: Set Config Client timeout to larger value
In some scenarios when there is a need for multiple re-transmissions of
segmented messages the default value of 2 seconds may be not enough.

In my experience this improves stability of Configuration Client tests
involving multiple PTS instances.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-10-06 22:20:22 -04:00
Vinayak Kariappa Chettimada
4f04f3d979 tests: Bluetooth: mesh: Remove explicit disable of CSA#2
Remove explicit disable of Channel Selection Algorithm #2
in the mesh tests that use Extended Advertising.

Fixes #39188.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-06 11:36:12 -05:00
Anders Storrø
4e15da8332 bsim: test: Add test for heartbeat sub API
Adds test for verifying correct behaviour for heartbeat subscription
API.

Signed-off-by: Anders Storrø <anders.storro@nordicsemi.no>
2021-10-05 19:23:18 -04:00
Szymon Janc
ab6c090d74 tests: bluetooth: tester: Add support for L2CAP channel reconfiguration
This allows UT to reconfigure MTU of a channel and get notfied when
channel configuration changed.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-10-04 11:05:03 +02:00
Vinayak Kariappa Chettimada
ac1e99f0e5 tests: Bluetooth: bsim: Updated advx tests with periodic adv list
Updated the bsim_bt_advx test with use of periodic
advertiser list.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-01 21:48:51 +02:00
Vinayak Kariappa Chettimada
bf01d55107 Bluetooth: Controller: Implement Periodic Advertiser List
Implement support for Periodic Advertiser List to be used
in LE Periodic Advertising Create Sync command.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-10-01 21:48:51 +02:00
Piotr Pryga
982743b765 tests: Bluetooth: df: Add test to verify correctness of relase of PDUs
Add unit tests that will ensure the CTE disable operation does not
cause breaking of LLL operations by too early release of chained PDUs.
The tests verify if numbers of PDUs in free PDUs fifo and free PDUs
memory pool are correct.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-10-01 14:32:49 -04:00
Szymon Janc
6cfc6fa8e1 tests: bluetooth: tester: Add support for L2CAP Credits command
This allows IUT to return credits on specified L2CAP channel when
requested by Upper Tester.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-09-30 08:28:34 -04:00
Vinayak Kariappa Chettimada
273cf4687b tests: Bluetooth: bsim: Use separate DUT and TST EDTT builds
Use separate DUT and TST builds in EDTT HCI tests so that
the tester can send Data Length Requests with txOctets and
maxTxTime as required by the test specification. TST build
has HCI parameter checks disabled.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-09-30 11:47:57 +02:00
Aleksandr Khromykh
5130db3005 test: Bluetooth: Mesh: OOB public key provisioning
PR includes test that combines and checks OOB public key
provisioning with all possible OOB authentications
and OOB public key provisioning without auithentication.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2021-09-29 15:34:13 -04:00
Aleksandr Khromykh
68d8a263b6 test: Bluetooth: Mesh: add provisioning with OOB auth tests
BubbleSim tests that check provisioning with all possible (from spec)
OOB authentications

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2021-09-28 19:54:00 -04:00
Aleksandr Khromykh
009ecdfda0 test: Bluetooth: Mesh: clean up warnings in Mesh scanner test
Clean up warnings in the BubbleSim Mesh scanner test.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2021-09-28 19:54:00 -04:00
Agata Ponitka
bd8b9ee830 Bluetooth: Tester: Add the OOB Authentication method
Adding support for automatic testing OOB Authentication method.

Signed-off-by: Agata Ponitka <agata.ponitka@codecoup.pl>
2021-09-28 11:44:33 +02:00
Aleksandr Khromykh
0a40c69b21 bsim: test: fix missing of warnings in bsim tests build system
bsim test build system hides compile warnings.
This commit adds extra cc flags to prevent this.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2021-09-22 09:15:03 -04:00
Carles Cufi
947b38ac0a Bluetooth: controller: Replace slave with peripheral
Replace the old slave term with the new peripheral
one from the Bluetooth spec v5.3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-21 13:01:29 +02:00
Carles Cufi
76bf881e42 Bluetooth: controller: Replace whitelist with FAL
Replace the old whitelist-related terms with the new filter accept list
one from the Bluetooth spec v5.3.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-21 13:01:29 +02:00
Carles Cufi
e2f85b1124 Bluetooth: tests: Align with terms in v5.3 spec
Align with the new inclusive naming terms in the v5.3 spec in the
Bluetooth tests.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-20 20:01:32 +02:00
Ludvig Samuelsen Jordet
cf3f219441 Bluetooth: Mesh: Test reprovisioning
This adds tests for config client reset and reprovisioning of a node.

Signed-off-by: Ludvig Samuelsen Jordet <ludvig.jordet@nordicsemi.no>
2021-09-16 13:25:46 -04:00
Szymon Janc
24007fb2ad tests: bluetooth: tester: Fix build with EATT disabled
For ECFC L2CAP test we user overlay with disabled EATT and
bt_eatt_disconnect_one() is available only with EATT enabled.

Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2021-09-15 16:58:06 +02:00
Carles Cufi
6de4747979 Bluetooth: Update terms in public API to spec v5.3
The Bluetooth Core Specification, version 5.3, has introduced multiple
changes to several widely-used terms in order to make them inclusive.
Update the public API to reflect this, excluding hci.h, which will be
done in a subsequent commit.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2021-09-15 14:02:50 +03:00
Krzysztof Kopyściński
fa2f83bf8b Bluetooth: host: add testing API (disconnect one EATT channel)
To test fallback to remaining bearers PTS might request IUT to
disconnect one of the connected EATT channels, while the others remain
intact. Test function must be added, because we cannot create L2CAP
server on EATT PSM and manage this server as normal and have EATT
enabled at same time.

This is affecting GATT/SR/GAW/BV-14-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-09-09 10:30:31 +02:00
Krzysztof Kopyściński
7a687b8a5d Tests: bluetooth: tester: accomodate L2CAP connect commant to BTP change
BTP change extended L2CAP_CONNECT command by ECFC flag, which determines
which connection procedure is used (non-enhanced or ecred). Now, only
this flag determines the procedure used, not number of requested
channels.

This was affecting L2CAP/ECFC/BV-25-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-09-09 10:28:10 +02:00
Emil Gydesen
eaf6cf745d Bluetooth: Audio: Fix vcs_client_test duplicate conn_callbacks
The conn_callbacks was duplicated in the file, due to a missing
delete when BT_CONN_CB_DEFINE was introduced.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-09-07 09:56:35 +02:00
Krzysztof Kopyściński
bd068e475d Tests: bluetooth: tester: find connection for get_attr_val_rp
To check security of connection  in read_value() we need to actually
pass connection not NULL.

This is affecting GATT/SR/GAR/BI-11-C

Signed-off-by: Krzysztof Kopyściński <krzysztof.kopyscinski@codecoup.pl>
2021-09-06 09:23:06 -04:00
Piotr Pryga
4e43295d22 tests: Bluetooth: df: fix compilation error in per adv chain tests
There was a change in parameters list of function ull_adv_sync_pdu_-
alloc. There was a call in commmon.c file in connectionless_cte_chains
unit tests with use of former parameters list. That caused a compilation
error.

The commit fixes the compilation issue.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-09-04 10:54:36 -04:00
Trond Einar Snekvik
2435419416 tests: bluetooth: mesh: Remove dead code
Removes all the dead ternary expressions in the mesh bluetooth tester.

Fixes #37983.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2021-08-31 11:03:06 -04:00
Michał Narajowski
a614fc02ad Bluetooth: tester: Configure L2CAP Connection Response
Some test cases require the IUT to respond with a certain error. To get
the stack to return this error to PTS the application needs to be
configured specifically for this test case.

Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl>
2021-08-30 14:40:59 +02:00
Emil Gydesen
f0e1823846 Bluetooth: bsim: Update bsim_test_iso to use defined broadcast code size
Use the #define for the broadcast code.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-27 09:34:43 -04:00
Vinayak Kariappa Chettimada
3f14c4602c tests: Bluetooth: bsim: Include Periodic Adv Chan Map Update Indication
Include Periodic Advertising Channel Map Update Indication
in the BabbleSim test.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-27 09:34:16 -04:00
Pavel Vasilyev
cd294c12c3 tests: Bluetooth: Mesh: Verify that all stored mesh entries removed
This ensures that all mesh settings were removed from persistent storage
after node reset.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-08-26 14:04:38 -04:00
Pavel Vasilyev
f82086fff5 tests: Bluetooth: Mesh: Use meaningful names in persistent test cfg
This should improve code readability.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-08-26 14:04:38 -04:00
Pavel Vasilyev
7ffefccc4f tests: Bluetooth: Mesh: Test node reprovisioning with persistent storage
This commit adds a test checking that a node removes all data from
persistent storage after being unprovisioned.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-08-26 14:04:38 -04:00
Pavel Vasilyev
79af744dc1 tests: Bluetooth: Mesh: Make mesh initialization function generic
This commit makes this small piece of code reusable in other tests.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-08-26 14:04:38 -04:00
Emil Gydesen
f79b39c104 Bluetooth: shell: Remove accidentally added debug config
Remove two debug config values from the BT shell that
was accidentally merged.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-26 13:42:22 -04:00
Emil Gydesen
51f2022f7b Bluetooth: Audio: Add initial server values in bt_vcs_register_param
Add support for setting initial values in bt_vcs_register_param
when registering a VCS service

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-26 09:13:58 -04:00
Vinayak Kariappa Chettimada
6c9a54c533 tests: Bluetooth: bsim: Minor re-arrange Kconfig in prj file
Re-arrange Host Kconfigs to group about Controller Kconfigs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-24 07:33:48 -04:00