-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Dns unittest preparation #11735
Dns unittest preparation #11735
Conversation
This is for portability reasons. If this code was compiled to a 64-bit architecture, then the cast from void* to int would lose precision.
@michalpasztamobica, thank you for your changes. |
Dependency above ^^ |
I started initial test while we complete the review |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
@0xc0170, a few targets (DISCO_L475, GR_LYCHEE and NUMAKER_PFM_NUC472) failed with:
I don't think this is related to my changes? |
I restarted it again |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
Build claims everything passed, but CI indicates exporter failure. @0xc0170 , can you please check? It looks like something unrelated to the PR changes... |
Exporters were restarted and all good, I might have missed to post "restarting" |
One more review from @ARMmbed/mbed-os-ipcore needed here |
@AnttiKauppila , would you have a minute to review? |
This is on top of #11535 which is currently scheduled for post 5.15 (TBC) |
Description
While working on unittests for
nsapi_dns
I noticed two things:unique_id
is cast fromint
tovoid *
type and is always assumed to be 32-bit. This may be true for microcontrollers, but unittests are running on 64-bit machines (checked this with INFRA team). I therefore changed the type ofunique_id
to a more arch-independentintptr_t
. This will still be a 32-bit variable for microcontrollers.nsapi_dns_query_async_cancel
had a different definition and implementation. Once the function was put to use the linker was unable to connect the two and gave errors. Unifying the header fixes the issue.The unittests themselves will be put into a separate PR, in order not to mix code fixes and test updates.
Pull request type
Reviewers
@AnttiKauppila
@tymoteuszblochmobica