-
Notifications
You must be signed in to change notification settings - Fork 3k
Leverage the simplification of the IPv6 parsing primitive #8003
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
Conversation
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.
Looks fine, for once LibService has been updated.
@Taiki-San , looks like there is a build issue, please take a look: Compile [ 69.1%]: SocketAddress.cpp [Error] SocketAddress.cpp@63,30: could not convert 'stoip6(addr, strlen(addr), ((void*)((uint8_t*)(&((SocketAddress*)this)->SocketAddress::_addr.nsapi_addr::bytes))))' from 'void' to 'bool' [Warning] SocketAddress.cpp@70,1: control reaches end of non-void function [-Wreturn-type] [ERROR] ./features/netsocket/SocketAddress.cpp: In member function 'bool SocketAddress::set_ip_address(const char*)': ./features/netsocket/SocketAddress.cpp:63:30: error: could not convert 'stoip6(addr, strlen(addr), ((void*)((uint8_t*)(&((SocketAddress*)this)->SocketAddress::_addr.nsapi_addr::bytes))))' from 'void' to 'bool' |
@NirSonnenschein That's expected from the missing PR: |
@Taiki-San , sorry, I missed that interface change. restored "needs: review" status. |
Part of me wants to give this a red cross because of you verbing the word "leverage", but resisting temptation. |
Ah ah, sorry about that. Do you have a better suggestion for posterity? |
No, you do you. Not totally serious :) |
@kjbracey-arm when this fix can move forward? |
When the next libService subtree merge comes in. That's normally done as part of the once-per-release Nanostack update, but we could do an extra one because of this. @artokin, @deepakvenugopal ? |
Waiting for #8245. Also needs a conflict resolution rebase. |
For the record, this PR is waiting for the next libService merge. |
@Taiki-San Looks like #8245 is now in. Was this what you mentioned with |
Not really involved in the process but if it wasn't reverted, #8245 contains the code this PR is depending on. Tests should run fine this time. |
@Taiki-San You might want to take a look at the Travis CI tests. I've restarted them just in case, but the errors looks legit. |
I don't have access to the internal CI, but this PR couldn't build until |
There's a unit test stub for stoip6 that blew up. Seems there's a dummy definition of stoip6 without the return value in UNITTESTS/target_h/ip6string.h. |
Thanks, just patched it. |
@Taiki-San Thanks. Manually restarted unittests since GitHub's webhooks are disabled right now. Results should be ready in about 20 mins. |
|
@Taiki-San Nope. Please take a look at the failure.
|
That's weird, I can't reproduce this error on my computer. I'm running macOS/clang. |
@ARMmbed/mbed-os-test Would y'all be able to help out here? |
Those unit tests are checking response to bad IP addresses. Presumably would have worked when the "is it an IPv6 address" tests were inside NetworkStack.cpp, but now it's using stubbed stoip6 which always returns success? No, actually you aren't returning anything in ip6string.h. I see that the cmake file for the test is actually pulling in real stoip4.c -you could also pull in real stoip6.c for consistency. (And then if you're doing that, remove the dummies from ip6string_h?) |
Oh, so that's why it's randomly succeeding! It's basically just using whatever was on the stack/register as the success indicator. |
I don't have a view on what the correct thing to do for those tests is, except that ip4 and ip6 should be consistent. It would seem natural to leave the working ip4 as-is and bring ip6 inline. |
…a valid IPv6 address
Ok, I kept |
/morph build |
Build : SUCCESSBuild number : 3448 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 3069 |
Test : FAILUREBuild number : 3239 |
Apparently spurious test failure on |
/morph test |
Test : SUCCESSBuild number : 3241 |
Depends on #8245 (moved to 5.11) |
Description
Apply the changes of PR #6293 to the IPv6 parser.
Thanks to changes introduced by PelionIoT/nanostack-libservice#72, we can now report the success or failure of the parsing and not rely on simply returning an empty string on failure.
This PR shouldn't be merged before PelionIoT/nanostack-libservice#72 is merged and integrated into mbedOS.
Pull request type