-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Bugfix in ringbufindex #2046
Bugfix in ringbufindex #2046
Conversation
Great catch. I saw that the JN platform uses the ringbufindex code as well, what's the impact there? |
@neophob I don't think this change has any impact on To my understanding, you don't have any problem with this bug as long as you don't use an index returned by |
Right, if I'm correct it looks like everything was off-by-one, causing no problem (jn nor tsch), but that is definitely unwanted indeed :p |
@simonduq Regarding |
Right, looking forward to the PR then :) I guess the bug simply slipped in now with the test disabled :/ |
@simonduq I've created a new PR, #2079. My conclusion is, At first, I noticed that the test failed on the commit of bfef0b5, although it succeeded before that. So, I suspected the adaptive scheduling, but I was wrong. I guess, some timing change by bfef0b5 triggers the test failure by chance. A TSCH node is initialized with frame filtering disabled. As long as the frame filtering is disabled, the node doesn't suffer from the bug of CC2420. The filter is enabled once it sends a unicast (ACK-required) frame. Therefore, if it receives a broadcasted DIO before sending any unicast frame, it can join a DODAG. Otherwise, it cannot not. This happens in a failed test of Anyway, the failure of the test is nothing to do with |
Could it be the recent changes to MAC header that result in frames that the emulated cc2420 filters out? |
@simonduq In the first place, why does TSCH needs the frame filtering disabled during scanning and waiting for an ACK...? (it's totally off-topic, by the way... 😅) |
On some platforms (at least cc2420, which was our initial development platform), the radio would filter out enhanced ACKs, probably due to the len different from 3. Scanning should work both with and without filtering. |
@simonduq Thank you for the information! Now I understand what the following comment means, that is found in /* Entering promiscuous mode so that the radio accepts the enhanced ACK */ |
if(utp->result == unit_test_failure) { | ||
printf("FAILED - %s: exit at L%u\n", utp->descr, utp->exit_line); | ||
} else { | ||
printf("SUCEEDED - %s\n", utp->descr); |
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.
Typo: SUCEEDED
-> SUCCEEDED
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.
Thanks! I've fixed this typo 😄
501d85b
to
be1a14c
Compare
Good. I've used the fix in multiple testbeds, successfully. |
@simonduq Sure, I can do that today :-) |
be1a14c
to
9acf177
Compare
Added one commit enabling TSCH regression testing. Travis ran the test and got green. |
👍 |
Thanks! |
cortex-m: do not add LD_*_GROUP by default
There are two bugs in
ringbufindex
. They are similar.While
ringbufindex_peek_put()
is supposed to return the index of the next element to be added, it returns the next index of the adding element.ringbufindex_peek_get()
returns the next index of the first element.Travis got green on my account. However,
19-z1-rpl-tsch.csc.flaky
failed, that is one of non-regression tests of TSCH. Since this one fails even on the tip of the master branch, I would say, this PR doesn't cause the failure...A regression test for
ringbufindex
has been introduced underregression-tests/03-base
as04-ringbufindex
. Without the fixes, two of them fails.All the tests pass on this branch.