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: Add commands to add and delete virtual addresses #59486

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

PavelVPV
Copy link
Collaborator

Virtual address behavior has been changed in this PR: #57878

Now it is required to register virtual address before using it.

Corresponding PR to auto-pts:
auto-pts/auto-pts#961

PavelVPV added a commit to PavelVPV/auto-pts that referenced this pull request Jun 21, 2023
Virtual address behavior has been changed in this PR:
zephyrproject-rtos/zephyr#57878

Now it requires label uuid to be added before any message can be sent
and desired uuid should be passed to message context structure before
sending a message to a virtual address.

This change should fix MESH/NODE/NET/BV-02-C and MESH/NODE/TNPT/BV-05-C
failing tests.

For MESH/NODE/NET/BV-02-C the virtual address is added on hdl_wid_21 as
PTS asks the stack to provide known virtual address.

For MESH/NODE/TNPT/BV-05-C PTS gives the label uuid in the message,
therefore we need to add this address first before sending a message to
it.

Corresponding PR to zephyrproject-rtos:
zephyrproject-rtos/zephyr#59486

Signed-off-by: Pavel Vasilyev <[email protected]>
PavelVPV added a commit to PavelVPV/auto-pts that referenced this pull request Jun 21, 2023
Virtual address behavior has been changed in this PR:
zephyrproject-rtos/zephyr#57878

Now it requires label uuid to be added before any message can be sent
and desired uuid should be passed to message context structure before
sending a message to a virtual address.

This change should fix MESH/NODE/NET/BV-02-C and MESH/NODE/TNPT/BV-05-C
failing tests.

For MESH/NODE/NET/BV-02-C the virtual address is added on hdl_wid_21 as
PTS asks the stack to provide known virtual address.

For MESH/NODE/TNPT/BV-05-C PTS gives the label uuid in the message,
therefore we need to add this address first before sending a message to
it.

Corresponding PR to zephyrproject-rtos:
zephyrproject-rtos/zephyr#59486

Signed-off-by: Pavel Vasilyev <[email protected]>
alwa-nordic
alwa-nordic previously approved these changes Jun 21, 2023
@PavelVPV PavelVPV changed the title bluetooth: tester: Add commands to add and delete virtual addresses tests: bluetooth: tester: Add commands to add and delete virtual addresses Jun 26, 2023
alxelax
alxelax previously approved these changes Jun 26, 2023
PavelVPV added a commit to PavelVPV/auto-pts that referenced this pull request Jun 27, 2023
Virtual address behavior has been changed in this PR:
zephyrproject-rtos/zephyr#57878

Now it requires label uuid to be added before any message can be sent
and desired uuid should be passed to message context structure before
sending a message to a virtual address.

This change should fix MESH/NODE/NET/BV-02-C and MESH/NODE/TNPT/BV-05-C
failing tests.

For MESH/NODE/NET/BV-02-C the virtual address is added on hdl_wid_21 as
PTS asks the stack to provide known virtual address.

For MESH/NODE/TNPT/BV-05-C PTS gives the label uuid in the message,
therefore we need to add this address first before sending a message to
it.

Corresponding PR to zephyrproject-rtos:
zephyrproject-rtos/zephyr#59486

Signed-off-by: Pavel Vasilyev <[email protected]>
mkasenberg pushed a commit to auto-pts/auto-pts that referenced this pull request Jun 28, 2023
Virtual address behavior has been changed in this PR:
zephyrproject-rtos/zephyr#57878

Now it requires label uuid to be added before any message can be sent
and desired uuid should be passed to message context structure before
sending a message to a virtual address.

This change should fix MESH/NODE/NET/BV-02-C and MESH/NODE/TNPT/BV-05-C
failing tests.

For MESH/NODE/NET/BV-02-C the virtual address is added on hdl_wid_21 as
PTS asks the stack to provide known virtual address.

For MESH/NODE/TNPT/BV-05-C PTS gives the label uuid in the message,
therefore we need to add this address first before sending a message to
it.

Corresponding PR to zephyrproject-rtos:
zephyrproject-rtos/zephyr#59486

Signed-off-by: Pavel Vasilyev <[email protected]>
@mkasenberg
Copy link
Contributor

pls rebase

alxelax
alxelax previously approved these changes Jun 28, 2023
@PavelVPV
Copy link
Collaborator Author

PavelVPV commented Jul 3, 2023

@sjanc, @alwa-nordic, @jhedberg, could you approve PR so it gets merged? Corresponding PR for auto-pts has been merged. This should fix failing PTS tests for mesh.

alwa-nordic
alwa-nordic previously approved these changes Jul 3, 2023
jhedberg
jhedberg previously approved these changes Jul 3, 2023
const struct bt_mesh_va *va;
int err;

if (cmd_len != sizeof(*cp)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is not needed when expected_len is provided

return BTP_STATUS_FAILED;
}

rp->addr = va->addr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if va->addr is host or le16, if host this should be converted

const struct bt_mesh_va *va;
int err;

if (cmd_len != sizeof(*cp)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

ditto: not needed if expected_len is provided

return BTP_STATUS_FAILED;
}

rp->addr = sys_le16_to_cpu(va->addr);
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't this be sys_cpu_to_le16 ? (BTP is LE)

Virtual address behavior has been changed in this PR:
zephyrproject-rtos#57878

Now it is required to register virtual address before using it.

Corresponding PR to auto-pts:
auto-pts/auto-pts#961

Signed-off-by: Pavel Vasilyev <[email protected]>
@PavelVPV
Copy link
Collaborator Author

PavelVPV commented Jul 5, 2023

@sjanc , please review

@PavelVPV
Copy link
Collaborator Author

@sjanc , can you please look at this PR?

@carlescufi carlescufi merged commit 4d56a31 into zephyrproject-rtos:main Jul 25, 2023
15 checks passed
m-alperen-sener pushed a commit to m-alperen-sener/auto-pts that referenced this pull request Jul 26, 2023
Virtual address behavior has been changed in this PR:
zephyrproject-rtos/zephyr#57878

Now it requires label uuid to be added before any message can be sent
and desired uuid should be passed to message context structure before
sending a message to a virtual address.

This change should fix MESH/NODE/NET/BV-02-C and MESH/NODE/TNPT/BV-05-C
failing tests.

For MESH/NODE/NET/BV-02-C the virtual address is added on hdl_wid_21 as
PTS asks the stack to provide known virtual address.

For MESH/NODE/TNPT/BV-05-C PTS gives the label uuid in the message,
therefore we need to add this address first before sending a message to
it.

Corresponding PR to zephyrproject-rtos:
zephyrproject-rtos/zephyr#59486

Signed-off-by: Pavel Vasilyev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants