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

Make OnMessageReceived return error #7855

Merged

Conversation

yunhanw-google
Copy link
Contributor

@yunhanw-google yunhanw-google commented Jun 23, 2021

Problem

OnMessageReceived in ExchangeDelegate don't return error so that we
cannot test OnMessageReceived API in Interaction Model protocol
implementation.
It is not good to make friend class TestCommandInteraction, TestWriteInteraction,TestReadInteraction in Command, ReadClient/WriteClient, ReadHandler/WriteHandler. if we make OnMessageReceived with return error, it can decouple friend class.
In addition, in ExchangeContext, it is good to return error for mDelegate->OnMessageReceived(this, packetHeader, payloadHeader, std::move(msgBuf)) inside HandleMessage, currently we cannot return that error from OnMessageReceived

Change overview

Replace void with CHIP_ERROR for OnMessageReceived.

Testing

The existing tests cover this.

Summary of Changes:
OnMessageReceived in ExchangeDelegate don't return error so that we
cannot test OnMessageReceived in Interaction Model protocol
implementation.
@github-actions
Copy link

Size increase report for "gn_qpg6100-example-build" from 039dfbd

File Section File VM
chip-qpg6100-lighting-example.out .text 48 48
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-qpg6100-lighting-example.out.map and ./pull_artifact/chip-qpg6100-lighting-example.out.map:

BLOAT EXECUTION FAILED WITH CODE 1:
bloaty: unknown file type for file './pull_artifact/chip-qpg6100-lighting-example.out.map'

Comparing ./master_artifact/chip-qpg6100-lighting-example.out and ./pull_artifact/chip-qpg6100-lighting-example.out:

sections,vmsize,filesize
.debug_info,0,395
.debug_line,0,67
.debug_abbrev,0,52
.text,48,48
.debug_str,0,7
.strtab,0,5
.shstrtab,0,-1
.debug_ranges,0,-24
[Unmapped],0,-48
.debug_frame,0,-100
.debug_loc,0,-1229


@github-actions
Copy link

Size increase report for "esp32-example-build" from 039dfbd

File Section File VM
chip-all-clusters-app.elf .flash.text 124 124
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_info,0,525
.debug_loc,0,524
.debug_line,0,511
.debug_abbrev,0,131
.flash.text,124,124
.debug_ranges,0,56
.debug_str,0,5
.strtab,0,5
.shstrtab,0,-1


@github-actions
Copy link

Size increase report for "nrfconnect-example-build" from 039dfbd

File Section File VM
chip-shell.elf text 12 12
chip-shell.elf device_handles 4 4
chip-lock.elf text 60 60
chip-lock.elf device_handles -12 -12
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

Comparing ./master_artifact/chip-shell.elf and ./pull_artifact/chip-shell.elf:

sections,vmsize,filesize
.debug_info,0,98
.debug_abbrev,0,61
.debug_line,0,13
text,12,12
device_handles,4,4
.debug_frame,0,-36
.debug_loc,0,-336

Comparing ./master_artifact/chip-lock.elf and ./pull_artifact/chip-lock.elf:

sections,vmsize,filesize
.debug_info,0,422
.debug_abbrev,0,102
.debug_line,0,68
text,60,60
.debug_str,0,5
.strtab,0,5
.shstrtab,0,-1
.debug_ranges,0,-8
device_handles,-12,-12
.debug_frame,0,-120
.debug_loc,0,-373


@andy31415 andy31415 merged commit 475ae27 into project-chip:master Jun 23, 2021
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
Summary of Changes:
OnMessageReceived in ExchangeDelegate don't return error so that we
cannot test OnMessageReceived in Interaction Model protocol
implementation.
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