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

Don't clobber chip-tool error #9504

Merged
merged 2 commits into from
Sep 7, 2021

Conversation

kpschoedel
Copy link
Contributor

Problem

82cf1b1 (PR #9086) could clobber a returned error code with a
different value GetCommandExitStatus(), which could lead to chip-tool
exiting successfully when it shouldn't. (This doesn't actually happen
at present because nothing sets err after RunCommand(), but could
be triggered by otherwise innocuous code changes.)

Change overview

Check for an existing error in preference to GetCommandExitStatus().

Testing

Manual run of chip-tool with edits.

#### Problem

82cf1b1 (PR project-chip#9086) could clobber a returned error code with a
different value `GetCommandExitStatus()`, which could lead to `chip-tool`
exiting successfully when it shouldn't. (This doesn't actually happen
at present because nothing sets `err` after `RunCommand()`, but could
be triggered by otherwise innocuous code changes.)

#### Change overview

Check for an existing error in preference to `GetCommandExitStatus()`.

#### Testing

Manual run of `chip-tool` with edits.
@github-actions
Copy link

github-actions bot commented Sep 7, 2021

Size increase report for "esp32-example-build" from 071592d

File Section File VM
chip-temperature-measurement-app.elf .flash.text -36 -36
chip-shell.elf .flash.text 48 48
Full report output
BLOAT REPORT

Files found only in the build output:
    report.csv

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

sections,vmsize,filesize
.debug_info,0,1312
.debug_loc,0,1
.riscv.attributes,0,-2
.debug_abbrev,0,-9
.debug_line,0,-1482

Comparing ./master_artifact/chip-persistent-storage.elf and ./pull_artifact/chip-persistent-storage.elf:

sections,vmsize,filesize

Comparing ./master_artifact/chip-temperature-measurement-app.elf and ./pull_artifact/chip-temperature-measurement-app.elf:

sections,vmsize,filesize
.debug_info,0,1336
[Unmapped],0,36
.debug_loc,0,16
.debug_str,0,-2
.flash.text,-36,-36
.debug_line,0,-1122

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

sections,vmsize,filesize

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

sections,vmsize,filesize
.debug_info,0,1336
.debug_str,0,-2
.debug_line,0,-1182

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

sections,vmsize,filesize
.debug_info,0,1336
.flash.text,48,48
[Unmapped],0,-48
.debug_line,0,-432

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

sections,vmsize,filesize
.debug_info,0,1312
.debug_abbrev,0,-9
.debug_loc,0,-15
.debug_line,0,-1152

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

sections,vmsize,filesize


@woody-apple woody-apple merged commit 699c525 into project-chip:master Sep 7, 2021
@kpschoedel kpschoedel deleted the x9086-exit-status branch September 8, 2021 14:07
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this pull request Sep 9, 2021
* Don't clobber chip-tool error

#### Problem

82cf1b1 (PR project-chip#9086) could clobber a returned error code with a
different value `GetCommandExitStatus()`, which could lead to `chip-tool`
exiting successfully when it shouldn't. (This doesn't actually happen
at present because nothing sets `err` after `RunCommand()`, but could
be triggered by otherwise innocuous code changes.)

#### Change overview

Check for an existing error in preference to `GetCommandExitStatus()`.

#### Testing

Manual run of `chip-tool` with edits.

* stop task before getting status
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.

4 participants