Skip to content

tests: Bluetooth: Add BT Tester GAP smoke test #86146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

Thalley
Copy link
Collaborator

@Thalley Thalley commented Feb 21, 2025

Add a babblesim test of the BT Tester doing a GAP smoke test connecting 2 BT testers using BTP.

The purpose of this is to further increase the test coverage of the BT Tester in CI, as it is only being built, and runtime errors are typically not caught.

fixes #86058

@Thalley Thalley force-pushed the bttester_bsim branch 5 times, most recently from 78d85c5 to 65746a7 Compare February 28, 2025 14:25
@Thalley Thalley force-pushed the bttester_bsim branch 3 times, most recently from 3bdaa4a to f55cd0b Compare March 3, 2025 12:27
@@ -87,6 +87,8 @@

#define BTP_STATUS_VAL(err) (err) ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS

#define BTP_EVENT_OPCODE 0x80
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 55 to 57
static inline void btp_gap_start_advertising(uint8_t adv_data_len, uint8_t scan_rsp_len,
const uint8_t adv_sr_data[], uint32_t duration,
uint8_t own_addr_type)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reviewers: Should we define btp_gap.h and others, rather than a single large btp.h file? For now it's assumed that it's going to be a fairly limited amount of commands and events, and not the entire BTP

@Thalley Thalley force-pushed the bttester_bsim branch 4 times, most recently from 56306a6 to fc00295 Compare March 3, 2025 21:37
@Thalley Thalley marked this pull request as ready for review March 4, 2025 09:53
@zephyrbot zephyrbot added area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth platform: nRF BSIM Nordic Semiconductors, nRF BabbleSim labels Mar 4, 2025
@Thalley Thalley requested review from jhedberg and aescolar March 13, 2025 11:44
@Thalley Thalley force-pushed the bttester_bsim branch 2 times, most recently from 8ea0378 to aced5a6 Compare March 17, 2025 09:10
jhedberg
jhedberg previously approved these changes Mar 24, 2025
@Thalley
Copy link
Collaborator Author

Thalley commented Mar 24, 2025

Fixed build error

@Thalley Thalley force-pushed the bttester_bsim branch 2 times, most recently from 53c0d9a to 12fba65 Compare April 1, 2025 09:16
@Thalley Thalley requested a review from Copilot April 7, 2025 08:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 9 out of 22 changed files in this pull request and generated no comments.

Files not reviewed (13)
  • tests/bluetooth/tester/Kconfig.sysbuild: Language not supported
  • tests/bluetooth/tester/boards/nrf52_bsim.conf: Language not supported
  • tests/bluetooth/tester/boards/nrf52_bsim.overlay: Language not supported
  • tests/bluetooth/tester/boards/nrf5340bsim_nrf5340_cpuapp.conf: Language not supported
  • tests/bluetooth/tester/boards/nrf5340bsim_nrf5340_cpuapp.overlay: Language not supported
  • tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh: Language not supported
  • tests/bsim/bluetooth/compile.sh: Language not supported
  • tests/bsim/bluetooth/tester/CMakeLists.txt: Language not supported
  • tests/bsim/bluetooth/tester/Kconfig: Language not supported
  • tests/bsim/bluetooth/tester/boards/nrf52_bsim.overlay: Language not supported
  • tests/bsim/bluetooth/tester/compile.sh: Language not supported
  • tests/bsim/bluetooth/tester/prj.conf: Language not supported
  • tests/bsim/bluetooth/tester/tests_scripts/gap.sh: Language not supported
Comments suppressed due to low confidence (1)

tests/bsim/bluetooth/tester/src/host/gap_peripheral.c:51

  • The test description for the gap_peripheral test mentions 'GAP central' instead of 'GAP peripheral'. Please update the description to accurately reflect the test case.
.test_descr = "Smoketest for the GAP central BT Tester behavior",

jhedberg
jhedberg previously approved these changes Apr 7, 2025
Add a babblesim test of the BT Tester doing a GAP smoke test
connecting 2 BT testers using BTP.

The purpose of this is to further increase the test coverage
of the BT Tester in CI, as it is only being built, and runtime
errors are typically not caught.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 9 out of 22 changed files in this pull request and generated no comments.

Files not reviewed (13)
  • tests/bluetooth/tester/Kconfig.sysbuild: Language not supported
  • tests/bluetooth/tester/boards/nrf52_bsim.conf: Language not supported
  • tests/bluetooth/tester/boards/nrf52_bsim.overlay: Language not supported
  • tests/bluetooth/tester/boards/nrf5340bsim_nrf5340_cpuapp.conf: Language not supported
  • tests/bluetooth/tester/boards/nrf5340bsim_nrf5340_cpuapp.overlay: Language not supported
  • tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh: Language not supported
  • tests/bsim/bluetooth/compile.sh: Language not supported
  • tests/bsim/bluetooth/tester/CMakeLists.txt: Language not supported
  • tests/bsim/bluetooth/tester/Kconfig: Language not supported
  • tests/bsim/bluetooth/tester/boards/nrf52_bsim.overlay: Language not supported
  • tests/bsim/bluetooth/tester/compile.sh: Language not supported
  • tests/bsim/bluetooth/tester/prj.conf: Language not supported
  • tests/bsim/bluetooth/tester/tests_scripts/gap.sh: Language not supported
Comments suppressed due to low confidence (1)

tests/bsim/bluetooth/tester/src/bsim_btp.h:73

  • The same parameter 'adv_sr_data' is used for both advertisement data and scan response data, which might be unintended if separate payloads are required. Consider using distinct parameters if different data should be transmitted.
if (adv_data_len > 0U) {

Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@kartben kartben merged commit d8e771d into zephyrproject-rtos:main Apr 8, 2025
26 checks passed
@Thalley Thalley deleted the bttester_bsim branch April 8, 2025 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Host Bluetooth Host (excluding BR/EDR) area: Bluetooth Qualification Bluetooth Qualification -related issues and pull requests area: Bluetooth platform: nRF BSIM Nordic Semiconductors, nRF BabbleSim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bluetooth: Tester: Run GAP smoketests on the BT tester in Babblesim
7 participants