Skip to content

Commit 9cb00be

Browse files
PavelVPVkartben
authored andcommitted
tests: bsim: bluetooth: mesh: Remove bsim tests with TinyCrypt
As TinyCrypt gets deprecated, we need to remove all bsim tests that use it. This commit switches all Bluetooth mesh bsim tests to PSA as a default crypto backend. This includes: - removing `CONFIG_BT_MESH_USES_TINYCRYPT` as PSA is default crypto backend for mesh. `CONFIG_BT_MESH_USES_MBEDTLS_PSA` is not required to be enabled; - merging `overlay_psa.conf` into `prj.conf` as this configuration becomes default for all mesh bsim tests; - merging `overlay_ss.conf` into `overlay_pst.conf` as secure storage is required for running persistent storage bsim tests with PSA; Signed-off-by: Pavel Vasilyev <[email protected]>
1 parent b965128 commit 9cb00be

File tree

164 files changed

+15
-910
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+15
-910
lines changed

tests/bsim/bluetooth/mesh/compile.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,14 @@ app=tests/bsim/bluetooth/mesh conf_overlay=overlay_pst.conf compile
1515
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_gatt.conf compile
1616
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_gatt_separate.conf compile
1717
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_low_lat.conf compile
18-
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_psa.conf compile
1918
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_workq_sys.conf compile
2019
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_multi_adv_sets.conf compile
2120
app=tests/bsim/bluetooth/mesh conf_overlay=overlay_lpn_scan_on.conf compile
22-
app=tests/bsim/bluetooth/mesh \
23-
conf_overlay="overlay_pst.conf;overlay_ss.conf;overlay_psa.conf" compile
24-
app=tests/bsim/bluetooth/mesh conf_overlay="overlay_psa.conf;overlay_low_lat.conf" compile
25-
app=tests/bsim/bluetooth/mesh conf_overlay="overlay_gatt.conf;overlay_psa.conf" compile
2621
app=tests/bsim/bluetooth/mesh conf_overlay="overlay_gatt.conf;overlay_workq_sys.conf" compile
27-
app=tests/bsim/bluetooth/mesh \
28-
conf_overlay="overlay_gatt.conf;overlay_psa.conf;overlay_low_lat.conf" compile
29-
app=tests/bsim/bluetooth/mesh conf_overlay="overlay_low_lat.conf;overlay_psa.conf" compile
3022
app=tests/bsim/bluetooth/mesh conf_overlay="overlay_gatt.conf;overlay_low_lat.conf" compile
3123
app=tests/bsim/bluetooth/mesh conf_overlay="overlay_pst.conf;overlay_gatt.conf" compile
3224
app=tests/bsim/bluetooth/mesh \
3325
conf_overlay="overlay_gatt.conf;overlay_multi_adv_sets.conf" compile
34-
app=tests/bsim/bluetooth/mesh \
35-
conf_overlay="overlay_pst.conf;overlay_ss.conf;overlay_gatt.conf;overlay_psa.conf" compile
3626
app=tests/bsim/bluetooth/mesh \
3727
conf_overlay="overlay_pst.conf;overlay_gatt.conf;overlay_workq_sys.conf" compile
3828
wait_for_background_jobs

tests/bsim/bluetooth/mesh/overlay_psa.conf

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/bsim/bluetooth/mesh/overlay_pst.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ CONFIG_BT_MESH_SEQ_STORE_RATE=1
1515
CONFIG_BT_MESH_RPL_STORE_TIMEOUT=1
1616
CONFIG_BT_MESH_STORE_TIMEOUT=1
1717
CONFIG_BT_MESH_COMP_PST_BUF_SIZE=600
18+
19+
# Required for PSA
20+
CONFIG_SECURE_STORAGE=y

tests/bsim/bluetooth/mesh/overlay_ss.conf

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/bsim/bluetooth/mesh/prj.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,5 @@ CONFIG_BT_TESTING=y
7474
# Needed for RPR tests due to huge amount of retransmitted messages
7575
CONFIG_BT_MESH_MSG_CACHE_SIZE=64
7676

77-
# Enable tinycrypt as a crypto backend
78-
CONFIG_BT_MESH_USES_TINYCRYPT=y
77+
# Increase the number of key slots in PSA Crypto core
78+
CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT=64

tests/bsim/bluetooth/mesh/src/test_provision.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,7 @@
1313
#include <bs_pc_backchannel.h>
1414
#include <time_machine.h>
1515

16-
#if defined CONFIG_BT_MESH_USES_MBEDTLS_PSA
1716
#include <psa/crypto.h>
18-
#elif defined CONFIG_BT_MESH_USES_TINYCRYPT
19-
#include <tinycrypt/constants.h>
20-
#include <tinycrypt/ecc.h>
21-
#include <tinycrypt/ecc_dh.h>
22-
#else
23-
#error "Unknown crypto library has been chosen"
24-
#endif
2517

2618
#include <zephyr/sys/byteorder.h>
2719

@@ -527,7 +519,6 @@ static void oob_auth_set(int test_step)
527519
prov.input_actions = oob_auth_test_vector[test_step].input_actions;
528520
}
529521

530-
#if defined CONFIG_BT_MESH_USES_MBEDTLS_PSA
531522
static void generate_oob_key_pair(void)
532523
{
533524
psa_key_attributes_t key_attributes = PSA_KEY_ATTRIBUTES_INIT;
@@ -562,12 +553,6 @@ static void generate_oob_key_pair(void)
562553

563554
memcpy(public_key_be, public_key_repr + 1, 64);
564555
}
565-
#elif defined CONFIG_BT_MESH_USES_TINYCRYPT
566-
static void generate_oob_key_pair(void)
567-
{
568-
ASSERT_TRUE(uECC_make_key(public_key_be, private_key_be, uECC_secp256r1()));
569-
}
570-
#endif
571556

572557
static void oob_device(bool use_oob_pk)
573558
{

tests/bsim/bluetooth/mesh/tests_scripts/access/access_cancel.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
66

77
RunTest mesh_access_publication_cancel \
88
access_tx_cancel access_rx_cancel
9-
10-
overlay=overlay_psa_conf
11-
RunTest mesh_access_publication_cancel_psa \
12-
access_tx_cancel access_rx_cancel

tests/bsim/bluetooth/mesh/tests_scripts/access/access_ext_sub.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
66

77
RunTest mesh_access_extended_model_subs \
88
access_tx_ext_model access_sub_ext_model
9-
10-
overlay=overlay_psa_conf
11-
RunTest mesh_access_extended_model_subs_psa \
12-
access_tx_ext_model access_sub_ext_model

tests/bsim/bluetooth/mesh/tests_scripts/access/access_ext_sub_cap.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,3 @@
55
source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
66

77
RunTest mesh_access_extended_model_subs_cap access_sub_capacity_ext_model
8-
9-
overlay=overlay_psa_conf
10-
RunTest mesh_access_extended_model_subs_cap_psa access_sub_capacity_ext_model

tests/bsim/bluetooth/mesh/tests_scripts/access/access_period.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,3 @@ source $(dirname "${BASH_SOURCE[0]}")/../../_mesh_test.sh
66

77
RunTest mesh_access_per_pub \
88
access_tx_period access_rx_period
9-
10-
overlay=overlay_psa_conf
11-
RunTest mesh_access_per_pub_psa \
12-
access_tx_period access_rx_period

0 commit comments

Comments
 (0)