Skip to content

Commit f117839

Browse files
aescolarPavelVPV
authored andcommitted
[nrf fromtree] tests/bsim/bluetooth/host/security: Enable RealEncryption
Let's run tests with security/privacy with the HW models acutually running the encryptions, so in case of missaligned keys tests fail. Signed-off-by: Alberto Escolar Piedras <[email protected]> (cherry picked from commit 9182a7e)
1 parent baae033 commit f117839

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ cd ${BSIM_OUT_PATH}/bin
1414
if [ "${1}" != 'debug0' ]; then
1515
Execute "./${test_exe}" \
1616
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \
17-
-flash="${simulation_id}_client.log.bin" -flash_rm
17+
-flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1
1818
fi
1919

2020
if [ "${1}" != 'debug1' ]; then
2121
Execute "./${test_exe}" \
2222
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \
23-
-flash="${simulation_id}_bad_client.log.bin" -flash_rm
23+
-flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1
2424
fi
2525

2626
if [ "${1}" != 'debug2' ]; then
2727
Execute "./${test_exe}" \
2828
-v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \
29-
-flash="${simulation_id}_server.log.bin" -flash_rm
29+
-flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1
3030
fi
3131

3232
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
@@ -35,19 +35,19 @@ Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
3535
if [ "${1}" == 'debug0' ]; then
3636
gdb --args "./${test_exe}" \
3737
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \
38-
-flash="${simulation_id}_client.log.bin" -flash_rm
38+
-flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1
3939
fi
4040

4141
if [ "${1}" == 'debug1' ]; then
4242
gdb --args "./${test_exe}" \
4343
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \
44-
-flash="${simulation_id}_bad_client.log.bin" -flash_rm
44+
-flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1
4545
fi
4646

4747
if [ "${1}" == 'debug2' ]; then
4848
gdb --args "./${test_exe}" \
4949
-v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \
50-
-flash="${simulation_id}_server.log.bin" -flash_rm
50+
-flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1
5151
fi
5252

5353
wait_for_background_jobs

tests/bsim/bluetooth/host/security/ccc_update/test_scripts/ccc_update_2.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ cd ${BSIM_OUT_PATH}/bin
1414
if [ "${1}" != 'debug0' ]; then
1515
Execute "./${test_exe}" \
1616
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \
17-
-flash="${simulation_id}_client.log.bin" -flash_rm
17+
-flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1
1818
fi
1919

2020
if [ "${1}" != 'debug1' ]; then
2121
Execute "./${test_exe}" \
2222
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \
23-
-flash="${simulation_id}_bad_client.log.bin" -flash_rm
23+
-flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1
2424
fi
2525

2626
if [ "${1}" != 'debug2' ]; then
2727
Execute "./${test_exe}" \
2828
-v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \
29-
-flash="${simulation_id}_server.log.bin" -flash_rm
29+
-flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1
3030
fi
3131

3232
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
@@ -35,19 +35,19 @@ Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
3535
if [ "${1}" == 'debug0' ]; then
3636
gdb --args "./${test_exe}" \
3737
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \
38-
-flash="${simulation_id}_client.log.bin" -flash_rm
38+
-flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1
3939
fi
4040

4141
if [ "${1}" == 'debug1' ]; then
4242
gdb --args "./${test_exe}" \
4343
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=bad_central \
44-
-flash="${simulation_id}_bad_client.log.bin" -flash_rm
44+
-flash="${simulation_id}_bad_client.log.bin" -flash_rm -RealEncryption=1
4545
fi
4646

4747
if [ "${1}" == 'debug2' ]; then
4848
gdb --args "./${test_exe}" \
4949
-v=${verbosity_level} -s=${simulation_id} -d=2 -testid=peripheral \
50-
-flash="${simulation_id}_server.log.bin" -flash_rm
50+
-flash="${simulation_id}_server.log.bin" -flash_rm -RealEncryption=1
5151
fi
5252

5353
wait_for_background_jobs

tests/bsim/bluetooth/host/security/security_changed_callback/test_scripts/security_changed_callback.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ verbosity_level=2
1212
cd ${BSIM_OUT_PATH}/bin
1313

1414
Execute "./${test_exe}" \
15-
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central
15+
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1
1616

1717
Execute "./${test_exe}" \
18-
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_disconnect_in_sec_cb
18+
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_disconnect_in_sec_cb \
19+
-RealEncryption=1
1920

2021
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
2122
-D=2 -sim_length=60e6
2223

2324
wait_for_background_jobs
2425

2526
Execute "./${test_exe}" \
26-
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central
27+
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central -RealEncryption=1
2728

2829
Execute "./${test_exe}" \
29-
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_unpair_in_sec_cb
30+
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_unpair_in_sec_cb \
31+
-RealEncryption=1
3032

3133
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s=${simulation_id} \
3234
-D=2 -sim_length=60e6

0 commit comments

Comments
 (0)