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

Reset error state when shutting down chip-tool commands. #20818

Merged

Conversation

bzbarsky-apple
Copy link
Contributor

Some commands store an error status. If they fail, the next invocation of the
same command in interactive mode will also claim to have failed, even if it
succeeded, because the error status carries over.

The fix is to reset the error status on Shutdown of the command.

Problem

See above.

Change overview

See above.

Testing

Ran a Read command that failed because the server was shut down, then ran the same Read after restarting the server.

@github-actions
Copy link

github-actions bot commented Jul 15, 2022

PR #20818: Size comparison from c50bacc to f2deb83

Increases (2 builds for linux, nrfconnect)
platform target config section c50bacc f2deb83 change % change
linux chip-tool-ipv6only arm64 (read only) 9935228 9940732 5504 0.1
.text 7906276 7911780 5504 0.1
nrfconnect all-clusters-minimal-app nrf52840dk_nrf52840 text 801484 801488 4 0.0
Decreases (1 build for telink)
platform target config section c50bacc f2deb83 change % change
telink light-switch-app tlsr9518adk80d (read/write) 798068 798060 -8 -0.0
text 566258 566256 -2 -0.0
Full report (32 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section c50bacc f2deb83 change % change
bl602 lighting-app bl602 (read/write) 1398434 1398434 0 0.0
.bss 116978 116978 0 0.0
.data 4480 4480 0 0.0
.text 1059396 1059396 0 0.0
bl602+rpc (read/write) 1443858 1443858 0 0.0
.bss 124418 124418 0 0.0
.data 4600 4600 0 0.0
.text 1091080 1091080 0 0.0
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 667639 667639 0 0.0
(read/write) 183600 183600 0 0.0
.bss 74132 74132 0 0.0
.data 3356 3356 0 0.0
.rodata 88175 88175 0 0.0
.text 579148 579148 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633455 633455 0 0.0
(read/write) 157700 157700 0 0.0
.bss 73428 73428 0 0.0
.data 3356 3356 0 0.0
.rodata 77415 77415 0 0.0
.text 555716 555716 0 0.0
lock-ftd LP_CC2652R7 (read only) 671035 671035 0 0.0
(read/write) 170380 170380 0 0.0
.bss 71196 71196 0 0.0
.data 3280 3280 0 0.0
.rodata 76315 76315 0 0.0
.text 594240 594240 0 0.0
lock-mtd LP_CC2652R7 (read only) 653319 653319 0 0.0
(read/write) 183784 183784 0 0.0
.bss 66884 66884 0 0.0
.data 3280 3280 0 0.0
.rodata 101047 101047 0 0.0
.text 551792 551792 0 0.0
pump-app LP_CC2652R7 (read only) 680179 680179 0 0.0
(read/write) 162084 162084 0 0.0
.bss 71276 71276 0 0.0
.data 3280 3280 0 0.0
.rodata 88731 88731 0 0.0
.text 590964 590964 0 0.0
pump-controller-app LP_CC2652R7 (read only) 665987 665987 0 0.0
(read/write) 176396 176396 0 0.0
.bss 71396 71396 0 0.0
.data 3276 3276 0 0.0
.rodata 84595 84595 0 0.0
.text 580912 580912 0 0.0
shell LP_CC2652R7 (read only) 660130 660130 0 0.0
(read/write) 186612 186612 0 0.0
.bss 76436 76436 0 0.0
.data 3360 3360 0 0.0
.rodata 84954 84954 0 0.0
.text 574860 574860 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 581502 581502 0 0.0
.app_xip_area 460208 460208 0 0.0
.bss 64232 64232 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587466 587466 0 0.0
.app_xip_area 461444 461444 0 0.0
.bss 68960 68960 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 584850 584850 0 0.0
.app_xip_area 464404 464404 0 0.0
.bss 63440 63440 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1083832 1083832 0 0.0
.bss 133044 133044 0 0.0
.data 2048 2048 0 0.0
.text 948720 948720 0 0.0
BRD4161A+rpc (read/write) 1138164 1138164 0 0.0
.bss 149724 149724 0 0.0
.data 2260 2260 0 0.0
.text 986156 986156 0 0.0
BRD4161A+rs911x (read/write) 949208 949208 0 0.0
.bss 140768 140768 0 0.0
.data 2048 2048 0 0.0
.text 806372 806372 0 0.0
lock-app BRD4161A+wf200 (read/write) 1127436 1127436 0 0.0
.bss 144136 144136 0 0.0
.data 2056 2056 0 0.0
.text 981224 981224 0 0.0
window-app BRD4161A (read/write) 1077636 1077636 0 0.0
.bss 134516 134516 0 0.0
.data 2076 2076 0 0.0
.text 941024 941024 0 0.0
esp32 all-clusters-app c3devkit (read only) 1020650 1020650 0 0.0
(read/write) 1485874 1485874 0 0.0
.dram0.bss 70080 70080 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 215760 215760 0 0.0
.flash.text 1020650 1020650 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1074703 1074703 0 0.0
(read/write) 487928 487928 0 0.0
.dram0.bss 75600 75600 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246188 246188 0 0.0
.flash.text 1069319 1069319 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 660236 660236 0 0.0
.bss 69540 69540 0 0.0
.data 1992 1992 0 0.0
.text 582904 582904 0 0.0
lock k32w061+release (read/write) 687100 687100 0 0.0
.bss 70004 70004 0 0.0
.data 2004 2004 0 0.0
.text 609292 609292 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9935228 9940732 5504 0.1
(read/write) 683057 683057 0 0.0
.bss 42961 42961 0 0.0
.data 3304 3304 0 0.0
.data.rel.ro 619344 619344 0 0.0
.dynamic 528 528 0 0.0
.got 13528 13528 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 476060 476060 0 0.0
.text 7906276 7911780 5504 0.1
thermostat-no-ble arm64 (read only) 2597300 2597300 0 0.0
(read/write) 158257 158257 0 0.0
.bss 65249 65249 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83216 83216 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165668 165668 0 0.0
.text 2191888 2191888 0 0.0
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2448608 2448608 0 0.0
.bss 213940 213940 0 0.0
.data 5872 5872 0 0.0
.text 1411252 1411252 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1175879 1175879 0 0.0
bss 142900 142900 0 0.0
rodata 142064 142064 0 0.0
text 812012 812012 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156107 1156107 0 0.0
bss 142136 142136 0 0.0
rodata 133612 133612 0 0.0
text 801484 801488 4 0.0
p6 all-clusters-app default (read/write) 2567272 2567272 0 0.0
.bss 149120 149120 0 0.0
.data 2776 2776 0 0.0
.text 1525536 1525536 0 0.0
all-clusters-minimal-app default (read/write) 2512568 2512568 0 0.0
.bss 148400 148400 0 0.0
.data 2776 2776 0 0.0
.text 1470832 1470832 0 0.0
light-app default (read/write) 2442528 2442528 0 0.0
.bss 140456 140456 0 0.0
.data 2592 2592 0 0.0
.text 1400792 1400792 0 0.0
lock-app default (read/write) 2469656 2469656 0 0.0
.bss 140304 140304 0 0.0
.data 2600 2600 0 0.0
.text 1427920 1427920 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 798068 798060 -8 -0.0
bss 70576 70576 0 0.0
noinit 40416 40416 0 0.0
text 566258 566256 -2 -0.0
lighting-app tlsr9518adk80d (read/write) 817892 817892 0 0.0
bss 71420 71420 0 0.0
noinit 40416 40416 0 0.0
text 582584 582584 0 0.0

Some commands store an error status.  If they fail, the next invocation of the
same command in interactive mode will also claim to have failed, even if it
succeeded, because the error status carries over.

The fix is to reset the error status on Shutdown of the command.
@woody-apple woody-apple force-pushed the tool-command-reset-better branch from f2deb83 to 631e028 Compare July 16, 2022 04:10
@woody-apple
Copy link
Contributor

Fast tracking tooling updates

@woody-apple woody-apple enabled auto-merge (squash) July 16, 2022 04:10
@github-actions
Copy link

github-actions bot commented Jul 16, 2022

PR #20818: Size comparison from cd42353 to 631e028

Increases (4 builds for linux, telink)
platform target config section cd42353 631e028 change % change
linux chip-tool debug (read only) 10244297 10252841 8544 0.1
.text 8284052 8292596 8544 0.1
chip-tool-ipv6only arm64 (read only) 9989452 9994956 5504 0.1
.text 7932980 7938484 5504 0.1
tv-casting-app debug (read only) 5329233 5337793 8560 0.2
.text 4732322 4740882 8560 0.2
telink light-switch-app tlsr9518adk80d text 566410 566412 2 0.0
Decreases (1 build for telink)
platform target config section cd42353 631e028 change % change
telink lighting-app tlsr9518adk80d (read/write) 818088 818080 -8 -0.0
text 582738 582734 -4 -0.0
Full report (41 builds for cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section cd42353 631e028 change % change
cc13x2_26x2 all-clusters-app LP_CC2652R7 (read only) 667887 667887 0 0.0
(read/write) 183352 183352 0 0.0
.bss 74132 74132 0 0.0
.data 3356 3356 0 0.0
.rodata 88271 88271 0 0.0
.text 579300 579300 0 0.0
all-clusters-minimal-app LP_CC2652R7 (read only) 633687 633687 0 0.0
(read/write) 157700 157700 0 0.0
.bss 73428 73428 0 0.0
.data 3356 3356 0 0.0
.rodata 77511 77511 0 0.0
.text 555852 555852 0 0.0
lock-ftd LP_CC2652R7 (read only) 671299 671299 0 0.0
(read/write) 170116 170116 0 0.0
.bss 71196 71196 0 0.0
.data 3280 3280 0 0.0
.rodata 76411 76411 0 0.0
.text 594408 594408 0 0.0
lock-mtd LP_CC2652R7 (read only) 653559 653559 0 0.0
(read/write) 183544 183544 0 0.0
.bss 66884 66884 0 0.0
.data 3280 3280 0 0.0
.rodata 101151 101151 0 0.0
.text 551928 551928 0 0.0
pump-app LP_CC2652R7 (read only) 680315 680315 0 0.0
(read/write) 161948 161948 0 0.0
.bss 71276 71276 0 0.0
.data 3280 3280 0 0.0
.rodata 88771 88771 0 0.0
.text 591060 591060 0 0.0
pump-controller-app LP_CC2652R7 (read only) 666131 666131 0 0.0
(read/write) 176252 176252 0 0.0
.bss 71396 71396 0 0.0
.data 3276 3276 0 0.0
.rodata 84627 84627 0 0.0
.text 581024 581024 0 0.0
shell LP_CC2652R7 (read only) 660386 660386 0 0.0
(read/write) 186356 186356 0 0.0
.bss 76436 76436 0 0.0
.data 3360 3360 0 0.0
.rodata 85058 85058 0 0.0
.text 575012 575012 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 581598 581598 0 0.0
.app_xip_area 460304 460304 0 0.0
.bss 64232 64232 0 0.0
.data 716 716 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 587586 587586 0 0.0
.app_xip_area 461564 461564 0 0.0
.bss 68960 68960 0 0.0
.data 720 720 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 584994 584994 0 0.0
.app_xip_area 464548 464548 0 0.0
.bss 63440 63440 0 0.0
.data 660 660 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read/write) 1084112 1084112 0 0.0
.bss 133044 133044 0 0.0
.data 2048 2048 0 0.0
.text 949000 949000 0 0.0
BRD4161A+rpc (read/write) 1138444 1138444 0 0.0
.bss 149724 149724 0 0.0
.data 2260 2260 0 0.0
.text 986436 986436 0 0.0
BRD4161A+rs911x (read/write) 949480 949480 0 0.0
.bss 140768 140768 0 0.0
.data 2048 2048 0 0.0
.text 806644 806644 0 0.0
lock-app BRD4161A+wf200 (read/write) 1127692 1127692 0 0.0
.bss 144136 144136 0 0.0
.data 2056 2056 0 0.0
.text 981480 981480 0 0.0
window-app BRD4161A (read/write) 1077908 1077908 0 0.0
.bss 134516 134516 0 0.0
.data 2076 2076 0 0.0
.text 941296 941296 0 0.0
esp32 all-clusters-app c3devkit (read only) 1020882 1020882 0 0.0
(read/write) 1485978 1485978 0 0.0
.dram0.bss 70080 70080 0 0.0
.dram0.data 14600 14600 0 0.0
.flash.rodata 215864 215864 0 0.0
.flash.text 1020882 1020882 0 0.0
.iram0.text 62902 62902 0 0.0
m5stack (read only) 1074919 1074919 0 0.0
(read/write) 488024 488024 0 0.0
.dram0.bss 75600 75600 0 0.0
.dram0.data 34144 34144 0 0.0
.flash.rodata 246284 246284 0 0.0
.flash.text 1069535 1069535 0 0.0
.iram0.text 123267 123267 0 0.0
k32w light k32w061+release (read/write) 660364 660364 0 0.0
.bss 69540 69540 0 0.0
.data 1992 1992 0 0.0
.text 583032 583032 0 0.0
lock k32w061+release (read/write) 687380 687380 0 0.0
.bss 70004 70004 0 0.0
.data 2004 2004 0 0.0
.text 609572 609572 0 0.0
linux all-clusters-app debug (read only) 2968329 2968329 0 0.0
(read/write) 155016 155016 0 0.0
.bss 61664 61664 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 85048 85048 0 0.0
.dynamic 608 608 0 0.0
.got 4568 4568 0 0.0
.init 27 27 0 0.0
.init_array 1056 1056 0 0.0
.rodata 264637 264637 0 0.0
.text 2526002 2526002 0 0.0
all-clusters-minimal-app debug (read only) 2817321 2817321 0 0.0
(read/write) 146688 146688 0 0.0
.bss 60864 60864 0 0.0
.data 2048 2048 0 0.0
.data.rel.ro 77608 77608 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 1048 1048 0 0.0
.rodata 265597 265597 0 0.0
.text 2376690 2376690 0 0.0
bridge-app debug+rpc (read only) 2317961 2317961 0 0.0
(read/write) 125504 125504 0 0.0
.bss 48928 48928 0 0.0
.data 3824 3824 0 0.0
.data.rel.ro 66984 66984 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 198240 198240 0 0.0
.text 1957986 1957986 0 0.0
chip-tool debug (read only) 10244297 10252841 8544 0.1
(read/write) 629504 629504 0 0.0
.bss 24728 24728 0 0.0
.data 3234 3234 0 0.0
.data.rel.ro 595152 595152 0 0.0
.dynamic 608 608 0 0.0
.got 5096 5096 0 0.0
.init 27 27 0 0.0
.init_array 640 640 0 0.0
.rodata 512117 512117 0 0.0
.text 8284052 8292596 8544 0.1
chip-tool-ipv6only arm64 (read only) 9989452 9994956 5504 0.1
(read/write) 694577 694577 0 0.0
.bss 42961 42961 0 0.0
.data 3304 3304 0 0.0
.data.rel.ro 630768 630768 0 0.0
.dynamic 528 528 0 0.0
.got 13624 13624 0 0.0
.init 24 24 0 0.0
.init_array 192 192 0 0.0
.rodata 476508 476508 0 0.0
.text 7932980 7938484 5504 0.1
lighting-app debug+rpc (read only) 2554249 2554249 0 0.0
(read/write) 129528 129528 0 0.0
.bss 49440 49440 0 0.0
.data 2096 2096 0 0.0
.data.rel.ro 72136 72136 0 0.0
.dynamic 608 608 0 0.0
.got 4392 4392 0 0.0
.init 27 27 0 0.0
.init_array 816 816 0 0.0
.rodata 213992 213992 0 0.0
.text 2170290 2170290 0 0.0
lock-app debug (read only) 2520169 2520169 0 0.0
(read/write) 124512 124512 0 0.0
.bss 47840 47840 0 0.0
.data 1712 1712 0 0.0
.data.rel.ro 69096 69096 0 0.0
.dynamic 608 608 0 0.0
.got 4424 4424 0 0.0
.init 27 27 0 0.0
.init_array 792 792 0 0.0
.rodata 229032 229032 0 0.0
.text 2125970 2125970 0 0.0
ota-provider-app debug (read only) 2324801 2324801 0 0.0
(read/write) 118312 118312 0 0.0
.bss 47488 47488 0 0.0
.data 1944 1944 0 0.0
.data.rel.ro 63096 63096 0 0.0
.dynamic 608 608 0 0.0
.got 4488 4488 0 0.0
.init 27 27 0 0.0
.init_array 672 672 0 0.0
.rodata 203736 203736 0 0.0
.text 1958290 1958290 0 0.0
ota-requestor-app debug (read only) 2442169 2442169 0 0.0
(read/write) 125248 125248 0 0.0
.bss 49856 49856 0 0.0
.data 2232 2232 0 0.0
.data.rel.ro 67304 67304 0 0.0
.dynamic 608 608 0 0.0
.got 4480 4480 0 0.0
.init 27 27 0 0.0
.init_array 728 728 0 0.0
.rodata 207520 207520 0 0.0
.text 2063474 2063474 0 0.0
shell debug (read only) 2555265 2555265 0 0.0
(read/write) 141104 141104 0 0.0
.bss 57448 57448 0 0.0
.data 1264 1264 0 0.0
.data.rel.ro 76688 76688 0 0.0
.dynamic 608 608 0 0.0
.got 4136 4136 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 228050 228050 0 0.0
.text 2170114 2170114 0 0.0
thermostat-no-ble arm64 (read only) 2598068 2598068 0 0.0
(read/write) 158257 158257 0 0.0
.bss 65249 65249 0 0.0
.data 1704 1704 0 0.0
.data.rel.ro 83216 83216 0 0.0
.dynamic 528 528 0 0.0
.got 5072 5072 0 0.0
.init 24 24 0 0.0
.init_array 400 400 0 0.0
.rodata 165700 165700 0 0.0
.text 2192624 2192624 0 0.0
tv-app debug (read only) 3104769 3104769 0 0.0
(read/write) 257704 257704 0 0.0
.bss 167016 167016 0 0.0
.data 4848 4848 0 0.0
.data.rel.ro 79392 79392 0 0.0
.dynamic 608 608 0 0.0
.got 4848 4848 0 0.0
.init 27 27 0 0.0
.init_array 952 952 0 0.0
.rodata 249248 249248 0 0.0
.text 2667618 2667618 0 0.0
tv-casting-app debug (read only) 5329233 5337793 8560 0.2
(read/write) 156848 156848 0 0.0
.bss 50248 50248 0 0.0
.data 2416 2416 0 0.0
.data.rel.ro 97928 97928 0 0.0
.dynamic 608 608 0 0.0
.got 4744 4744 0 0.0
.init 27 27 0 0.0
.init_array 864 864 0 0.0
.rodata 331561 331561 0 0.0
.text 4732322 4740882 8560 0.2
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2448888 2448888 0 0.0
.bss 213940 213940 0 0.0
.data 5872 5872 0 0.0
.text 1411532 1411532 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1176123 1176123 0 0.0
bss 142900 142900 0 0.0
rodata 142164 142164 0 0.0
text 812156 812156 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read/write) 1156331 1156331 0 0.0
bss 142136 142136 0 0.0
rodata 133708 133708 0 0.0
text 801608 801608 0 0.0
p6 all-clusters-app default (read/write) 2567680 2567680 0 0.0
.bss 149120 149120 0 0.0
.data 2776 2776 0 0.0
.text 1525944 1525944 0 0.0
all-clusters-minimal-app default (read/write) 2512928 2512928 0 0.0
.bss 148400 148400 0 0.0
.data 2776 2776 0 0.0
.text 1471192 1471192 0 0.0
light-app default (read/write) 2442800 2442800 0 0.0
.bss 140456 140456 0 0.0
.data 2592 2592 0 0.0
.text 1401064 1401064 0 0.0
lock-app default (read/write) 2470064 2470064 0 0.0
.bss 140304 140304 0 0.0
.data 2600 2600 0 0.0
.text 1428328 1428328 0 0.0
telink light-switch-app tlsr9518adk80d (read/write) 798256 798256 0 0.0
bss 70576 70576 0 0.0
noinit 40416 40416 0 0.0
text 566410 566412 2 0.0
lighting-app tlsr9518adk80d (read/write) 818088 818080 -8 -0.0
bss 71420 71420 0 0.0
noinit 40416 40416 0 0.0
text 582738 582734 -4 -0.0

@woody-apple woody-apple merged commit bd077fe into project-chip:master Jul 16, 2022
github-actions bot pushed a commit that referenced this pull request Jul 16, 2022
Some commands store an error status.  If they fail, the next invocation of the
same command in interactive mode will also claim to have failed, even if it
succeeded, because the error status carries over.

The fix is to reset the error status on Shutdown of the command.
@bzbarsky-apple bzbarsky-apple deleted the tool-command-reset-better branch July 18, 2022 04:38
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.

2 participants