Skip to content

Commit

Permalink
tests/bsim/bluetooth/host/security: Enable RealEncryption
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
aescolar committed Sep 17, 2024
1 parent c886ced commit 5806e37
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ cd ${BSIM_OUT_PATH}/bin
if [ "${1}" != 'debug0' ]; then
Execute "./${test_exe}" \
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \
-flash="${simulation_id}_client.log.bin" -flash_rm
-flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1
fi

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

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

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

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

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

wait_for_background_jobs
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ cd ${BSIM_OUT_PATH}/bin
if [ "${1}" != 'debug0' ]; then
Execute "./${test_exe}" \
-v=${verbosity_level} -s=${simulation_id} -d=0 -testid=central \
-flash="${simulation_id}_client.log.bin" -flash_rm
-flash="${simulation_id}_client.log.bin" -flash_rm -RealEncryption=1
fi

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

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

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

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

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

wait_for_background_jobs
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ verbosity_level=2
cd ${BSIM_OUT_PATH}/bin

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

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

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

wait_for_background_jobs

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

Execute "./${test_exe}" \
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_unpair_in_sec_cb
-v=${verbosity_level} -s=${simulation_id} -d=1 -testid=peripheral_unpair_in_sec_cb \
-RealEncryption=1

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

0 comments on commit 5806e37

Please sign in to comment.