-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add invoke command test for invoke boundary conditions on reply too large
#30643
Add invoke command test for invoke boundary conditions on reply too large
#30643
Conversation
PR #30643: Size comparison from b5dfe72 to a62917b Full report (5 builds for cc32xx, mbed, qpg)
|
PR #30643: Size comparison from b5dfe72 to ce74753 Full report (5 builds for cc32xx, mbed, qpg)
|
continue; // Unclear why these fail | ||
} | ||
|
||
if ((replySize >= 1162) && (replySize <= 1165)) { |
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.
If I understand this correctly it has to do with the Rollback/Checkpoint stuff. We fail in just the right way that we rollback to a state where the array closed, but the InvokeReponseMessage fails and then it proceeds to rollback
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.
This is what the test intends to validate - I am surprised we have 2 failure modes though. For very large buffers we obviously eventually succeed.
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.
Chatted about this with Andrei. But will post here for folks reading.
The second issue Crash due to MessageBuilder::EncodeInteractionModelRevision() encoding failure
is likely because it errors out on ReturnErrorOnFailure(mInvokeResponseBuilder.EndOfInvokeResponseMessage());
here while in TryAddResponseData
, this cause a rollback where mInvokeResponseBuilder.GetInvokeResponses().
is in the wrong state and no longer has an outer container. When it gets call a second time in the FinishStatus
here you get the error.
The first error is likely some other weirdness of rollback interacting in a weird way where we end some of the containers
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 looks like OpenIOT and NRF have different limits here (guessing maybe LWIP buffer allocation ranges maybe).
I am unsure if we want to try to have this test in and then improve or just use it as a template to fix the bugs we have and then commit some version of it only once it consistently passes ...
PR #30643: Size comparison from b5dfe72 to 0f3624b Full report (15 builds for cc13x4_26x4, cc32xx, k32w, mbed, qpg)
|
PR #30643: Size comparison from b5dfe72 to a360adf Full report (5 builds for cc32xx, mbed, qpg)
|
PR #30643: Size comparison from b5dfe72 to eaaf8c7 Full report (5 builds for cc32xx, mbed, qpg)
|
PR #30643: Size comparison from b5dfe72 to 732fded Full report (69 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, psoc6, qpg, telink)
|
Expectation for the codebase is that replies either go through or we manage to send an error reply (so that exchanges are not stuck).
This creates a draft test that is intended to go over all boundery conditions and validate our rollback capabilities.
Also fixes test sequencing issues where global state variables are not resetted properly. I switched for them to be scoped/changed within each test only.
NOTE - this shows bugs
This test is supposed to pass always, but it does NOT. See ranges and commends of reply sizes:
For even larger buffers, our error handling is ok. We should have followup changes to fix this logic.