Skip to content
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

Update CRMP test to wait for ack and check retransmit table #7008

Merged
merged 2 commits into from
May 22, 2021

Conversation

pan-apple
Copy link
Contributor

Problem

TestReliableMessageProtocol::CheckResendMessage unit test could be updated to wait for the ack from peer, and make sure it gets processed correctly.

Change overview

Updated the unit test. The test can now selectively drop message (and retries). It also processes the ack response from the peer, and confirms that the retransmit table is in the correct state.

Testing

The unit test TestReliableMessageProtocol::CheckResendMessage is itself the test that verifies it.

Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pan-apple for fixing the unit test!

src/messaging/tests/TestReliableMessageProtocol.cpp Outdated Show resolved Hide resolved
src/messaging/tests/TestReliableMessageProtocol.cpp Outdated Show resolved Hide resolved
@github-actions
Copy link

Size increase report for "esp32-example-build" from 3eec7c3

File Section File VM
chip-all-clusters-app.elf .flash.text -12 -12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-pigweed-app.elf and ./pull_artifact/chip-pigweed-app.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-all-clusters-app.elf and ./pull_artifact/chip-all-clusters-app.elf:

sections,vmsize,filesize
.debug_line,0,28
.debug_info,0,19
.debug_loc,0,-7
.flash.text,-12,-12
.debug_ranges,0,-24


@@ -155,8 +156,7 @@ void ReliableMessageMgr::ExecuteActions()
// If the retransmission was successful, update the passive timer
entry.nextRetransTimeTick = static_cast<uint16_t>(rc->GetActiveRetransmitTimeoutTick());
#if !defined(NDEBUG)
ChipLogDetail(ExchangeManager, "Retransmit MsgId:%08" PRIX32 " Send Cnt %d", entry.retainedBuf.GetMsgId(),
entry.sendCount);
ChipLogDetail(ExchangeManager, "Retransmit MsgId:%08" PRIX32 " Send Cnt %d", msgId, entry.sendCount);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@bzbarsky-apple bzbarsky-apple merged commit 2fb8fc1 into project-chip:master May 22, 2021
@pan-apple pan-apple deleted the more-crmp-tests branch May 22, 2021 16:37
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
…chip#7008)

* Update CRMP test to wait for ack and check retransmit table

* address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants