-
Notifications
You must be signed in to change notification settings - Fork 7k
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
tests: Bluetooth: Add BT Tester GAP smoke test #86146
base: main
Are you sure you want to change the base?
Conversation
78d85c5
to
65746a7
Compare
3bdaa4a
to
f55cd0b
Compare
if(CONFIG_SOC_SERIES_BSIM_NRFXX) | ||
zephyr_include_directories( | ||
${BSIM_COMPONENTS_PATH}/libUtilv1/src/ | ||
${BSIM_COMPONENTS_PATH}/libPhyComv1/src/ | ||
) | ||
endif() # CONFIG_SOC_SERIES_BSIM_NRFXX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers: Should we just always include this? Would allow us to use IS_ENABLED
and include BSIM header files without the guard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may not have understood the question, but BSIM_COMPONENTS_PATH
won't be defined when not building for an nrf*bsim target. So this -I
would be pointing to missing directories. And even if it were, users building for other targets may not have a bsim installation so they wouldn't be able to include bsim headers.
@@ -0,0 +1,13 @@ | |||
# CONFIG_TEST enforces minimal logging, which we don't want |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers: Should we place the BSIM board files in the test instead of the BT Tester directory?
@@ -87,6 +87,8 @@ | |||
|
|||
#define BTP_STATUS_VAL(err) (err) ? BTP_STATUS_FAILED : BTP_STATUS_SUCCESS | |||
|
|||
#define BTP_EVENT_OPCODE 0x80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btp_wait_for_evt(BTP_SERVICE_ID_GAP, BTP_GAP_EV_DEVICE_CONNECTED, NULL); | ||
btp_wait_for_evt(BTP_SERVICE_ID_GAP, BTP_GAP_EV_DEVICE_DISCONNECTED, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewers: Should the test use non-generic event waiters? i.e. should we define a btp_wait_gap_ev_device_connected
and btp_wait_gap_ev_device_disconnected
?
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) |
There was a problem hiding this comment.
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
58d9fb3
to
56306a6
Compare
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>
LOG_HEXDUMP_DBG(buf->data, buf->len, "evt"); | ||
hdr = net_buf_pull_mem(buf, sizeof(struct btp_hdr)); | ||
|
||
/* TODO: Verify length of event based on the service and opcode */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you forget this todo?
if(CONFIG_SOC_SERIES_BSIM_NRFXX) | ||
zephyr_include_directories( | ||
${BSIM_COMPONENTS_PATH}/libUtilv1/src/ | ||
${BSIM_COMPONENTS_PATH}/libPhyComv1/src/ | ||
) | ||
endif() # CONFIG_SOC_SERIES_BSIM_NRFXX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I may not have understood the question, but BSIM_COMPONENTS_PATH
won't be defined when not building for an nrf*bsim target. So this -I
would be pointing to missing directories. And even if it were, users building for other targets may not have a bsim installation so they wouldn't be able to include bsim headers.
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