-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Bluetooth: BAP: Add test to test invalid bcode
Add a babblesim test for testing the behavior when providing an invalid broadcast code as the broadcast sink. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Loading branch information
Showing
3 changed files
with
110 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/bsim/bluetooth/audio/test_scripts/bap_broadcast_audio_encrypted_incorrect_code.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2021-2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
VERBOSITY_LEVEL=2 | ||
EXECUTE_TIMEOUT=100 | ||
|
||
source ${ZEPHYR_BASE}/tests/bsim/sh_common.source | ||
|
||
cd ${BSIM_OUT_PATH}/bin | ||
|
||
printf "\n\n======== Broadcaster encrypted incorrect code test =========\n\n" | ||
|
||
SIMULATION_ID="broadcaster_encrypted_incorrect_code" | ||
|
||
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \ | ||
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -testid=broadcast_source_encrypted \ | ||
-RealEncryption=1 -rs=23 -D=2 | ||
|
||
|
||
Execute ./bs_${BOARD_TS}_tests_bsim_bluetooth_audio_prj_conf \ | ||
-v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -testid=broadcast_sink_encrypted_incorrect_code \ | ||
-RealEncryption=1 -rs=27 -D=2 | ||
|
||
# Simulation time should be larger than the WAIT_TIME in common.h | ||
Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} \ | ||
-D=2 -sim_length=60e6 $@ | ||
|
||
wait_for_background_jobs |