-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
OpenThread RPC DNS client #17859
Conversation
CI InformationTo view the history of this post, clich the 'edited' button above Inputs:Sources:sdk-nrf: PR head: c8580e3185adc4a7e0eb60aa0d97f754d082a2ef more detailssdk-nrf:
Github labels
List of changed files detected by CI (16)
Outputs:ToolchainVersion: b77d8c1312 Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped;
|
1106614
to
c5e66b1
Compare
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. |
a847ad0
to
cd345f8
Compare
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.
Partial review
cd345f8
to
19d0d53
Compare
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 guess it requires a bit more work.
My main concern is
- 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.
- Not all tests check that everything was sent as added.
- 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); |
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.
Could change it on shell_error
and put under else
?
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.
not solved
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.
Done
RPC_RSP(CBOR_DNS_QUERY_CONFIG)); | ||
|
||
config = otDnsClientGetDefaultConfig(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.
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.
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.
not solved yet
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.
It actually has - I put it in common tc_cleanup(void *f)
function called after every test case
19d0d53
to
5361b04
Compare
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. |
2e7c8ef
to
82632ab
Compare
Hi @konradderda, there are a couple of comments those have not been solved yet. |
I dismiss my review since I'm on vacation until January to not block PR by my absence.
@Damian-Nordic, could you control comments not solved yet those are important to your point of view? |
82632ab
to
b25f807
Compare
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.
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 @@ | |||
/* |
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.
Przemek has recently added common_fakes.h
. Can we merge this files?
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.
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]; |
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.
OT_DNS_MAX_LABEL_SIZE
may be too small. The service name can be a full DNS name, not just a single component.
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.
Good point, fixed
b25f807
to
70de528
Compare
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]>
70de528
to
bc8fbd3
Compare
This commit add tests suite for OpenThread RPC DNS client Signed-off-by: Konrad Derda <[email protected]>
bc8fbd3
to
c8580e3
Compare
No description provided.