Skip to content
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: tester: Move bt_mesh_init call to BTP_MESH_INIT cmd #63556

Merged

Conversation

PavelVPV
Copy link
Collaborator

@PavelVPV PavelVPV commented Oct 5, 2023

In some RPR tests we need to pass alternative composition data when
testing CDP128. When bt_mesh_init is called from mesh service
registration callback, we can't pass any arguments. Therefore we need
to move bt_mesh_init call out from mesh service registration to
BTP_MESH_INIT command. BTP_MESH_SET_COMP_ALT can then be removed as
it won't work as it was assumed initially.

Corresponding PR to AutoPTS: auto-pts/auto-pts#1018

In some RPR tests we need to pass alternative composition data when
testing CDP128. When bt_mesh_init is called from mesh service
registration callback, we can't pass any arguments. Therefore we need
to move bt_mesh_init call out from mesh service registration to
BTP_MESH_INIT command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Remove this command as composition can only be set in bt_mesh_init call
which is called before settings are loaded.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
@jhedberg jhedberg added this to the v3.5.0 milestone Oct 5, 2023
@carlescufi carlescufi merged commit bd82ff2 into zephyrproject-rtos:main Oct 5, 2023
22 checks passed
@@ -79,6 +79,10 @@ struct btp_mesh_provision_node_cmd_v2 {
} __packed;

#define BTP_MESH_INIT 0x04
struct btp_mesh_init_cmd {
bool comp_alt;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this shall be uint8_t
and I'd make it a bit more future proof, ie "uint8_t composition_data", with value 0x00, 0x01 etc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will be addressed here: #63561

PavelVPV added a commit to PavelVPV/zephyr that referenced this pull request Oct 6, 2023
This fixes regression introduced in
zephyrproject-rtos#63556

In the PR above bt_mesh_init call was moved to BTP_MESH_INIT command to
allow to select alternative composition data in the stack. AutoPTS
sends BTP_MESH_CONFIG_PROVISIONING command before BTP_MESH_INIT to
prepare provisioning context. But because bt_mesh_init is now called in
BTP_MESH_INIT command, this configuration is reset to default which
makes PTS tests to fail.

To solve this, this commit calls introduces a new command
BTP_MESH_START, which will be used only for starting the stack by
loading the settings and either enabling provisionig or
self-provisioning the device. bt_mesh_init will stay in BTP_MESH_INIT
command which will be called only at the initialization of a test case
in AutoPTS. Previous calls to BTP_MESH_INIT in AutoPTS will be replaced
with BTP_MESH_START.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
PavelVPV added a commit to PavelVPV/zephyr that referenced this pull request Oct 7, 2023
This fixes regression introduced in
zephyrproject-rtos#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
jhedberg pushed a commit that referenced this pull request Oct 9, 2023
This fixes regression introduced in
#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
m-alperen-sener pushed a commit to m-alperen-sener/sdk-zephyr that referenced this pull request Oct 10, 2023
This fixes regression introduced in
zephyrproject-rtos/zephyr#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
(cherry picked from commit 94bd09b)
Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
kartben pushed a commit to kartben/zephyr that referenced this pull request Oct 10, 2023
This fixes regression introduced in
zephyrproject-rtos#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this pull request Oct 10, 2023
This fixes regression introduced in
zephyrproject-rtos/zephyr#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

(cherry picked from commit 94bd09b)

Original-Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
GitOrigin-RevId: 94bd09b
Change-Id: I71f97a36a011f511abc4ca001262f20af598a175
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4924326
Commit-Queue: Keith Short <keithshort@chromium.org>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
rlubos pushed a commit to nrfconnect/sdk-zephyr that referenced this pull request Oct 11, 2023
This fixes regression introduced in
zephyrproject-rtos/zephyr#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
(cherry picked from commit 94bd09b)
Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
cvinayak pushed a commit to cvinayak/sdk-zephyr that referenced this pull request Oct 20, 2023
This fixes regression introduced in
zephyrproject-rtos/zephyr#63556

In the PR above `bt_mesh_init()` call was moved to `BTP_MESH_INIT`
command to allow to select alternative composition data when starting
the stack. AutoPTS sends `BTP_MESH_CONFIG_PROVISIONING` command
before `BTP_MESH_INIT` to prepare the provisioning context. But
because `bt_mesh_init()` is now called after
`BTP_MESH_CONFIG_PROVISIONING` command is sent, this configuration is
reset to the default which makes PTS tests to fail.

To solve this, this commit calls introduces a new command,
`BTP_MESH_START`, which will replace the original `BTP_MESH_INIT`
command. `bt_mesh_init()` will stay in `BTP_MESH_INIT` while the stack
will be started in `BTP_MESH_START` command.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
(cherry picked from commit 94bd09b)
Signed-off-by: Alperen Şener <alperen.sener@nordicsemi.no>
(cherry picked from commit 83ea074)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Bluetooth Mesh area: Bluetooth bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants