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

OpenThread RPC DNS client #17859

Merged
merged 3 commits into from
Dec 23, 2024
Merged

Conversation

konradderda
Copy link
Contributor

No description provided.

@konradderda konradderda requested review from a team as code owners October 14, 2024 05:27
@CLAassistant
Copy link

CLAassistant commented Oct 14, 2024

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added. label Oct 14, 2024
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Oct 14, 2024

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 14

Inputs:

Sources:

sdk-nrf: PR head: c8580e3185adc4a7e0eb60aa0d97f754d082a2ef

more details

sdk-nrf:

PR head: c8580e3185adc4a7e0eb60aa0d97f754d082a2ef
merge base: 6266884de899a254b7f09868d6ad4947d0dfc879
target head (main): 7f5d9d4569795fa90576034981ea043516fd3ec5
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (16)
samples
│  ├── nrf_rpc
│  │  ├── protocols_serialization
│  │  │  ├── client
│  │  │  │  ├── src
│  │  │  │  │  │ ot_shell.c
subsys
│  ├── net
│  │  ├── openthread
│  │  │  ├── rpc
│  │  │  │  ├── Kconfig
│  │  │  │  ├── client
│  │  │  │  │  ├── CMakeLists.txt
│  │  │  │  │  │ ot_rpc_dns_client.c
│  │  │  │  ├── common
│  │  │  │  │  ├── ot_rpc_common.c
│  │  │  │  │  ├── ot_rpc_common.h
│  │  │  │  │  │ ot_rpc_ids.h
│  │  │  │  ├── server
│  │  │  │  │  ├── CMakeLists.txt
│  │  │  │  │  │ ot_rpc_dns_client.c
tests
│  ├── subsys
│  │  ├── net
│  │  │  ├── openthread
│  │  │  │  ├── rpc
│  │  │  │  │  ├── client
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  ├── dns_client_suite.c
│  │  │  │  │  │  │  │ thread_suite.c
│  │  │  │  │  ├── common
│  │  │  │  │  │  │ test_rpc_env.h
│  │  │  │  │  ├── server
│  │  │  │  │  │  ├── src
│  │  │  │  │  │  │  ├── common_fakes.c
│  │  │  │  │  │  │  ├── common_fakes.h
│  │  │  │  │  │  │  ├── dns_client_suite.c
│  │  │  │  │  │  │  │ thread_suite.c

Outputs:

Toolchain

Version: b77d8c1312
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:b77d8c1312_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 535
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-rpc
    • ✅ test-fw-nrfconnect-thread
    • ✅ test-fw-nrfconnect-ps
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_nrf_provisioning
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publishing GitHub Action.

@konradderda konradderda force-pushed the ot_rpc_dns_client branch 2 times, most recently from a847ad0 to cd345f8 Compare October 14, 2024 08:48
Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

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

Partial review

subsys/net/openthread/rpc/Kconfig Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/common/ot_rpc_common.c Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/server/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/server/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
Copy link
Contributor

@alxelax alxelax left a comment

Choose a reason for hiding this comment

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

I guess it requires a bit more work.
My main concern is

  1. Some places are implemented on hybrid manner. They use both pure zcbor API with checking errors over nrf_rpc_serialize API. It should be done over pure zcbor with manual checkig of returned value or over nrf_rpc_serialize and then relay in checking error over this API. I'm afraid hybrid approach might not work.
  2. Not all tests check that everything was sent as added.
  3. Absence of server tests.

P.S. seems this EPIC is critical: https://nordicsemi.atlassian.net/browse/MRTNEXT-78
Presence of both ways of implementation made mess up author. We need to complete it asap.

uint32_t ttl;
char addr_string[NET_IPV6_ADDR_LEN];

shell_print(sh, "DNS resolve callback error: %u", error);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could change it on shell_error and put under else?

Copy link
Contributor

Choose a reason for hiding this comment

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

not solved

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

subsys/net/openthread/rpc/client/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/client/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/client/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/server/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
subsys/net/openthread/rpc/server/ot_rpc_dns_client.c Outdated Show resolved Hide resolved
RPC_RSP(CBOR_DNS_QUERY_CONFIG));

config = otDnsClientGetDefaultConfig(NULL);

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess each test shall have mock_nrf_rpc_tr_expect_done(); after execution ot API to check that everything has been sent as expected in mocked transport.

Copy link
Contributor

Choose a reason for hiding this comment

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

not solved yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It actually has - I put it in common tc_cleanup(void *f) function called after every test case

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link. It will be updated about 10 minutes after the documentation build succeeds.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.

@konradderda konradderda force-pushed the ot_rpc_dns_client branch 2 times, most recently from 2e7c8ef to 82632ab Compare December 5, 2024 09:57
@alxelax
Copy link
Contributor

alxelax commented Dec 5, 2024

Hi @konradderda, there are a couple of comments those have not been solved yet.

@alxelax alxelax dismissed their stale review December 5, 2024 11:33

I dismiss my review since I'm on vacation until January to not block PR by my absence.

@alxelax
Copy link
Contributor

alxelax commented Dec 5, 2024

@Damian-Nordic, could you control comments not solved yet those are important to your point of view?

Copy link
Contributor

@Damian-Nordic Damian-Nordic left a comment

Choose a reason for hiding this comment

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

2 final nits, but feel free to address them after merge. Also, please remember to update the list of supported functions: https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/networking/ot_rpc.html

@@ -0,0 +1,9 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Przemek has recently added common_fakes.h. Can we merge this files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Merged

static void ot_rpc_dns_client_browse(const struct nrf_rpc_group *group,
struct nrf_rpc_cbor_ctx *ctx, void *handler_data)
{
char service_name[OT_DNS_MAX_LABEL_SIZE];
Copy link
Contributor

Choose a reason for hiding this comment

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

OT_DNS_MAX_LABEL_SIZE may be too small. The service name can be a full DNS name, not just a single component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, fixed

This commit adds RPC client and server for DNS client API.

Signed-off-by: Konrad Derda <[email protected]>
Add new 'ot test_*' commands for DNS client.

Signed-off-by: Konrad Derda <[email protected]>
This commit add tests suite for OpenThread RPC DNS client

Signed-off-by: Konrad Derda <[email protected]>
@nordicjm nordicjm merged commit 9dd07c8 into nrfconnect:main Dec 23, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-entry-required Update changelog before merge. Remove label if entry is not needed or already added.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants