From b965128f0f8fd78e471c4bcfd1eaccb2dfa87efe Mon Sep 17 00:00:00 2001 From: Pavel Vasilyev Date: Wed, 21 May 2025 10:10:31 +0200 Subject: [PATCH] tests: bsim: bluetooth: mesh: Run low latency adv tests with PSA This is a preparation commit for switching all bsim tests to PSA as TinyCrypt will be removed soon. Signed-off-by: Pavel Vasilyev --- tests/bsim/bluetooth/mesh/compile.sh | 3 +++ tests/bsim/bluetooth/mesh/src/test_suspend.c | 7 ++++++- .../tests_scripts/suspend/gatt_suspend_disable_resume.sh | 4 ++++ .../mesh/tests_scripts/suspend/gatt_suspend_resume.sh | 4 ++++ .../mesh/tests_scripts/suspend/suspend_disable_resume.sh | 4 ++++ .../bluetooth/mesh/tests_scripts/suspend/suspend_resume.sh | 4 ++++ 6 files changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/bsim/bluetooth/mesh/compile.sh b/tests/bsim/bluetooth/mesh/compile.sh index 3082c6beea5..89ce9b104e0 100755 --- a/tests/bsim/bluetooth/mesh/compile.sh +++ b/tests/bsim/bluetooth/mesh/compile.sh @@ -21,8 +21,11 @@ app=tests/bsim/bluetooth/mesh conf_overlay=overlay_multi_adv_sets.conf compile app=tests/bsim/bluetooth/mesh conf_overlay=overlay_lpn_scan_on.conf compile app=tests/bsim/bluetooth/mesh \ conf_overlay="overlay_pst.conf;overlay_ss.conf;overlay_psa.conf" compile +app=tests/bsim/bluetooth/mesh conf_overlay="overlay_psa.conf;overlay_low_lat.conf" compile app=tests/bsim/bluetooth/mesh conf_overlay="overlay_gatt.conf;overlay_psa.conf" compile app=tests/bsim/bluetooth/mesh conf_overlay="overlay_gatt.conf;overlay_workq_sys.conf" compile +app=tests/bsim/bluetooth/mesh \ + conf_overlay="overlay_gatt.conf;overlay_psa.conf;overlay_low_lat.conf" compile app=tests/bsim/bluetooth/mesh conf_overlay="overlay_low_lat.conf;overlay_psa.conf" compile app=tests/bsim/bluetooth/mesh conf_overlay="overlay_gatt.conf;overlay_low_lat.conf" compile app=tests/bsim/bluetooth/mesh conf_overlay="overlay_pst.conf;overlay_gatt.conf" compile diff --git a/tests/bsim/bluetooth/mesh/src/test_suspend.c b/tests/bsim/bluetooth/mesh/src/test_suspend.c index 7864a9e9c10..9170be90030 100644 --- a/tests/bsim/bluetooth/mesh/src/test_suspend.c +++ b/tests/bsim/bluetooth/mesh/src/test_suspend.c @@ -194,7 +194,7 @@ extern const struct bt_mesh_comp comp; * with a 100ms interval. */ static struct bt_mesh_test_gatt gatt_param = { -#if defined(CONFIG_BT_EXT_ADV) +#if !defined(CONFIG_BT_CTLR_LOW_LAT) /* (total transmit duration) / (transmit interval) */ .transmits = 1500 / 100, .interval = 100, @@ -449,6 +449,11 @@ static void test_tester_gatt(void) gatt_param.service = MESH_SERVICE_PROXY; ASSERT_OK(bt_mesh_test_wait_for_packet(gatt_scan_cb, &publish_sem, 10)); + /* Delay for low latency feature */ + #if defined(CONFIG_BT_CTLR_LOW_LAT) + k_sleep(K_MSEC(100)); + #endif + /* Allow DUT to suspend before scanning for gatt proxy beacons */ ASSERT_OK(bt_mesh_test_wait_for_packet(suspend_state_change_cb, &publish_sem, 20)); ASSERT_EQUAL(dut_status, DUT_SUSPENDED); diff --git a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_disable_resume.sh b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_disable_resume.sh index 711f92f4007..5bccc03f732 100755 --- a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_disable_resume.sh +++ b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_disable_resume.sh @@ -29,3 +29,7 @@ RunTest mesh_gatt_suspend_disable_resume_low_lat \ overlay="overlay_gatt_conf_overlay_psa_conf" RunTest mesh_gatt_suspend_disable_resume_psa \ suspend_dut_gatt_suspend_disable_resume suspend_tester_gatt + +overlay="overlay_gatt_conf_overlay_psa_conf_overlay_low_lat_conf" +RunTest mesh_gatt_suspend_disable_resume_psa_low_lat \ + suspend_dut_gatt_suspend_disable_resume suspend_tester_gatt diff --git a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_resume.sh b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_resume.sh index f0e4fb23502..f45f3ca145f 100755 --- a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_resume.sh +++ b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/gatt_suspend_resume.sh @@ -29,3 +29,7 @@ RunTest mesh_gatt_suspend_resume_low_lat \ overlay="overlay_gatt_conf_overlay_psa_conf" RunTest mesh_gatt_suspend_resume_psa \ suspend_dut_gatt_suspend_resume suspend_tester_gatt + +overlay="overlay_gatt_conf_overlay_psa_conf_overlay_low_lat_conf" +RunTest mesh_gatt_suspend_resume_psa_low_lat \ + suspend_dut_gatt_suspend_resume suspend_tester_gatt diff --git a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_disable_resume.sh b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_disable_resume.sh index bfe42e15c16..0c8c2582dba 100755 --- a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_disable_resume.sh +++ b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_disable_resume.sh @@ -26,3 +26,7 @@ RunTest mesh_suspend_disable_resume_low_lat \ overlay=overlay_psa_conf RunTest mesh_suspend_disable_resume_psa \ suspend_dut_suspend_disable_resume suspend_tester_pub + +overlay=overlay_psa_conf_overlay_low_lat_conf +RunTest mesh_suspend_disable_resume_psa_low_lat \ + suspend_dut_suspend_disable_resume suspend_tester_pub diff --git a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_resume.sh b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_resume.sh index 31d151201a8..b3e2f4369d0 100755 --- a/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_resume.sh +++ b/tests/bsim/bluetooth/mesh/tests_scripts/suspend/suspend_resume.sh @@ -25,3 +25,7 @@ RunTest mesh_suspend_resume_low_lat \ overlay=overlay_psa_conf RunTest mesh_suspend_resume_psa \ suspend_dut_suspend_resume suspend_tester_pub + +overlay="overlay_psa_conf_overlay_low_lat_conf" +RunTest mesh_suspend_resume_psa_low_lat \ + suspend_dut_suspend_resume suspend_tester_pub